fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 643 forks source link

0.14.0 not supported for Java 6? #396

Open Khazrak opened 8 years ago

Khazrak commented 8 years ago

When I bumped up the version of the plugin and ran a docker:start I got this error:

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.14.0:start (default-cli) on project my-volume: 
Execution default-cli of goal io.fabric8:docker-maven-plugin:0.14.0:start failed: Unable to load the mojo 'start' in the plugin 'io.fabric8:docker-maven-plugin:0.14.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
io/fabric8/maven/docker/StartMojo : Unsupported major.minor version 51.0

I have this Java version:

java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)

When running it with Java 8 it worked perfectly

rhuss commented 8 years ago

The build infrastructure has changed so it could be that there has been a change in the compiler setting. d-m-p doesn't use any particular Java 8 feature, it is intended to work at least with Java 7. That it has worked with Java 6 was probably luck ;-)

Can you confirm that 0.13.9 worked with Maven and Java 6 (confirmed with mvn -version) ?

Khazrak commented 8 years ago

Hmm, we probably had some luck before. Now even 0.13.[6-9] doesn't work anymore with java 6. But it works with Java 7 so we just have to compile the Java code with 6 and switch to 7 when we do the docker build (we have problems with in our legacy code)

rhuss commented 8 years ago

Coud you try 0.14.1, too ? This has been done with our new build infrastructure, unfortunately I don't know for sure with which jdk it was compiled.

I will pin the language level to Java 1.7 so for the next release, even when the plugin is compiled with Java 8 it should still work with Java 7.

rhuss commented 8 years ago

Just verified: The plugin is and was targeted to Java 1.7 from the very beginning, so there shouldn't be any changed behaviour (even if it happened to be compiled under Jdk1.8, which btw was already the case for the other versions).