I have a project with 5 modules with sub-projects.
Project
- Module1
-pom.xml
--sub-proj1
-pom.xml
- Module2
-pom.xml
--sub-proj2
-pom.xml
- Module3
-pom.xml
--sub-proj3
-pom.xml
- Module4
-pom.xml
--sub-proj4
-pom.xml
- Module5
-pom.xml
--sub-proj5
-pom.xml
mvn site
command creates the site directories under each module. I want to stage it inside one common directory.
<site>
<id>${project.artifactId}-site</id>
<url>./</url>
</site>
The above configuration says that the absolute path has to be provided . So when i provided absolute path , the site gets pushed to the parent project /target/staging
.
The problem I am facing is that index.html
and other main .html
of parent project(Module1) is being replaced by other parent links so only the last parent project index.html
is found in the directory where site is generated . How can I fix it / specify a proper path for the site directories ?
Also how can I aggregate all the reports like javadocs, corbetura etc into one primary report.
You should try creating a parent pom (under project
) and when you run the mvn site
from there which should solve the issue.
Add this only to your parent
pom
<site>
<id>${project.artifactId}-site</id>
<url>./</url>
</site>