#10771: maven does not build with java 10
-----------------------------+------------------------------
 Reporter:  pierre.labastie  |       Owner:  pierre.labastie
     Type:  defect           |      Status:  assigned
 Priority:  normal           |   Milestone:  8.3
Component:  BOOK             |     Version:  SVN
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by pierre.labastie):

 Maven uses java version at some places, and the format of the java version
 has changed when moving to java 10...
 So it fails when running the tests (surefire returns a NullPointer
 exception when trying to access the version of the jdk). It can be
 corrected by moving to a more recent version of surefire, adding
 <version>2.21.0</version> at the right place in pom.xml.
 {{{
 sed '/-surefire-/a<version>2.21.0</version>' \
     -i pom.xml
 }}}
 This allows to fix the error, but the build fails later with:
 {{{
 [INFO] Reactor Summary:
 [INFO]
 [INFO] Apache Maven 3.5.3 ................................. SUCCESS [
 3.420 s]
 [INFO] Maven Model ........................................ SUCCESS [
 8.287 s]
 [INFO] Maven Artifact ..................................... SUCCESS [
 4.086 s]
 [INFO] Maven Plugin API ................................... SUCCESS [
 3.026 s]
 [INFO] Maven Builder Support .............................. SUCCESS [
 1.429 s]
 [INFO] Maven Model Builder ................................ SUCCESS [
 7.288 s]
 [INFO] Maven Settings ..................................... SUCCESS [
 0.701 s]
 [INFO] Maven Settings Builder ............................. SUCCESS [
 1.822 s]
 [INFO] Maven Repository Metadata Model .................... SUCCESS [
 0.502 s]
 [INFO] Maven Artifact Resolver Provider ................... SUCCESS [
 6.585 s]
 [INFO] Maven Core ......................................... SUCCESS [
 25.330 s]
 [INFO] Maven SLF4J Simple Provider ........................ SUCCESS [
 4.737 s]
 [INFO] Maven Embedder ..................................... FAILURE [
 4.777 s]
 [INFO] Maven Compat ....................................... SKIPPED
 [INFO] Apache Maven Distribution 3.5.3 .................... SKIPPED
 [INFO]
 ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO]
 ------------------------------------------------------------------------
 [INFO] Total time: 01:12 min
 [INFO] Finished at: 2018-05-15T17:54:59+02:00
 [INFO]
 ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
 plugin:2.21.0:test (default-test) on project maven-embedder: There are
 test failures.
 [ERROR]
 [ERROR] Please refer to /sources/maven/apache-maven-3.5.3/maven-
 embedder/target/surefire-reports for the individual test results.
 [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump,
 [date].dumpstream and [date]-jvmRun[N].dumpstream.
 [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
 [ERROR]
 [ERROR] After correcting the problems, you can resume the build with the
 command
 [ERROR]   mvn <goals> -rf :maven-embedder
 }}}
 It is again a problem with Java version, but now in another module. The
 following sed allows to build:
 {{{
 sed '/<commonsLang/s/3\.5/3.7/' \
     -i pom.xml
 }}}

--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/10771#comment:2>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to