Hi,
I’m using Maven 3.1.1 on Mac 10.9.1. When I ran “mvn dependency:analyze” on
my project, I got results that included:
[WARNING] Unused declared dependencies found:
…
[WARNING] junit:junit:jar:4.11:test
So I commented out the above junit dependency in my pom (declared like so):
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
However, when I ran “mvm clean install” on my project, I got errors like
initializationError0(org.mainco.subco.core.SerializableTest) Time
elapsed:
0 sec <<< ERROR!
java.lang.NoSuchFieldError: NULL
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:48)
at
org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:58)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:104)
This isn’t the only dependency that the analyze goal lists that wreaks havoc
when I comment it out. Is there another way to detect what dependencies are
truly not needed by my project?
--
View this message in context:
http://maven.40175.n5.nabble.com/Why-is-dependency-analyze-lying-to-me-tp5784108.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]