I have a multi module application, and I’m trying to generate a Maven site for this app.
I have an aggregating POM that holds all the child modules, an inheritance PO
It's over a year now since the last solution.
I did not like this workaround, there has to be another solution "the maven way".
So here it is:
In the Maven Site Plugin FAQ: http://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url
"On the other hand, the is used in a multi-module build to construct relative links [...]. In a multi module build it is important for the parent and child modules to have different URLs."
You must declare the
Parent POM:
mysite
My Site
ftp://server.example.com/htdocs/site/
Child One POM:
mysite
My Site
ftp://server.example.com/htdocs/site/one/
Child Two POM:
mysite
My Site
ftp://server.example.com/htdocs/site/two/
Now the generation of the site, and the staging works as requested. The staged site is generated in parent/target/staging
You can submit another staging directory with -D
mvn -DstagingDirectory=D:/Temp/Site package site site:stage
Note: goal package is needed, if child two has child one as dependency. With package, the goal site is executed without the error that a dependency is missing in the repository.
Edit: It is necessary to provide a