You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/04/25 18:02:00 UTC

[jira] [Commented] (MPIR-400) mvn -pl . clean site site:stage fails when extensions are part of pom.xml

    [ https://issues.apache.org/jira/browse/MPIR-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17331600#comment-17331600 ] 

Michael Osipov commented on MPIR-400:
-------------------------------------

First of all, the child module is missing a relative path for the parent. Otherwise it suffers from a chicken and egg problem.

This is a bug in Maven 3.6.3. See here:
{noformat}
osipovmi@deblndw013x:~/var/Projekte/example/parent-module
$ ~/apache-maven-3.6.3/bin/mvn clean site site:stage -pl .
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.example:parent-module >----------------------
[INFO] Building Parent-Module 1.0.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ parent-module ---
[INFO] Deleting /var/osipovmi/Projekte/example/parent-module/target
[INFO]
[INFO] --- maven-site-plugin:3.9.1:site (default-site) @ parent-module ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.1
[INFO] 16 reports detected for maven-project-info-reports-plugin:3.1.1: ci-management, dependencies, dependency-convergence, dependency-info, dependency-management, distribution-management, index, issue-management, licenses, mailing-lists, modules, plugin-management, plugins, scm, summary, team
[INFO] Rendering site with default locale English (en)
[WARNING] Module ../child-module not found in reactor: loading locally
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
[INFO] Generating "Dependency Convergence" report --- maven-project-info-reports-plugin:3.1.1:dependency-convergence
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:3.1.1:dependency-info
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:3.1.1:distribution-management
[INFO] Generating "About" report         --- maven-project-info-reports-plugin:3.1.1:index
[WARNING] Module ../child-module not found in reactor: loading locally
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.142 s
[INFO] Finished at: 2021-04-25T19:58:51+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.9.1:site (default-site) on project parent-module: Error generating maven-project-info-reports-plugin:3.1.1:index report: NullPointerException -> [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/MojoExecutionException
osipovmi@deblndw013x:~/var/Projekte/example/parent-module
$ ~/apache-maven-3.6.3/bin/mvn -V clean site site:stage -pl .
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /net/home/osipovmi/apache-maven-3.6.3
Java version: 1.8.0_282, vendor: OpenJDK BSD Porting Team, runtime: /usr/local/openjdk8/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "freebsd", version: "12.2-stable", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.example:parent-module >----------------------
[INFO] Building Parent-Module 1.0.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ parent-module ---
[INFO] Deleting /var/osipovmi/Projekte/example/parent-module/target
[INFO]
[INFO] --- maven-site-plugin:3.9.1:site (default-site) @ parent-module ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.1
[INFO] 16 reports detected for maven-project-info-reports-plugin:3.1.1: ci-management, dependencies, dependency-convergence, dependency-info, dependency-management, distribution-management, index, issue-management, licenses, mailing-lists, modules, plugin-management, plugins, scm, summary, team
[INFO] Rendering site with default locale English (en)
[WARNING] Module ../child-module not found in reactor: loading locally
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
[INFO] Generating "Dependency Convergence" report --- maven-project-info-reports-plugin:3.1.1:dependency-convergence
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:3.1.1:dependency-info
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:3.1.1:distribution-management
[INFO] Generating "About" report         --- maven-project-info-reports-plugin:3.1.1:index
[WARNING] Module ../child-module not found in reactor: loading locally
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.108 s
[INFO] Finished at: 2021-04-25T19:59:02+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.9.1:site (default-site) on project parent-module: Error generating maven-project-info-reports-plugin:3.1.1:index report: NullPointerException -> [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/MojoExecutionException
osipovmi@deblndw013x:~/var/Projekte/example/parent-module
$ ~/apache-maven/bin/mvn -V clean site site:stage -pl .
Apache Maven 4.0.0-alpha-1-SNAPSHOT (1a65351b43bb09e78f9408c7e579b1951fe6e1bc)
Maven home: /net/home/osipovmi/apache-maven
Java version: 1.8.0_282, vendor: OpenJDK BSD Porting Team, runtime: /usr/local/openjdk8/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "freebsd", version: "12.2-stable", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for 'org.epics:camel-activemq:jar:1.0.0-SNAPSHOT'
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 68, column 15
[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.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Parent-Module                                                      [pom]
[INFO] Child-Module                                                       [jar]
[INFO]
[INFO] ---------------------< com.example:parent-module >----------------------
[INFO] Building Parent-Module 1.0.0-SNAPSHOT                              [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[WARNING] Version not locked for default bindings plugins [maven-clean-plugin], you should define versions in pluginManagement section of your pom.xml or parent
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ parent-module ---
[INFO] Deleting /var/osipovmi/Projekte/example/parent-module/target
[INFO]
[INFO] --- maven-site-plugin:3.9.1:site (default-site) @ parent-module ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.1
[INFO] 16 reports detected for maven-project-info-reports-plugin:3.1.1: ci-management, dependencies, dependency-convergence, dependency-info, dependency-management, distribution-management, index, issue-management, licenses, mailing-lists, modules, plugin-management, plugins, scm, summary, team
[INFO] Rendering site with default locale English (en)
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
[INFO] Generating "Dependency Convergence" report --- maven-project-info-reports-plugin:3.1.1:dependency-convergence
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:3.1.1:dependency-info
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:3.1.1:distribution-management
[INFO] Generating "About" report         --- maven-project-info-reports-plugin:3.1.1:index
[INFO] Generating "Project Modules" report --- maven-project-info-reports-plugin:3.1.1:modules
[INFO] Generating "Plugin Management" report --- maven-project-info-reports-plugin:3.1.1:plugin-management
[INFO] Generating "Plugins" report       --- maven-project-info-reports-plugin:3.1.1:plugins
[INFO] Generating "Summary" report       --- maven-project-info-reports-plugin:3.1.1:summary
[INFO]
[INFO] --- maven-site-plugin:3.9.1:stage (default-cli) @ parent-module ---
[INFO] Using this base directory for staging: /var/osipovmi/Projekte/example/parent-module/target/staging
[INFO] Pushing /var/osipovmi/Projekte/example/parent-module/target/site
[INFO]    >>> to file:///var/osipovmi/Projekte/example/parent-module/target/staging/./
[INFO]
[INFO] ----------------------< com.example:child-module >----------------------
[INFO] Building Child-Module 1.0.0-SNAPSHOT                               [2/2]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] Version not locked for default bindings plugins [maven-clean-plugin], you should define versions in pluginManagement section of your pom.xml or parent
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ child-module ---
[INFO] Deleting /var/osipovmi/Projekte/example/child-module/target
[INFO]
[INFO] --- maven-site-plugin:3.9.1:site (default-site) @ child-module ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.1
[INFO] 15 reports detected for maven-project-info-reports-plugin:3.1.1: ci-management, dependencies, dependency-info, dependency-management, distribution-management, index, issue-management, licenses, mailing-lists, modules, plugin-management, plugins, scm, summary, team
[INFO] Rendering site with default locale English (en)
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:3.1.1:dependency-info
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:3.1.1:distribution-management
[INFO] Generating "About" report         --- maven-project-info-reports-plugin:3.1.1:index
[INFO] Generating "Plugin Management" report --- maven-project-info-reports-plugin:3.1.1:plugin-management
[INFO] Generating "Plugins" report       --- maven-project-info-reports-plugin:3.1.1:plugins
[INFO] Generating "Summary" report       --- maven-project-info-reports-plugin:3.1.1:summary
[INFO]
[INFO] --- maven-site-plugin:3.9.1:stage (default-cli) @ child-module ---
[INFO] Using this base directory for staging: /var/osipovmi/Projekte/example/parent-module/target/staging
[INFO] Pushing /var/osipovmi/Projekte/example/child-module/target/site
[INFO]    >>> to file:///var/osipovmi/Projekte/example/parent-module/target/staging/../child-module
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Parent-Module 1.0.0-SNAPSHOT:
[INFO]
[INFO] Parent-Module ...................................... SUCCESS [  2.751 s]
[INFO] Child-Module ....................................... SUCCESS [  0.380 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.524 s
[INFO] Finished at: 2021-04-25T19:59:13+02:00
[INFO] ------------------------------------------------------------------------
{noformat}

[~martinkanters], [~mthmulders], any idea which JIRA issue in Maven might have fixed this?

> mvn -pl . clean site site:stage fails when extensions are part of pom.xml
> -------------------------------------------------------------------------
>
>                 Key: MPIR-400
>                 URL: https://issues.apache.org/jira/browse/MPIR-400
>             Project: Maven Project Info Reports Plugin
>          Issue Type: Bug
>          Components: index, modules
>    Affects Versions: 3.0.0, 3.1.0, 3.1.1
>         Environment: Apache Maven Version: 3.6.3
> Java version: 1.8.0_251, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_251\jre
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Marwa Khabbaz
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>         Attachments: error_log.txt, example.zip, pom_aggregator.xml, pom_sub-module.xml
>
>
> I have a project consisting of an aggregator and a submodule, which inherits directly from the aggregator. I have the following scenarios:
>  * When I execute {{mvn clean site site:stage}} (without {{-pl .}}), the build is successful.
>  * When I leave out the extensions out of the {{pom.xml}}-file of my aggregator and execute the {{mvn -pl . clean site site:stage}}, the build is successful.
>  * When I put in extensions to the {{pom.xml}}-file of my aggregator but leave out the reports for {{index}} and {{modules}} (the only sites that refer to my submodule) by explicitly defining the report set in the {{pom.xml}}-file of the aggregator, the build is successful.
>  * As soon as I put extensions into the {{pom.xml}}-file of my aggregator and leave in the reports for {{index}} and {{modules}}, then execute the build {{mvn -pl . clean site site:stage}} for the aggregator, the build fails with a {{NullPointerException}}.
> I attached the error log of the last scenario and the {{pom.xml}} of the aggregator and its submodule to this ticket. This has never been a problem until the release of {{maven-project-info-reports-plugin 3.0.0}}.
> Hopefully I managed to understandably describe my issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)