Crashes while running "Maven In Five Minutes"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Crashes while running "Maven In Five Minutes"

Steve Ramage
If I follow the steps listed here (https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html) : 



mkdir scratch; pushd scratch; mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false; cd my-app; mvn package; mvn clean dependency:copy-dependencies package; mvn site



I get several crashes. The first of which is:



[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :  
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
 

Even if I fix that error I get another error later.



[INFO] ----------------------< com.mycompany.app:my-app >----------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]  
[INFO] --- maven-site-plugin:3.3:site (default-site) @ my-app ---
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING]  
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]  
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0
[WARNING] Error injecting: org.apache.maven.report.projectinfo.CiManagementReport
java.lang.NoClassDefFoundError: org/apache/maven/doxia/siterenderer/DocumentContent
    at java.lang.Class.getDeclaredConstructors0 (Native Method)
    at java.lang.Class.privateGetDeclaredConstructors (Class.java:3138)
    at java.lang.Class.getDeclaredConstructors (Class.java:2358)
    at com.google.inject.spi.InjectionPoint.forConstructorOf (InjectionPoint.java:245)
...
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
    at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.getConfiguredMavenReport (DefaultMavenReportExecutor.java:306)
    at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin (DefaultMavenReportExecutor.java:263)
    at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports (DefaultMavenReportExecutor.java:154)
    at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports (AbstractSiteRenderingMojo.java:235)
    at org.apache.maven.plugins.site.SiteMojo.execute (SiteMojo.java:121)
...
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
...
 



$mvn --version

Apache Maven 3.6.0 (NON-CANONICAL_2018-11-06T03:14:22+01:00_root; 2018-11-05T18:14:22-08:00)
Maven home: /opt/maven
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-11-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.14.84-1-lts", arch: "amd64", family: "unix"

Anyway I think the generated archetype should actually work with the maven version I'm using (especially because the advice on getting help is to run the latest), or failing that the Getting Started Guide should include the descriptions on how to fix them, imho.

Cheers,

Steve Ramage
Reply | Threaded
Open this post in threaded view
|

Re: Crashes while running "Maven In Five Minutes"

michaelo
Am 2018-12-03 um 15:56 schrieb Steve Ramage:> If I follow the steps
listed here
(https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)
:
 >
 >
 >
 > mkdir scratch; pushd scratch; mvn archetype:generate
-DgroupId=com.mycompany.app -DartifactId=my-app
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false; cd my-app; mvn package; mvn clean
dependency:copy-dependencies package; mvn site
 >
 >
 >
 > I get several crashes. The first of which is:
 >
 >
 >
 > [INFO] -------------------------------------------------------------
 > [ERROR] COMPILATION ERROR :
 > [INFO] -------------------------------------------------------------
 > [ERROR] Source option 5 is no longer supported. Use 6 or later.
 > [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
 >
 >
 > Even if I fix that error I get another error later.
 >
 >
 >
 > [INFO] ----------------------< com.mycompany.app:my-app
 >----------------------
 > [INFO] Building my-app 1.0-SNAPSHOT
 > [INFO] --------------------------------[ jar
]---------------------------------
 > [INFO]
 > [INFO] --- maven-site-plugin:3.3:site (default-site) @ my-app ---
 > [WARNING] Report plugin
org.apache.maven.plugins:maven-project-info-reports-plugin has an empty
version.
 > [WARNING]
 > [WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
 > [WARNING]
 > [WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
 > [INFO] configuring report plugin
org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0
 > [WARNING] Error injecting:
org.apache.maven.report.projectinfo.CiManagementReport
 > java.lang.NoClassDefFoundError:
org/apache/maven/doxia/siterenderer/DocumentContent
 >      at java.lang.Class.getDeclaredConstructors0 (Native Method)
 >      at java.lang.Class.privateGetDeclaredConstructors (Class.java:3138)
 >      at java.lang.Class.getDeclaredConstructors (Class.java:2358)
 >      at com.google.inject.spi.InjectionPoint.forConstructorOf
(InjectionPoint.java:245)
 > ...
 >      at
org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo
(DefaultMavenPluginManager.java:520)
 >      at
org.apache.maven.reporting.exec.DefaultMavenReportExecutor.getConfiguredMavenReport
(DefaultMavenReportExecutor.java:306)
 >      at
org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin
(DefaultMavenReportExecutor.java:263)
 >      at
org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports
(DefaultMavenReportExecutor.java:154)
 >      at
org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports
(AbstractSiteRenderingMojo.java:235)
 >      at org.apache.maven.plugins.site.SiteMojo.execute
(SiteMojo.java:121)
 > ...
 >      at org.codehaus.plexus.classworlds.launcher.Launcher.main
(Launcher.java:356)
 > Caused by: java.lang.ClassNotFoundException:
org.apache.maven.doxia.siterenderer.DocumentContent
 >      at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass
(SelfFirstStrategy.java:50)
 > ...
 >
 >
 >
 >
 > $mvn --version
 >
 > Apache Maven 3.6.0 (NON-CANONICAL_2018-11-06T03:14:22+01:00_root;
2018-11-05T18:14:22-08:00)
 > Maven home: /opt/maven
 > Java version: 11.0.1, vendor: Oracle Corporation, runtime:
/usr/lib/jvm/java-11-openjdk
 > Default locale: en_US, platform encoding: UTF-8
 > OS name: "linux", version: "4.14.84-1-lts", arch: "amd64", family: "unix"
 >
 > Anyway I think the generated archetype should actually work with the
maven version I'm using (especially because the advice on getting help
is to run the latest), or failing that the Getting Started Guide should
include the descriptions on how to fix them, imho.

Please file an issue with MNGSITE.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Crashes while running "Maven In Five Minutes"

Hervé BOUTEMY
In reply to this post by Steve Ramage
Thank you for the report: yes, this should be improved to work in current
latest version of everything

I updated the command line to use version 1.3 of maven-archetype-quickstart,
which is the latest version and compiles with Java 7 target.

Unfortunately, when build with Java 11, the build now fails during tests with
a known NPE issue: we need a new version of the archetype with updated maven-
surefire-plugin versions that has this issue fixed (I just created
MARCHETYPES-63 [1] to track the fix)...

Once the version 1.4 of the archetype will be released, we'll have to update
the documentation.

While waiting the updated archetype, don't hesitate to use the "edit" button
in the breadcrumb and provide a Pull Request to explain about the current
failure with Java 11 that will be fixed soon...

Regards,

Hervé

[1] https://issues.apache.org/jira/browse/MARCHETYPES-63

Le lundi 3 décembre 2018, 15:56:27 CET Steve Ramage a écrit :

> If I follow the steps listed here
> (https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
> ) :
>
>
>
> mkdir scratch; pushd scratch; mvn archetype:generate
> -DgroupId=com.mycompany.app -DartifactId=my-app
> -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false;
> cd my-app; mvn package; mvn clean dependency:copy-dependencies package; mvn
> site
>
>
>
> I get several crashes. The first of which is:
>
>
>
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :  
> [INFO] -------------------------------------------------------------
> [ERROR] Source option 5 is no longer supported. Use 6 or later.
> [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
>
>
> Even if I fix that error I get another error later.
>
>
>
> [INFO] ----------------------< com.mycompany.app:my-app
> >---------------------- [INFO] Building my-app 1.0-SNAPSHOT
> [INFO] --------------------------------[ jar
> ]--------------------------------- [INFO]
> [INFO] --- maven-site-plugin:3.3:site (default-site) @ my-app ---
> [WARNING] Report plugin
> org.apache.maven.plugins:maven-project-info-reports-plugin has an empty
> version. [WARNING]
> [WARNING] It is highly recommended to fix these problems because they
> threaten the stability of your build. [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support
> building such malformed projects. [INFO] configuring report plugin
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0 [WARNING]
> Error injecting: org.apache.maven.report.projectinfo.CiManagementReport
> java.lang.NoClassDefFoundError:
> org/apache/maven/doxia/siterenderer/DocumentContent at
> java.lang.Class.getDeclaredConstructors0 (Native Method)
>     at java.lang.Class.privateGetDeclaredConstructors (Class.java:3138)
>     at java.lang.Class.getDeclaredConstructors (Class.java:2358)
>     at com.google.inject.spi.InjectionPoint.forConstructorOf
> (InjectionPoint.java:245) ...
>     at
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMoj
> o (DefaultMavenPluginManager.java:520) at
> org.apache.maven.reporting.exec.DefaultMavenReportExecutor.getConfiguredMav
> enReport (DefaultMavenReportExecutor.java:306) at
> org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugi
> n (DefaultMavenReportExecutor.java:263) at
> org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReport
> s (DefaultMavenReportExecutor.java:154) at
> org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports
> (AbstractSiteRenderingMojo.java:235) at
> org.apache.maven.plugins.site.SiteMojo.execute (SiteMojo.java:121) ...
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:356) Caused by: java.lang.ClassNotFoundException:
> org.apache.maven.doxia.siterenderer.DocumentContent at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass
> (SelfFirstStrategy.java:50) ...
>
>
>
>
> $mvn --version
>
> Apache Maven 3.6.0 (NON-CANONICAL_2018-11-06T03:14:22+01:00_root;
> 2018-11-05T18:14:22-08:00) Maven home: /opt/maven
> Java version: 11.0.1, vendor: Oracle Corporation, runtime:
> /usr/lib/jvm/java-11-openjdk Default locale: en_US, platform encoding:
> UTF-8
> OS name: "linux", version: "4.14.84-1-lts", arch: "amd64", family: "unix"
>
> Anyway I think the generated archetype should actually work with the maven
> version I'm using (especially because the advice on getting help is to run
> the latest), or failing that the Getting Started Guide should include the
> descriptions on how to fix them, imho.
>
> Cheers,
>
> Steve Ramage





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Crashes while running "Maven In Five Minutes"

Bernd Eckenfels
I did: https://github.com/apache/maven-site/pull/57

BTW: should Maybe the minimal Java Version in the generated pom be an parameter or depend on the currently used runtime?

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Hervé BOUTEMY
Gesendet: Samstag, 8. Dezember 2018 01:51
An: Maven Users List
Betreff: Re: Crashes while running "Maven In Five Minutes"

Thank you for the report: yes, this should be improved to work in current
latest version of everything

I updated the command line to use version 1.3 of maven-archetype-quickstart,
which is the latest version and compiles with Java 7 target.

Unfortunately, when build with Java 11, the build now fails during tests with
a known NPE issue: we need a new version of the archetype with updated maven-
surefire-plugin versions that has this issue fixed (I just created
MARCHETYPES-63 [1] to track the fix)...

Once the version 1.4 of the archetype will be released, we'll have to update
the documentation.

While waiting the updated archetype, don't hesitate to use the "edit" button
in the breadcrumb and provide a Pull Request to explain about the current
failure with Java 11 that will be fixed soon...

Reply | Threaded
Open this post in threaded view
|

Re: Crashes while running "Maven In Five Minutes"

Hervé BOUTEMY
thank you, merged

regarding setting target Java Version as parameter, in theory this is a good
idea, but in practice, IMHO it makes the archetype more complex: people will
modify pom.xml when they want

Regards,

Hervé

Le dimanche 9 décembre 2018, 07:02:52 CET Bernd Eckenfels a écrit :
> I did: https://github.com/apache/maven-site/pull/57
>
> BTW: should Maybe the minimal Java Version in the generated pom be an
> parameter or depend on the currently used runtime?
>
> Gruss
> Bernd





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]