I'm currently working with maven-site-plugin using Maven 3.
The plugin is generating all the report as expected but due to my project layout (shown below), the main site shown does not show the reports. Can anyone advise how we can have the content shared or add links to show how links can be put in site.xml to show the content. Thanks
The site\site.xml file looks like this.
<project name="MyProject">
<body>`enter code here`
<links>
<item name="My Site" href="http://hp.com" />
</links>
<menu name="Projects" inherit="top">
<item name="Description and Usage" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
<menu ref="reports"/>
</body>
</project>
Running the site is not a problem, the site appears but none of the links are working and the reports are not visible. I assume this is because my project setup is not standard. I have the following setup
PARENT_PROJECT
-pom.xml (this is where maven-site-plugin is defined and used)
-src
site
site.xml
-target (all reports are here inc a index.html)
---x EAR Project
pom.xml
target (all reports are here inc a index.html)
---x WEBAPP Project
pom.xml
target (all reports are here inc a index.html)
---x JAR Project
pom.xml
target (all reports are here inc a index.html)
For some unknown reason, when I run site:run and enter "localhost:8080", the index.html from the EAR\target\index.html is appearing and not the PARENT_PROJECT\target\index.html file?
Note that mvn:site is run from the PARENT_PROJECT
Changed the POM to include
<site>
<id>nexus</id>
<name>site</name>
<url>http://localhost:8080</url>
</site>
As its a multi project, running site:stage now as suggested here http://maven.apache.org/plugins/maven-site-plugin/faq.html but noticed that I cannot run the project as maven states that "What "mvn site" will do for you, in a multi-project build, is to run "mvn site" for the parent and all its modules individually. The links between parent and child will not work here. They will however work when you deploy the site."