Re: Crashes while running "Maven In Five Minutes"

2018-12-07 Thread Hervé BOUTEMY
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: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Copying dependencies (including reactor modules)

2018-12-07 Thread matteosilv
This is the exact same behavior i need to acomplish, but i can't do it after
package phase, because i need the dependencies (excluding the ones that are
projects in my multi-module build) in a specific folder in order to run a
development server.

It's pretty weird imho, that, when excluding a groupId, the plugin still
tries to download dependencies with that groupId, even if later it is going
to exclude them!



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



shade-plugin: different result based on order of filters

2018-12-07 Thread Chesnay Schepler
The Apache Flink project has run into an unexpected behavior when using 
the maven-shade-plugin.


In one of our modules we define 2 filters:

   

*

META-INF/maven/org.weakref/**



com.facebook.presto.hadoop:hadoop-apache2

com/facebook/presto/hadoop/**


   

Basically, the first filters removes a bit of noise, and the second 
includes a specific set of classes from a specific artifact.
The full pom.xml can be found here: 
https://github.com/apache/flink/blob/b765e0774c585b02f5906370e245028b15c8fda2/flink-filesystems/flink-s3-fs-presto/pom.xml#L262


With the configuration above the files that should be included based on 
the second filter are missing from the jar. (in fact, everything from 
hadoop-apache2 is missing)

However, if we reverse the filter order they are contained in the jar.

My question would be whether someone has seen something similar to this 
issue. I'm trying to create a small self-contained reproducing project 
but haven't succeeded so far :/