Issue Details (XML | Word | Printable)

Key: MPDASHBOARD-24
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Wim Deblauwe
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Dashboard Plugin

Multiproject independent navigation

Created: 12/May/05 04:56 AM   Updated: 11/Jan/06 06:07 PM   Resolved: 11/Jan/06 06:07 PM
Return to search
Component/s: None
Affects Version/s: 1.7
Fix Version/s: 1.9

Time Tracking:
Not Specified

Environment:
Maven 1.0.2
Windows XP


 Description  « Hide

the Dashboard plugin seems to assume that the
maven.multiproject.navigation property is set to 'aggregate', becuase
the links that are generated are like this:

<j:if test="${shallDisplay == 'true'}">
<tr>
<x:set var="projecturl1" select="string(@artifactId)"/>
<j:set var="projecturl"
value="${maven.multiproject.aggregateDir}${projecturl1}/index.html"/>
<td><a href="${projecturl}"><x:expr select="@name"/></a></td>
<jsl:applyTemplates select="aggregator"/>
</tr>
</j:if>

Notice the use of maven.multiproject.aggregateDir. But when
'independent' navigation is used the plugin should look at the
'pom.url' property.

A solution for this:

In dashboard.jsl, in <jsl:template match="project">:

<j:if test="${shallDisplay == 'true'}">
<tr>
<!-- url not defined in POM -->
<x:set var="pomurl" select="string(@url)"/>
<j:if test="${empty(pomurl)}">
<x:set var="projecturl1" select="string(@artifactId)"/>
<j:set var="projecturl"
value="${maven.multiproject.aggregateDir}${projecturl1}/index.html"/>
<td><a href="${projecturl}"><x:expr select="@name"/></a></td>
</j:if>

<!-- url defined in POM -->
<j:if test="${!empty(pomurl)}">
<td><a href="${pomurl}"><x:expr select="@name"/></a></td>
</j:if>
<jsl:applyTemplates select="aggregator"/>
</tr>
</j:if>

In plugin.jelly, under the dashboard:aggregate goal:

<x:element name="project">
<x:attribute name="name">${reactorProject.name}</x:attribute>
<x:attribute
name="artifactId">${reactorProject.artifactId}</x:attribute>
<!-- start of my added code -->
<j:if test="${!empty(reactorProject.url)}">
<x:attribute name="url">${reactorProject.url}</x:attribute>
</j:if>
<!-- end of my added code -->
... rest of code
</x:element>

Basically, this is what happens:

The pom.url is added to the dashboard-data.xml file. This url is then
retrieved in the jsl file via @url. If this @url is not empty, the
value of it is used to create the link.

Can somebody create a patch out of this and add it for the next version. Thanks!

regards,

Wim



Vincent Massol added a comment - 29/May/05 03:08 PM

Wim, could you please submit a patch? That would help a lot! In addition your patch should contain documentation updates AND tests that prove that your patch works. If you don't provide them the committer who applies your patch will need to create them himself/herself.

If you need help to perform a SVN checkout, let us know on the maven list and we can help you.


Lukas Theussl made changes - 11/Jan/06 06:07 PM
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 1.9 [ 11720 ]
Resolution Fixed [ 1 ]