Docker-maven-plugin: Eclipse photon: Failed to execute goal stop with missing class org.fusesource.jansi.Ansi$Color

Created on 29 Jun 2018  路  5Comments  路  Source: fabric8io/docker-maven-plugin

Description

Hello,
With Eclipse Photon (4.8) the plugin doesn't work and there is an error with a missing class.
It works fine with eclipse oxygen (4.7) or with a standalone maven.
(I've tried to add the dependency in the pom, but it doesn't help)

Regards.

 [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.26.0:stop (docker-build) on project xx: Execution docker-build of goal io.fabric8:docker-maven-plugin:0.26.0:stop failed: A required class was missing while executing io.fabric8:docker-maven-plugin:0.26.0:stop: org/fusesource/jansi/Ansi$Color
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.26.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/xxx/.m2/repository/io/fabric8/docker-maven-plugin/0.26.0/docker-maven-plugin-0.26.0.jar
[ERROR] urls[1] = file:/C:/Users/xxx/.m2/repository/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar
[ERROR] urls[2] = file:/C:/Users/xxx/.m2/repository/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar
[ERROR] urls[3] = file:/C:/Users/xxx/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
[ERROR] urls[4] = file:/C:/Users/xxx/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
[ERROR] urls[5] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-unixsocket/0.12/jnr-unixsocket-0.12.jar
[ERROR] urls[6] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-ffi/2.0.9/jnr-ffi-2.0.9.jar
[ERROR] urls[7] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11.jar
[ERROR] urls[8] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11-native.jar
[ERROR] urls[9] = file:/C:/Users/xxx/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
[ERROR] urls[10] = file:/C:/Users/xxx/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
[ERROR] urls[11] = file:/C:/Users/xxx/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar
[ERROR] urls[12] = file:/C:/Users/xxx/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
[ERROR] urls[13] = file:/C:/Users/xxx/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar
[ERROR] urls[14] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar
[ERROR] urls[15] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-constants/0.9.1/jnr-constants-0.9.1.jar
[ERROR] urls[16] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-enxio/0.12/jnr-enxio-0.12.jar
[ERROR] urls[17] = file:/C:/Users/xxx/.m2/repository/com/github/jnr/jnr-posix/3.0.29/jnr-posix-3.0.29.jar
[ERROR] urls[18] = file:/C:/Users/xxx/.m2/repository/org/apache/commons/commons-lang3/3.6/commons-lang3-3.6.jar
[ERROR] urls[19] = file:/C:/Users/xxx/.m2/repository/org/apache/commons/commons-text/1.1/commons-text-1.1.jar
[ERROR] urls[20] = file:/C:/Users/xxx/.m2/repository/org/json/json/20140107/json-20140107.jar
[ERROR] urls[21] = file:/C:/Users/xxx/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.57/bcpkix-jdk15on-1.57.jar
[ERROR] urls[22] = file:/C:/Users/xxx/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.57/bcprov-jdk15on-1.57.jar
[ERROR] urls[23] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/plugins/maven-assembly-plugin/3.1.0/maven-assembly-plugin-3.1.0.jar
[ERROR] urls[24] = file:/C:/Users/xxx/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[25] = file:/C:/Users/xxx/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[26] = file:/C:/Users/xxx/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[27] = file:/C:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[28] = file:/C:/Users/xxx/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[29] = file:/C:/Users/xxx/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[30] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.0.1/maven-common-artifact-filters-3.0.1.jar
[ERROR] urls[31] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.1.0/maven-shared-utils-3.1.0.jar
[ERROR] urls[32] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.9.0/maven-artifact-transfer-0.9.0.jar
[ERROR] urls[33] = file:/C:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-archiver/3.5/plexus-archiver-3.5.jar
[ERROR] urls[34] = file:/C:/Users/xxx/.m2/repository/org/apache/commons/commons-compress/1.14/commons-compress-1.14.jar
[ERROR] urls[35] = file:/C:/Users/xxx/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
[ERROR] urls[36] = file:/C:/Users/xxx/.m2/repository/org/tukaani/xz/1.6/xz-1.6.jar
[ERROR] urls[37] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/file-management/3.0.0/file-management-3.0.0.jar
[ERROR] urls[38] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-shared-io/3.0.0/maven-shared-io-3.0.0.jar
[ERROR] urls[39] = file:/C:/Users/xxx/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
[ERROR] urls[40] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/shared/maven-filtering/3.1.1/maven-filtering-3.1.1.jar
[ERROR] urls[41] = file:/C:/Users/xxx/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[42] = file:/C:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-io/3.0.0/plexus-io-3.0.0.jar
[ERROR] urls[43] = file:/C:/Users/xxx/.m2/repository/org/apache/maven/maven-archiver/3.2.0/maven-archiver-3.2.0.jar
[ERROR] urls[44] = file:/C:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar
[ERROR] urls[45] = file:/C:/Users/xxx/.m2/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar
[ERROR] urls[46] = file:/C:/Users/xxx/.m2/repository/org/yaml/snakeyaml/1.18/snakeyaml-1.18.jar
[ERROR] urls[47] = file:/C:/Users/xxx/.m2/repository/com/google/guava/guava/23.0-android/guava-23.0-android.jar
[ERROR] urls[48] = file:/C:/Users/xxx/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
[ERROR] urls[49] = file:/C:/Users/xxx/.m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar
[ERROR] urls[50] = file:/C:/Users/xxx/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
[ERROR] urls[51] = file:/C:/Users/xxx/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
[ERROR] urls[52] = file:/C:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.24/plexus-interpolation-1.24.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.fusesource.jansi.Ansi$Color
-----------------------------------------------------   at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:169)
    ... 12 more
Caused by: java.lang.NoClassDefFoundError: org/fusesource/jansi/Ansi$Color
    at io.fabric8.maven.docker.util.AnsiLogger.<clinit>(AnsiLogger.java:35)
    at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:209)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    ... 12 more
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.Ansi$Color
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 15 more

Info

  • d-m-p version : 0.26.0
  • Maven version (mvn -v) :
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: C:\Users\xx\work\sources\xxx\EMBEDDED
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_171\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
  • Docker version :
Client:
 Version:       17.12.1-ce
 API version:   1.35
 Go version:    go1.9.4
 Git commit:    7390fc6
 Built: Tue Feb 27 22:13:43 2018
 OS/Arch:       linux/amd64

Server:
 Engine:
  Version:      17.12.1-ce
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   7390fc6
  Built:        Tue Feb 27 22:20:43 2018
  OS/Arch:      linux/amd64
  Experimental: false
  • If it's a bug, how to reproduce :
    Just run clean install in eclipse maven build.

Most helpful comment

I use an external maven 3.5.3 in Eclipse Photon for a workaround, and it works fine. It its the embedded maven 3.5.3 that is not working correctly with the plugin.

All 5 comments

Same problem.

Me three. This is a show-stopper for me to go to Photon.

Got the same problem here, but the problem is in Maven. The error happens in Photon with embedded Maven, version 3.5.3.

Tested with Maven 3.3.9, one before, and Maven 3.5.4. last one, and the plugin is working as intended.
Anyone can confirm this for me? Need to make sure to share this information to the developers here.

I use an external maven 3.5.3 in Eclipse Photon for a workaround, and it works fine. It its the embedded maven 3.5.3 that is not working correctly with the plugin.

On Mac with external maven 3.5.3 and d-m-p version : 0.26.0
IT WORKED. It was a simple Docker image build.
It was being caused by embedded maven. thanks for pointing that out.

error
ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.26.0:build (default-cli) on project zusteller: Execution default-cli of goal io.fabric8:docker-maven-plugin:0.26.0:build failed: A required class was missing while executing io.fabric8:docker-maven-plugin:0.26.0:build: org/fusesource/jansi/Ansi$Color [ERROR]

Was this page helpful?
0 / 5 - 0 ratings