Hi,
found how to do it, but I don't know how to create a patch and I don't
have CVS. Can somebody create a patch out of 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.
regards,
Wim
On 5/12/05, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
> Just tried it but it does not work.
>
> It uses the pom.url of the master project, not of the subprojects. Any
> idea on how I can access those?
>
> regards,
>
> Wim
>
> On 5/12/05, Vincent Massol <[EMAIL PROTECTED]> wrote:
> > Hi Wim,
> >
> > Yes, this is a known limitation (I've only used aggregate multiprojects and
> > thus have only implemented this one...).
> >
> > If you can submit a patch with a test (through JIRA) I could apply it.
> >
> > Thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Wim Deblauwe [mailto:[EMAIL PROTECTED]
> > > Sent: jeudi 12 mai 2005 11:08
> > > To: Maven Users List
> > > Subject: Dashboard plugin with multiproject independent navigation
> > >
> > > Hi,
> > >
> > > 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.
> > >
> > > Is this a bug or am I missing something?
> > >
> > > This would probably be a better solution (untested):
> > >
> > >
> > > <j:if test="${shallDisplay == 'true'}">
> > > <tr>
> > > <!-- url not defined in POM -->
> > > <j:if test="${empty(pom.url)}">
> > > <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(pom.url)}">
> > > <td><a href="${pom.url}"><x:expr select="@name"/></a></td>
> > > </j:if>
> > > <jsl:applyTemplates select="aggregator"/>
> > > </tr>
> > > </j:if>
> > >
> > > regards,
> > >
> > > Wim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]