Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:14:47+00:00 2026-06-13T03:14:47+00:00

I have a java-project that I wish to do some analysis on using Sonar.

  • 0

I have a java-project that I wish to do some analysis on using Sonar.

I have a build.xml file with a target called sonar that just points out where my sonar-ant-task.jar-file is located, and this is the rest:

<sonar:sonar workDir="${source.path}" key="${ant.project.name}" version="${version}" xmlns:sonar="antlib:org.sonar.ant">

When I run it I get this:

sonar:

[sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 20 2010
[sonar:sonar] Sonar Ant Task version: 1.0
[sonar:sonar] Sonar work directory: PATH/src
[sonar:sonar] Sonar server: http://localhost:9000
[sonar:sonar] Sonar version: 3.0.1
[sonar:sonar] 09:16:47.958 INFO      o.s.c.p.Database - Create JDBC datasource
[sonar:sonar] 09:16:48.672 INFO  actDatabaseConnector - Initializing Hibernate
[sonar:sonar] 09:16:50.700 INFO  .s.b.b.ProjectModule - -------------  Analyzing package
[sonar:sonar] 09:16:51.407 INFO  .s.b.ProfileProvider - Selected quality profile : [name=Sonar way with Findbugs,language=java]
[sonar:sonar] 09:16:51.426 INFO  nPluginsConfigurator - Configure maven plugins...
[sonar:sonar] 09:16:51.549 INFO        org.sonar.INFO - Compare to previous analysis (2012-10-15)
[sonar:sonar] 09:16:51.588 INFO        org.sonar.INFO - Compare over 5 days (2012-10-10, analysis of 2012-10-15 09:09:26.826)
[sonar:sonar] 09:16:51.621 INFO        org.sonar.INFO - Compare over 30 days (2012-09-15, analysis of 2012-10-15 09:09:26.826)
[sonar:sonar] 09:16:51.664 INFO  .b.p.SensorsExecutor - Initializer ProjectFileSystemLogger...
[sonar:sonar] 09:16:51.668 INFO  .b.p.SensorsExecutor - Initializer ProjectFileSystemLogger done: 4 ms
[sonar:sonar] 09:16:51.679 INFO  p.PhasesTimeProfiler - Sensor JavaSourceImporter...
[sonar:sonar] 09:16:51.713 INFO  p.PhasesTimeProfiler - Sensor JavaSourceImporter done: 34 ms
[sonar:sonar] 09:16:51.713 INFO  p.PhasesTimeProfiler - Sensor SquidSensor...
[sonar:sonar] 09:16:51.745 INFO  .s.p.s.SquidExecutor - Java Squid scan...
[sonar:sonar] 09:16:51.749 INFO  .s.p.s.SquidExecutor - Java Squid scan done: 4 ms
[sonar:sonar] 09:16:51.749 INFO  p.PhasesTimeProfiler - Sensor SquidSensor done: 36 ms
[sonar:sonar] 09:16:51.750 INFO  p.PhasesTimeProfiler - Sensor SurefireSensor...
[sonar:sonar] 09:16:51.751 INFO  s.p.s.SurefireSensor - parsing PATH\src\target\surefire-reports
[sonar:sonar] 09:16:51.757 INFO  p.PhasesTimeProfiler - Sensor SurefireSensor done: 7 ms
[sonar:sonar] 09:16:51.757 INFO  p.PhasesTimeProfiler - Sensor CpdSensor...
[sonar:sonar] 09:16:51.757 INFO        org.sonar.INFO - SonarEngine is used
[sonar:sonar] 09:16:51.758 INFO  p.PhasesTimeProfiler - Sensor CpdSensor done: 0 ms
[sonar:sonar] 09:16:51.758 INFO  p.PhasesTimeProfiler - Sensor ProfileSensor...
[sonar:sonar] 09:16:52.403 INFO  p.PhasesTimeProfiler - Sensor ProfileSensor done: 645 ms
[sonar:sonar] 09:16:52.404 INFO  p.PhasesTimeProfiler - Sensor ProfileEventsSensor...
[sonar:sonar] 09:16:52.435 INFO  p.PhasesTimeProfiler - Sensor ProfileEventsSensor done: 31 ms
[sonar:sonar] 09:16:52.436 INFO  p.PhasesTimeProfiler - Sensor VersionEventsSensor...
[sonar:sonar] 09:16:52.465 INFO  p.PhasesTimeProfiler - Sensor VersionEventsSensor done: 29 ms
[sonar:sonar] 09:16:52.750 INFO  p.PhasesTimeProfiler - Execute decorators...
[sonar:sonar] 09:16:52.910 INFO  .b.p.UpdateStatusJob - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000
[sonar:sonar] 09:16:52.911 INFO  b.p.PostJobsExecutor - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
[sonar:sonar] 09:16:52.969 INFO  b.p.PostJobsExecutor - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[sonar:sonar] 09:16:52.982 INFO  .p.d.p.KeepOneFilter - -> Keep one snapshot per day between 2012-09-17 and 2012-10-15
[sonar:sonar] 09:16:52.984 INFO  DefaultPeriodCleaner - <- Delete snapshot: 2012-10-15T09:11:13+0200 [463]
[sonar:sonar] 09:16:53.006 INFO  .p.d.p.KeepOneFilter - -> Keep one snapshot per week between 2011-10-17 and 2012-09-17
[sonar:sonar] 09:16:53.006 INFO  .p.d.p.KeepOneFilter - -> Keep one snapshot per month between 2007-10-22 and 2011-10-17
[sonar:sonar] 09:16:53.007 INFO  .d.p.DeleteAllFilter - -> Delete data prior to: 2007-10-22
[sonar:sonar] 09:16:53.011 INFO  o.s.c.purge.PurgeDao - -> Clean package [id=404]
BUILD SUCCESSFUL
Total time: 7 seconds

When I browse to http://localhost:9000 I can see the Sonar dashboard with my project but no lines analyzed, it’s all empty and code coverage says ‘-‘.

Any ideas?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:14:48+00:00Added an answer on June 13, 2026 at 3:14 am

    Is there any configuration options in you build.xml under the sonar:sonar tag?

    It seems that you use the Sonar Ant task v1.0. In this case you have to define where your source code is according to this wiki page.

    If you are new to Sonar, maybe you should try the Sonar Ant task v2.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java project that I build using an Ant script. I am
I have recently just created Java project using Eclipse that requires 2 JAR files
I have a Java project that is built using Maven , thus my build
i have a java ee project which has a text file that uses a
I have got a project that is using jni to connect java wrapper and
I have a Java application that is managed using Maven. The project involves the
I have a java project that has just been imported into TFS and I've
I have a have a java project that serializes some objects and ints to
I have a Java project that builds using Apache Ant to a website. This
I have a Java project that is using Cucumber for BDD. This morning the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.