Comments (8)
Can you confirm that excluding the icu4j.jar fixes your issue? I have no way to test if it works on my end I just want to make sure removing this library will not cause any issues. Can you provide some simple test case scenario where this issue is happening?
from cobertura.
I had to upgrade to cobertura-maven-plugin 2.6 (from 2.5.2) because we are using java 7 and before that cobertura was failing to parse diamond operator in the code. See below;
I'll try to get you something reproducible on your end....
[ERROR] net.sourceforge.cobertura.javancss.parser.ParseException: Encountered " ">" "> "" at line 229, column 78.
Was expecting one of:
"boolean" ...
"byte" ...
"char" ...
"double" ...
"float" ...
"int" ...
"long" ...
"short" ...
...
"?" ...
"boolean" ...
"char" ...
"byte" ...
"short" ...
"int" ...
"long" ...
"float" ...
"double" ...
...
"?" ...
"?" ...
"?" ...
"?" ...
at net.sourceforge.cobertura.javancss.parser.JavaParser.generateParseException(JavaParser.java:10296)
at net.sourceforge.cobertura.javancss.parser.JavaParser.jj_consume_token(JavaParser.java:10172)
at net.sourceforge.cobertura.javancss.parser.JavaParser.TypeArgument(JavaParser.java:5656)
at net.sourceforge.cobertura.javancss.parser.JavaParser.TypeArguments(JavaParser.java:5615)
at net.sourceforge.cobertura.javancss.parser.JavaParser.AllocationExpression(JavaParser.java:3652)
at net.sourceforge.cobertura.javancss.parser.JavaParser.PrimaryPrefix(JavaParser.java:3460)
at net.sourceforge.cobertura.javancss.parser.JavaParser.PrimaryExpression(JavaParser.java:3388)
at net.sourceforge.cobertura.javancss.parser.JavaParser.PostfixExpression(JavaParser.java:3342)
at net.sourceforge.cobertura.javancss.parser.JavaParser.UnaryExpressionNotPlusMinus(JavaParser.java:3249)
at net.sourceforge.cobertura.javancss.parser.JavaParser.UnaryExpression(JavaParser.java:3183)
at net.sourceforge.cobertura.javancss.parser.JavaParser.MultiplicativeExpression(JavaParser.java:3102)
at net.sourceforge.cobertura.javancss.parser.JavaParser.AdditiveExpression(JavaParser.java:3073)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ShiftExpression(JavaParser.java:3039)
at net.sourceforge.cobertura.javancss.parser.JavaParser.RelationalExpression(JavaParser.java:3002)
at net.sourceforge.cobertura.javancss.parser.JavaParser.InstanceOfExpression(JavaParser.java:2989)
at net.sourceforge.cobertura.javancss.parser.JavaParser.EqualityExpression(JavaParser.java:2960)
at net.sourceforge.cobertura.javancss.parser.JavaParser.AndExpression(JavaParser.java:2943)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ExclusiveOrExpression(JavaParser.java:2926)
at net.sourceforge.cobertura.javancss.parser.JavaParser.InclusiveOrExpression(JavaParser.java:2909)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalAndExpression(JavaParser.java:2891)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalOrExpression(JavaParser.java:2873)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalExpression(JavaParser.java:2857)
at net.sourceforge.cobertura.javancss.parser.JavaParser.Expression(JavaParser.java:2795)
at net.sourceforge.cobertura.javancss.parser.JavaParser.VariableInitializer(JavaParser.java:1800)
at net.sourceforge.cobertura.javancss.parser.JavaParser.VariableDeclarator(JavaParser.java:1728)
at net.sourceforge.cobertura.javancss.parser.JavaParser.LocalVariableDeclaration(JavaParser.java:4032)
at net.sourceforge.cobertura.javancss.parser.JavaParser.BlockStatement(JavaParser.java:3954)
at net.sourceforge.cobertura.javancss.parser.JavaParser.Block(JavaParser.java:3947)
at net.sourceforge.cobertura.javancss.parser.JavaParser.MethodDeclaration(JavaParser.java:2039)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBodyDeclaration(JavaParser.java:1082)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBody(JavaParser.java:941)
at net.sourceforge.cobertura.javancss.parser.JavaParser.UnmodifiedClassDeclaration(JavaParser.java:854)
at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassDeclaration(JavaParser.java:761)
at net.sourceforge.cobertura.javancss.parser.JavaParser.TypeDeclaration(JavaParser.java:608)
at net.sourceforge.cobertura.javancss.parser.JavaParser.CompilationUnit(JavaParser.java:353)
at net.sourceforge.cobertura.javancss.parser.JavaParser.parse(JavaParser.java:137)
at net.sourceforge.cobertura.javancss.Javancss._measureSource(Javancss.java:256)
at net.sourceforge.cobertura.javancss.Javancss._measureRoot(Javancss.java:339)
at net.sourceforge.cobertura.javancss.Javancss.(Javancss.java:419)
at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSource(ComplexityCalculator.java:102)
at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSingleFile(ComplexityCalculator.java:139)
at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForSourceFileNameInternal(ComplexityCalculator.java:224)
at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForPackageInternal(ComplexityCalculator.java:194)
at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForProject(ComplexityCalculator.java:164)
at net.sourceforge.cobertura.reporting.xml.XMLReport.(XMLReport.java:80)
at net.sourceforge.cobertura.reporting.Main.parseArguments(Main.java:107)
at net.sourceforge.cobertura.reporting.Main.main(Main.java:174)
net.sourceforge.cobertura.javancss.parser.ParseException: Encountered " ">" "> "" at line 45, column 70.
from cobertura.
What I ment to ask was if you exclude the bad dependency will it resolve the issue. I.E:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-8</version>
<exclusions>
<exclusion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
from cobertura.
I can confirm that removing the icu:icu4j dependency from cobertura resolves this issue
from cobertura.
Specifically this is a problem running an instrumented war in the maven jetty plugin. Jetty refuses to start up because the instrumented war is invalid due to the corrupted icu4j dependency being included.
from cobertura.
This appears to be fixed in master:
commit 1e388f08977e4399d65fe8ef7cea3a1da7fb4c9f
Author: Lennart Jörelid <[email protected]>
Date: Wed Dec 11 11:35:49 2013 +0100
Updated Xalan and XercesImpl dependencies.
diff --git a/cobertura/pom.xml b/cobertura/pom.xml
This updates jaxven from 1.1-beta-8 to 1.1.4, which no longer has an icu4j dependency:
dalvizu:~/git/dalvizu/cobertura/cobertura$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Cobertura code coverage 2.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ cobertura ---
[INFO] net.sourceforge.cobertura:cobertura:jar:2.1.0-SNAPSHOT
[INFO] +- org.ow2.asm:asm:jar:5.0.1:compile
[INFO] +- org.ow2.asm:asm-tree:jar:5.0.1:compile
[INFO] +- org.ow2.asm:asm-commons:jar:5.0.1:compile
[INFO] +- org.ow2.asm:asm-util:jar:5.0.1:compile
[INFO] +- org.ow2.asm:asm-analysis:jar:5.0.1:compile
[INFO] +- xerces:xercesImpl:jar:2.11.0:test
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] +- xalan:xalan:jar:2.7.1:test
[INFO] | \- xalan:serializer:jar:2.7.1:test
[INFO] +- org.jdom:jdom:jar:1.1.3:test
[INFO] +- oro:oro:jar:2.0.8:compile
[INFO] +- jaxen:jaxen:jar:1.1.4:compile
[INFO] +- commons-io:commons-io:jar:2.2:test
[INFO] +- org.apache.ant:ant:jar:1.8.3:compile
[INFO] | \- org.apache.ant:ant-launcher:jar:1.8.3:compile
[INFO] +- org.apache.ant:ant-junit:jar:1.8.3:compile
[INFO] +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:compile
[INFO] +- org.mortbay.jetty:jetty:jar:6.1.14:compile
[INFO] +- org.mortbay.jetty:jetty-util:jar:6.1.14:compile
[INFO] +- org.mortbay.jetty:jetty-servlet-tester:jar:6.1.14:test
[INFO] +- org.codehaus.groovy:groovy-all:jar:1.6.9:test
[INFO] +- net.java.dev.javacc:javacc:jar:5.0:test
[INFO] +- com.sun:tools:jar:0:system
[INFO] +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.0.13:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.0.13:compile
[INFO] +- junit:junit:jar:4.11:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] \- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.574s
[INFO] Finished at: Wed Feb 04 12:45:03 MST 2015
[INFO] Final Memory: 11M/310M
[INFO] ------------------------------------------------------------------------
This can be closed.
from cobertura.
Could you please try with Cobertura 2.1.1 and Maven Cobertura Plugin 2.7.
from cobertura.
thank you. This bug report really helped to fix my issue with this jar.
It's a pitty though that this bug report is open since 2013
from cobertura.
Related Issues (20)
- Cobertura 2.7 + Tycho JDT <= 0.15.0 causes lines to be not covered
- Method partially covered but missing from Metrics and lines aren't highlighted in File(s) sections
- How to reset minimum stability once it has reached a certain level following autoUpdateStability true? HOT 1
- Cobertura report is not getting generated for few classes having java 8, though few classes containing same Java 8 is getting included in reports
- Visual Studio Code Coverage file (.coverage) support
- When can we expect latest releases for Cobertura which is compatible with Java 8 and higher versions HOT 4
- cobertura-2.1.1 throws InvocationTargetException worked in cobertura-1.9.4.1
- I hava a question. How to convert/transform Cobertura.xml(codecoverage report) to junit
- java.lang.NoClassDefFoundError: net/sourceforge/cobertura/coveragedata/LightClassmapListener
- log4j vulnerability in cobertura 1.9.4.1
- What is "coverage-04.dtd" HOT 1
- after upgrade of jenkins and cobertura plugin build fails
- How to merge two cobertura xmls? HOT 1
- Build Fails Despite 100% Coverage
- Would anyone from the Cobertura community be available for a quick code review?
- Cobertura caching deleted files
- In a multi-process scenario, coverage data is abnormal.
- Cobertura report generation is stuck
- cobertura coverage report give much higher Cyclomatic Complexity score for given Method then Visual Studio 2022 Code Metrics Results
- Cobertura XML Doctype points to unavailable DTD file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobertura.