ant - Could not execute jacoco on jenkins -


When I'm trying to cover GN Sonar code coverage of my project through Jenkins, I am getting the following error : Definitions can not be loaded from the resource organization / jacoco / ant / antlib.xml could not be found.

But when I am executing it with eclipse it does not show any error. The code is similar in both cases and I have examined that jacocoant.jar is included in the case of Jenkins.

Here's my code:

  & lt; Taskdef uri = "Antibyl: Org.jacoco.ant" resource = "org / jacoco / ant / antlib.xml" & gt; & Lt; Class path path = "../monet-main / lib / dev / sonar / jacocoant.jar" /> & Lt; / Taskdef> & Lt; Property Name = "Sonar." Value = "test" /> & Lt; Property Name = "Sonar DynamicAlalysis" value = "Reeves Reports" /> & Lt; Property name = "sonar.firefire.reportsPath" value = "output / site / jacoco" /> & Lt; Property name = "sonar.java.quareplugin" value = "jacoco" /> & Lt; Property Name = "Sonar.Jecoka.Reportspath" value = "Output / jacoco.exec" /> & Lt; Goal name = "test" & gt; & Lt; Mkdir dir = "Output / Report / Junit" /> & Lt; Javac debug = "true" includearnruntime = "false" nowarn = "true" debuglevel = "$ {debuglevel}" destdir = "bin" encoding = "UTF-8" source = "1.6" target = "1.6" srcdir = "test "& Gt; & Lt; Classpath refid = "monet-service.classpath" /> & Lt; / Javac & gt; & Lt; Jacoco: coverage destfile = "$ {result.exec.file}" & gt; & Lt; Junit haltonfailure = "yes" fork = "true" & gt; & Lt; Classpath & gt; & Lt; Path Refied = "Monnet-Service. Classpath" /> & Lt; Pathhelm Path = "Bin" /> & Lt; / Classpath & gt; & Lt; Formatter type = "plain" usefile = "false" /> & Lt; Formatter type = "xml" /> & Lt; Batchtest Fork = "Yes" todir = "Output / Report / Junit" & gt; & Lt; Fileset dir = "test" & gt; & Lt; Include name = "** / CommonTest.java" /> & Lt; / Fileset & gt; & Lt; / Batchtest & gt; & Lt; / JUnit & gt; & Lt; / Jacoco: coverage & gt; & Lt; / Target & gt; & Lt; Target name = "test report" dependent = "test" & gt; & Lt ;! - Step 3: Create coverage report - & gt; & Lt; Jacoco: Reports & gt; & Lt; Executiondata & gt; & Lt; File file = "$ {result.exec.file}" /> & Lt; / Executiondata & gt; & Lt ;! - Classroom files and optional source files ... - & gt; & Lt; Structure name = "jacoko ant example" & gt; & Lt; Classfiles & gt; & Lt; Fileset dir = "$ {result.dir}" /> & Lt; / Classfiles & gt; & Lt; Source Files Encoding = "UTF-8" & gt; & Lt; Fileset dir = "$ {src.dir}" /> & Lt; / Sourcefiles & gt; & Lt; / Structure & gt; & Lt ;! - To prepare reports in different formats. - & gt; & Lt; Html destdir = "$ {result.report.dir}" /> & Lt; Csv destfile = "$ {result.report.dir} /report.csv" /> & Lt; Xml destfile = "$ {result.report.dir} /report.xml" /> & Lt; / Jacoco: Reports & gt; & Lt; / Target & gt; & Lt ;! - define sonarquach target - & gt; & Lt; Target name = "sonar" dependent = "test report" & gt; & Lt; Taskdef uri = "entlib: org.sonar.ant" resource = "org / sonar / ant / antlib.xml" & gt; & Lt ;! - Update the following line, or enter your "$ HOME / .ac / lib" folder - & gt; Put "sonar-ant-task - * .jar" file. & Lt; Class path path = "../monet-main / lib / dev / sonar / sonar-ant-task-2.2.jar" /> & Lt; / Taskdef> & Lt ;! - SonarCube analysis - & gt; carry about. & Lt; Sonar: sonar / & gt; & Lt; / Target & gt;  

Is there a problem ..


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -