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 are currently using unit tests to test our project. We have the majority
I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather
Currently, we're using the following version numbering scheme for our C# winforms project: Major
Our project is held in a SourceSafe database. We have an automated build, which
We are in the process of implementing a CMS for our project which currently
Our development team uses Eclipse + Aptana to do their web development work. Currently,
we are currently working on a rails project that uses i18n and we have
I am currently automating the build of our .NET solution (which contains many projects,
I'm currently using jenkins/hudson for continuous integration a large mostly C++ project. We have

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.