2

I fight at the moment with the maven-site-plugin in a multi-module project. Actually I use the default skin for all projects, but now I want change this. Because many of them are multi-module projects I use already a "build-tools" extension with the configurations for checkstyle, findbugs and so on.

My thought for the site-descriptor was now to integrate the site-descriptor also into the "build-tools". So that I must only maintain one site-descriptor for every project and module.

I tried already different approaches and configurations with the integration like build extensions or plugin dependency for the maven-site-plugin. The approaches I combined with different paths for the siteDirectory-configuration and inside the "build-tools" for the descriptor files, but nothing work. Everytime the plugin fallback to the default skin. Only the direct integration into the single projects work.

My question is now, is there a way to realize that plan or must I really integrate the site-descriptor (site.xml, etc.) in every project / parent module and maintain it separately?

Thanks and best regards apollox


UPDATE

Under the following link are two variants of an example project.

https://1drv.ms/u/s!AoIm6kXLf_KHroRFHb_zT3W6dELPKQ

In the variant "example_dependency" are the "build-tools" module integrate via dependencies in the plugins like maven-spotbugs or maven-site. The variant "example_extensions" tries the extensions mechanism of the build-tag, like the spotbugs example under https://spotbugs.github.io/spotbugs-maven-plugin/examples/multi-module-config.html

The dependency variant is buildable, but it does not found the custom site-descriptor files. For this example it is only an other site skin. I think the problem is the path definition for the site directory. Here I tried already differents variants without success.

The extension variant throw the following error at initial build, so that I can not test the way of the spotbugs example.

PS C:\Users\apollox\Desktop\example_extensions> mvn install site
[INFO] Scanning for projects...
Downloading from nexus-mirror: https://.../nexus/content/groups/public/com/example/multi-module/extensions/build-tools/0.1-SNAPSHOT/maven-metadata.xml
Downloading from nexus-mirror: https://.../nexus/content/groups/public/com/example/multi-module/extensions/build-tools/0.1-SNAPSHOT/build-tools-0.1-SNAPSHOT.pom
[WARNING] The POM for com.example.multi-module.extensions:build-tools:jar:0.1-SNAPSHOT is missing, no dependency information available
Downloading from nexus-mirror: https://.../nexus/content/groups/public/com/example/multi-module/extensions/build-tools/0.1-SNAPSHOT/build-tools-0.1-SNAPSHOT.jar
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.example.multi-module.extensions:build-tools:0.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.example.multi-module.extensions:build-tools:jar:0.1-SNAPSHOT in nexus-mirror (https://.../nexus/content/groups/public/) @
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.example.multi-module.extensions:example-progs:0.1-SNAPSHOT (C:\Users\apollox\Desktop\example_extensions\example-progs\pom.xml) has 1 error
[ERROR]     Unresolveable build extension: Plugin com.example.multi-module.extensions:build-tools:0.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.example.multi-module.extensions:build-tools:jar:0.1-SNAPSHOT in nexus-mirror (https://.../nexus/content/groups/public/) -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
apollox
  • 21
  • 3
  • Could you please supply more details or an example project like the one at: https://github.com/BITPlan/com.bitplan.multimodule In one of the example poms I saw the use of: http://maven.apache.org/plugins/maven-site-plugin/attach-descriptor-mojo.html which might be linked to your issue. – Wolfgang Fahl Aug 24 '18 at 13:21
  • Hi @WolfgangFahl, I update my post with an example project, to better describe the problem. – apollox Aug 27 '18 at 11:31

0 Answers0