Hi
I have used Ant to build C++ Project. The build.xml can run successfully.
<?xml version="1.0"?>
<project name = "try_ant :: parent" basedir = ".">
<!-- Define the Sonar task if this hasn't been done in a common script -->
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="/proj/ims/IPWorks/apache-ant-1.8.4/lib/sonar-ant-task-1.4.jar" />
</taskdef>
<!-- Add the target -->
<target name="sonar">
<property name="sonar.sources" value="src" />
<property name="sonar.projectName" value="Sample C++ Multiple Project" />
<property name="sonar.language" value="c++" />
<property name="sonar.dynamicAnalysis" value="reuseReports" />
<sonar:sonar key="org.example:example" version="0.1-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant"/>
</target>
<target name="clean">
<delete dir=".sonar"/>
<ant dir="core" target="clean"/>
<ant dir="common" target="clean"/>
</target>
<target name="compile">
<ant dir="core" target="compile"/>
<ant dir="common" target="compile"/>
</target>
<property name="sonar.modules" value="core/build.xml,common/build.xml"/>
</project>
But when I add the sentences below (red mark). It shows:
BUILD FAILED
/vobs/IPWORKS/src_ipworks/aaa/build.xml:15: java.lang.IllegalArgumentException:
The following mandatory information is missing:
- property 'sonar.projectKey'
- property 'sonar.sources'
Could you know why? Can you give some help?
Thanks!
Jonadon