jcgay / maven-color

A colorized Maven console
MIT License
177 stars 20 forks source link

maven-surefire-plugin class missing #21

Closed Deltharis closed 8 years ago

Deltharis commented 8 years ago

Similar (possibly the same issue?) as https://github.com/jcgay/maven-color/issues/7. I'd reopen that one, but it was a few versions ago, and I coulnd't find how to do that.

Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: A required class was missing while executing org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test: com/github/jcgay/maven/color/logger/AnsiColorConsoleLogger

The error came with the following error info:

realm =    plugin>org.apache.maven.plugins:maven-surefire-plugin:2.18.1
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/MYPATH/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.18.1/maven-surefire-plugin-2.18.1.jar
urls[1] = file:/MYPATH/.m2/repository/org/apache/maven/surefire/maven-surefire-common/2.18.1/maven-surefire-common-2.18.1.jar
urls[2] = file:/MYPATH/.m2/repository/org/apache/maven/surefire/surefire-booter/2.18.1/surefire-booter-2.18.1.jar
urls[3] = file:/MYPATH/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
urls[4] = file:/MYPATH/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[5] = file:/MYPATH/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
urls[6] = file:/MYPATH/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
urls[7] = file:/MYPATH/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
urls[8] = file:/MYPATH/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
urls[9] = file:/MYPATH/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[10] = file:/MYPATH/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[11] = file:/MYPATH/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
urls[12] = file:/MYPATH/.m2/repository/org/apache/maven/surefire/surefire-api/2.18.1/surefire-api-2.18.1.jar
urls[13] = file:/MYPATH/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.3/maven-plugin-annotations-3.3.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

It does not happen when I skip tests, it does not happen if I turn off coloring with MAVEN_OPTS.

I'm using uncustomized 1.3 logback installation (it happend on 1.2 too, I upgraded to check). My mvn -version:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: C:\apache-maven-3.3.9
Java version: 1.8.0_74, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_74\jre
Default locale: pl_PL, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
jcgay commented 8 years ago

It is really strange, AnsiColorConsoleLogger was used until maven-color v1.1 for Maven 3.0.x installations. There is no trace of this class anymore as I have stopped supporting Maven 3.0.x.

This is like you are using the old java agent for a Maven 3.3.x installation, but this will never works :smile:

How have you installed maven-color ? The installation guide to follow should be this one: https://github.com/jcgay/maven-color#maven--31x

Thanks !

Deltharis commented 8 years ago

Ehh... Ok, sorry, that is true. I seem to have never cleaned up maven-color 1.1 and java-agent from maven-opts after updating from 1.1.

jcgay commented 8 years ago

No problem, migrations are not really documented :cry: