I am stuck integrating JaCoCo with sonar using Ant. Very new to this task, and integrating for the first time. I have gone through many links like
The following is an ANT build that is configured to run a junit unit test and use jacoco for code coverage reporting. The results are uploaded to Sonar and finally ivy is used to download 3rd party jars and manage classpaths.
├── build.properties
├── build.xml
├── ivy.xml
└── src
├── main
│ └── java
│ └── org
│ └── demo
│ └── App.java
└── test
└── java
└── org
└── demo
└── AppTest.java
# Build properties
build.dir=build
src.dir=src/main/java
test.src.dir=src/test/java
classes.dir=${build.dir}/classes
test.classes.dir=${build.dir}/test-classes
reports.dir=${build.dir}/reports
# Sonar properties
sonar.projectKey=org.demo:demo
sonar.projectName=Demo project
sonar.projectVersion=1.0
sonar.projectDescription=This is my demo Sonar project
sonar.host.url=http://localhost:9000
sonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar
sonar.jdbc.driverClassName=org.h2.Driver
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.working.directory=${build.dir}/sonar
sonar.language=java
sonar.sources=${src.dir}
sonar.binaries=${classes.dir}
sonar.tests=${test.src.dir}
sonar.dynamicAnalysis=reuseReports
sonar.surefire.reportsPath=${reports.dir}/junit
sonar.java.coveragePlugin=jacoco
sonar.jacoco.reportPath=${build.dir}/jacoco.exec