Hi,
I am very new to SonarQube, so my knowledge is very limited and this is my first post here, so please be gentle.
Our legacy product probably is using old technologies and we use ant to compile our java codes. The main build.xml is like this ( partial ) :
<target name="exports_1" depends="setup">
<!-- Build lowest level components needed by all projects. This builds serially. -->
<echo message="Step 1: ServiceInterfaceEjb, AuthLdap"/>
<ant antfile="${top}/Java/Infrastructure/Logging/build.xml" inheritall="false"/>
<ant antfile="${top}/Java/DataModel/XmlBinding/build.xml" inheritall="false"/>
<ant antfile="${top}/Java/DataModel/Entities/build.xml" inheritall="false"/>
<ant antfile="${top}/Auth/AuthLdap/build.xml" inheritall="false"/>
<ant antfile="${top}/Java/Infrastructure/Infrastructure/build.xml" inheritall="false"/>
<ant antfile="${top}/Java/Infrastructure/Security/build.xml" inheritall="false"/>
<ant antfile="${top}/Java/Enterprise/CacheManager/build.xml" inheritall="false"/>
<ant antfile="${top}/Auth/src/build_ldap_gui_tool.xml" target="ldap_gui_dist" inheritall="false"/>
<ant antfile="${top}/Auth/LdapAuth/build_ldap_auth.xml" inheritall="false"/>
<ant antfile="${top}/Java/Test/TestLib/build.xml" inheritall="false"/>
</target>
Currently, I can go to each directory, for example : ${top}/Java/Infrastructure/Logging , and run a “ant sonar” command to scan the java code under there
ant sonar -Dsonar.login=xxxxxxxxxxx -Dsonar.userHome=pwd
/.sonar
if I run it on another directory, the scan result of the project will be wipe out with the new scan’s result.
And we have about 70 lines of these “ant antfile” commands in the build.xml , I am wondering if there is a way we could do the “ant sonar” scan in 1 command ?
Our company’s SonarQube verions is Enterprise Edition Version 8.9.1 (build 44547)
and the sonar ant scanner I download is sonarqube-ant-task-2.7.1.1951.jar
Any help or suggestion would be great.
Please let me know if I need to provide more information.
Thanks,
James