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

  • Home
  • SEARCH
  • 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 4003188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:07:19+00:00 2026-05-20T08:07:19+00:00

Our project currently uses Ivy for its dependency management. We would really like to

  • 0

Our project currently uses Ivy for its dependency management. We would really like to integrate our Hudson build server with Sonar. So far this has been a relatively simple and straightforward task. Of course we have set Sonar up to run in Sonar Lite mode (as we are not a Maven project).

Unfortunately, when our Sonar bytecode scan kicks in we get a lot of the following:

[WARN] Class ‘XXX’ is not accessible
through the ClassLoader. [WARN] Class
‘XXX’ is not accessible through the
ClassLoader. … [WARN] Class ‘XXX’
is not accessible through the
ClassLoader.

I understand that this is because our dependencies are not defined in our Sonar Lite dummy POM file and hence the libraries are not being picked to be traversed during the analysis.

The Sonar installation documentation mentions that the dependencies must be added to the aux classpath via the Maven pom file for this to be rectified. However, there does not seem to be any way to painlessly sync these dependencies with our ivy dependencies (of which there are hundreds). We obviously are looking for a way to define our dependencies without the need to replicate each one in our dummy pom file.

Several issues raised on the Sonar codehaus site (such as this one) seem to dance around the same feature that I’m looking for but none seem to offer a reasonable solution (unless I’m missing something).

Has anyone dealt with this situation before and has a reasonably good solution?

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-05-20T08:07:19+00:00Added an answer on May 20, 2026 at 8:07 am

    Sonar lite mechanism now appears to be deprecated with Sonar 2.6.

    Two new ways to integrate Sonar with a non Maven build:

    • ANT task
    • Java runner

    The ANT task is tailor made for combination with ivy’s control of the build and runtime classpaths (Using configurations):

    <!--
      Uses ivy to download dependencies
      -->
    
      <target name="dependencies" description="Resolve project dependencies and set classpaths">
        <ivy:resolve/>
        <ivy:cachepath pathid="compile.path"  conf="compile"/>
        <ivy:cachepath pathid="runtime.path"  conf="runtime"/>
        <ivy:cachepath pathid="test.path"     conf="test"/>
        <ivy:cachepath pathid="anttasks.path" conf="anttasks"/>
      </target>
    
      <!--
      Perform source code analysis
      -->
    
      <target name="sonar-init" description="Declare sonar ant task">
        <taskdef uri="antlib:org.sonar.ant" 
                 resource="org/sonar/ant/antlib.xml" 
                 classpathref="anttasks.path"/>
      </target>
    
      <target name="sonar" depends="test,sonar-init" description="Run the Sonar code analysis tool">
        <ivy:info/>
    
        <sonar:sonar workDir="${sonar.workDir}" key="${ivy.organisation}:${ivy.module}" version="${ivy.revision}">
          <!-- Project layout -->
          <sources>
            <path location="${build.srcDir}"/>
          </sources>
          <tests>
            <path location="${build.testDir}"/>
          </tests>
          <binaries>
            <path location="${build.outputDir}"/>
            <path location="${build.testOutputDir}"/>
          </binaries>
          <libraries>
            <path refid="test.path"/>
          </libraries>
          <!-- Additional Sonar configuration -->
          <property key="sonar.java.source" value="1.5"/>
          <property key="sonar.java.target" value="1.5"/>
        </sonar:sonar>
      </target>
    

    Additionally note how the ivy info task can be used to set the Sonar key and version.

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

Sidebar

Related Questions

Our project currently uses Crystal Reports for Visual Studio 2008. We need to upgrade
We currently uses Jenkins for all our (Java) build/deployment from a Linux box. Now
I'm currently working on a project that uses data access on different databases. Our
Our project uses custom xml config file, that is currently located under the project
Our project currently uses Silverlight to consume an Odata service. This has made life
My project currently uses Oracle Application Server with SOA (BPEL/Human Workflow) components. Due to
For our rewrite of the open-source iMedia framework project (in use currently by dozens
Our team is currently working on a large project which makes heavy use of
I am currently working on a project where one of our goals is to
Our current project has ran into a circular dependency issue. Our business logic assembly

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.