Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Build fails (outdated options) #1

Open
tarnh opened this issue Oct 20, 2019 · 7 comments
Open

Build fails (outdated options) #1

tarnh opened this issue Oct 20, 2019 · 7 comments

Comments

@tarnh
Copy link

tarnh commented Oct 20, 2019

I've just tried to compile with maven 3.6.2, but option 5 seems to be no longer supported:
``
[INFO] Building libopac-sample 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: http://jcenter.bintray.com/net/opacapp/libopac/4.5.0-rc-1/libopac-4.5.0-rc-1.pom
Downloaded from central: http://jcenter.bintray.com/net/opacapp/libopac/4.5.0-rc-1/libopac-4.5.0-rc-1.pom (1.1 kB at 1.5 kB/s)
Downloading from central: http://jcenter.bintray.com/org/json/json/20090211/json-20090211.pom
Downloaded from central: http://jcenter.bintray.com/org/json/json/20090211/json-20090211.pom (1.4 kB at 20 kB/s)
Downloading from central: http://jcenter.bintray.com/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.pom
Downloaded from central: http://jcenter.bintray.com/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.pom (0 B at 0 B/s)
Downloading from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.3.6/httpmime-4.3.6.pom
Downloaded from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.3.6/httpmime-4.3.6.pom (4.8 kB at 75 kB/s)
Downloading from central: http://jcenter.bintray.com/joda-time/joda-time/2.8.2/joda-time-2.8.2.pom
Downloaded from central: http://jcenter.bintray.com/joda-time/joda-time/2.8.2/joda-time-2.8.2.pom (29 kB at 350 kB/s)
Downloading from central: http://jcenter.bintray.com/net/opacapp/libopac/4.5.0-rc-1/libopac-4.5.0-rc-1.jar
Downloading from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar
Downloading from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.3.6/httpmime-4.3.6.jar
Downloading from central: http://jcenter.bintray.com/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar
Downloading from central: http://jcenter.bintray.com/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
Downloaded from central: http://jcenter.bintray.com/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar (0 B at 0 B/s)
Downloading from central: http://jcenter.bintray.com/joda-time/joda-time/2.8.2/joda-time-2.8.2.jar
Downloaded from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.3.6/httpmime-4.3.6.jar (37 kB at 213 kB/s)
Downloading from central: http://jcenter.bintray.com/org/json/json/20090211/json-20090211.jar
Downloaded from central: http://jcenter.bintray.com/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar (62 kB at 345 kB/s)
Downloaded from central: http://jcenter.bintray.com/org/json/json/20090211/json-20090211.jar (46 kB at 181 kB/s)
Downloaded from central: http://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar (283 kB at 1.0 MB/s)
Downloaded from central: http://jcenter.bintray.com/net/opacapp/libopac/4.5.0-rc-1/libopac-4.5.0-rc-1.jar (342 kB at 217 kB/s)
Downloaded from central: http://jcenter.bintray.com/joda-time/joda-time/2.8.2/joda-time-2.8.2.jar (622 kB at 352 kB/s)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ libopac-sample ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /work/bibo/libopac-sample-mvn-master/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ libopac-sample ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /work/bibo/libopac-sample-mvn-master/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.773 s
[INFO] Finished at: 2019-10-20T20:34:35+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project libopac-sample: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@raphaelm
Copy link
Member

I just tried to reproduce this, and it did not occur for me. I also can't see that we're specifying a java compiler version anywhere in this repository, so I assume it is a problem with your environment.

@tarnh
Copy link
Author

tarnh commented Oct 21, 2019

@raphaelm Please just tell me what's the maximum JDK supported.

I use both OpenJDK Java 13 and 11.

@raphaelm
Copy link
Member

I think I tested it with JDK 8 earlier, but I don't see why newer ones shouldn't be supported.

@tarnh
Copy link
Author

tarnh commented Oct 21, 2019

Ich auch nicht. Wärst du so nett, und würdest mir das Maven oder das Gradle-Beispiel mit JDK 8 zu einem jar kompilieren?

@raphaelm
Copy link
Member

Sorry, ich hab leider gerade keine Zeit mich damit tiefer zu beschäftigen

@hilbert-ralf
Copy link

hilbert-ralf commented Aug 21, 2020

Hallo @raphaelm & @tarnh,
nachdem ich http://jcenter.bintray.com zu https://jcenter.bintray.com geändert habe (http wird hier nicht mehr unterstützt) komme ich zum gleichen Problem:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors 
[INFO] -------------------------------------------------------------

Interessanterweise sehe ich keine Definitionen die hierraus hinweisen, seltsam.

@StefRe StefRe mentioned this issue Mar 2, 2021
@StefRe
Copy link

StefRe commented Mar 2, 2021

If you're using an older compile plugin you may need to specify source and target java versions like that:

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

The current plugin version 3.8.1 should work with defaults though. See also documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants