Apply fixes for MAVEN-584 and MAVEN-574.

Thanks Rafal!!


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion 2003-07-21 01:13:52 +00:00
parent 7efbc47edc
commit 59527fb5c0
5 changed files with 35 additions and 6 deletions

View File

@ -50,7 +50,7 @@
<!-- copy each project over into ${maven.docs.dest} -->
<j:forEach var="reactorProject" items="${reactorProjects}">
<!-- note this is the same name as is generated in the navigation-aggregate.xml -->
<j:set var="directory" value="${maven.docs.dest}/multiproject/${reactorProject.name}"/>
<j:set var="directory" value="${maven.docs.dest}/${maven.multiproject.aggregateDir}${reactorProject.artifactId}"/>
<mkdir dir="${directory}"/>
<!--
${reactorProject.name} has docs directory
@ -84,8 +84,15 @@
postProcessing="true"
ignoreFailures="true"
/>
<j:forEach var="reactorProject" items="${reactorProjects}">
<j:if test="${reactorProject.id == pom.id}">
<fail message="You must exclude ${pom.id} (the top level project) from the subproject set"/>
</j:if>
</j:forEach>
<!-- generate navbar for project based on aggregate or independent -->
<j:set var="aggregateDir" value="${maven.multiproject.aggregateDir}"/>
<j:set var="navType" value="${maven.multiproject.navigation}"/>
<j:if test="${navType != ''}">
<echo>Producing ${navType} navigation...</echo>

View File

@ -13,4 +13,7 @@ maven.multiproject.ignoreFailures=false
# Valid values are: "aggregate" or "independent".
maven.multiproject.navigation=aggregate
maven.multiproject.type=jar
maven.multiproject.type=jar
# directory under target/docs where aggregated sites are copied to
maven.multiproject.aggregateDir=multiproject/

View File

@ -7,7 +7,7 @@
<body>
<menu name="Projects">
#foreach ($reactorProject in $reactorProjects)
<item name="$reactorProject.name" href="/multiproject/${reactorProject.name}/index.html"/>
<item name="$reactorProject.name" href="/${aggregateDir}${reactorProject.artifactId}/index.html"/>
#end
</menu>

View File

@ -7,6 +7,10 @@
<body>
<release version="1.0" date="in CVS">
<action dev="rafal" type="update">
Made aggregation directory configurable, use artifactId instead of
name for creating site directories / URLs.
</action>
<action dev="dion" type="update">
Updated multiproject:site to automate navigation generation for all projects
</action>

View File

@ -13,6 +13,21 @@
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>maven.multiproject.aggregateDir</td>
<td>Yes</td>
<td>
<p>
This property tells the plugin where the aggreagate sites should be copied to.
</p>
<p>
The value is "multiproject/" by default, but you can change it to "projects/"
or "modules/" if you like. Please notice the required trailing slash.
Another option is to set this property to an empty string, which will tell
the plugin to place the sites in the root directory of the aggregating site.
</p>
</td>
</tr>
<tr>
<td>maven.multiproject.basedir</td>
<td>Yes</td>
@ -83,8 +98,8 @@
</p>
<p>
If the property is set to <code>aggregate</code> a navigation menu is generated with each
project's name linking to <code>/multiproject/${project.name}/index.html</code>. At the completion of
the <a href="goals.html">multiproject:site</a> goal, each project's generated site is copied into
project's name linking to <code>/${maven.multiproject.aggregateDir}${project.name}/index.html</code>.
At the completion of the <a href="goals.html">multiproject:site</a> goal, each project's generated site is copied into
the appropriate directory. e.g. if WebProject1 and JarProject2 are the names of projects
processed via <code>multiproject:site</code>, the project that is executing
<code>multiproject:site</code> will have the generated sites from
@ -123,4 +138,4 @@
</table>
</section>
</body>
</document>
</document>