You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeffrey Bonevich <je...@bonevich.com> on 2003/11/20 01:12:41 UTC
Variable substitution in xdocs
I want to refer to pom specific values in my navigation.xml file (i.e.
current version, etc.). Can I do variable substitution in xdoc plugin?
Since it is velocity based I assume so, but I can find no
documentation that tells me what variables I can refer to. ${pom} and
${reactorProject} do not seem to be among them. I have seen one example
that used a velocity forEach loop and refers to the variable
$reactorProjects. This was in the context of a multi-project; involved
setting an attribute on maven:reactor (postprocessing=true). I suspect
maybe I can break in here with maven.xml and add my own variables to
reference in my xdocs, but thought I would ask before rolling my own.
What ever anyone can feed me, I will be happy to compile and put on the
wiki.
jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Variable substitution in xdocs
Posted by Jeffrey Bonevich <je...@bonevich.com>.
dIon -
This works very nicely for the toplevel project (the one from which you
run multiproject) but appears to have no impact on subprojects - cannot
get at anything in those apparently. What I am trying to do is:
* iterate over all the projects at the top level (which can be done as
in navigation-aggregate.xml)
* get at individual pom properties at the subproject level (so I want a
link to the current version of jar file for each subproject w/o having
to hard-code the version in navigation.xml) (this apparently cannot be done)
jeff
dion@multitask.com.au wrote:
> Have a look at the navigation-aggregate.xml template that's part of
> multiproject.
>
> It does something like this:
>
> #foreach ($reactorProject in $reactorProjects)
> <item name="$reactorProject.name"
> href="/${aggregateDir}${reactorProject.artifactId}/index.html"/>
> #end
>
> And reactorProject is just a POM.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
>
> Jeffrey Bonevich <je...@bonevich.com> wrote on 21/11/2003 06:02:20 PM:
>
>
>>I have tried setting up a very simple multiproject (a master project and
>
>
>>one subproject) - still no go for $pom or $project. Definetely gets
>>$reactorProjects in the top level, but not much else I can find in the
>>subproject. Is there a context at which I can get that could spit out
>>the names of all variables available to the page when processing?
>>
>>jeff
>>
>>dion@multitask.com.au wrote:
>>
>>>>>From memory the xdocs plugin will look in target/navigation.xml for a
>>>generated file in preference to ${maven.docs.src}/navigation.xml.
>>>
>>>multiproject uses this to pre-process the nav file.
>>>
>>>You could simply steal the stuff from multiproject.....
>>>--
>>>dIon Gillard, Multitask Consulting
>>>Blog: http://blogs.codehaus.org/people/dion/
>>>
>>>
>>>
>>>Jeffrey Bonevich <je...@bonevich.com> wrote on 20/11/2003 11:12:41 AM:
>>>
>>>
>>>
>>>>I want to refer to pom specific values in my navigation.xml file (i.e.
>>>
>
>>>>current version, etc.). Can I do variable substitution in xdoc
>>>
> plugin?
>
>>>> Since it is velocity based I assume so, but I can find no
>>>>documentation that tells me what variables I can refer to. ${pom} and
>>>
>
>>>>${reactorProject} do not seem to be among them. I have seen one
>>>
> example
>
>>>
>>>>that used a velocity forEach loop and refers to the variable
>>>>$reactorProjects. This was in the context of a multi-project;
>>>
> involved
>
>>>>setting an attribute on maven:reactor (postprocessing=true). I
>>>
> suspect
>
>>>>maybe I can break in here with maven.xml and add my own variables to
>>>>reference in my xdocs, but thought I would ask before rolling my own.
>>>>
>>>>What ever anyone can feed me, I will be happy to compile and put on
>>>
> the
>
>>>>wiki.
>>>>
>>>>jeff
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Variable substitution in xdocs
Posted by di...@multitask.com.au.
Have a look at the navigation-aggregate.xml template that's part of
multiproject.
It does something like this:
#foreach ($reactorProject in $reactorProjects)
<item name="$reactorProject.name"
href="/${aggregateDir}${reactorProject.artifactId}/index.html"/>
#end
And reactorProject is just a POM.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Jeffrey Bonevich <je...@bonevich.com> wrote on 21/11/2003 06:02:20 PM:
> I have tried setting up a very simple multiproject (a master project and
> one subproject) - still no go for $pom or $project. Definetely gets
> $reactorProjects in the top level, but not much else I can find in the
> subproject. Is there a context at which I can get that could spit out
> the names of all variables available to the page when processing?
>
> jeff
>
> dion@multitask.com.au wrote:
> >>From memory the xdocs plugin will look in target/navigation.xml for a
> > generated file in preference to ${maven.docs.src}/navigation.xml.
> >
> > multiproject uses this to pre-process the nav file.
> >
> > You could simply steal the stuff from multiproject.....
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://blogs.codehaus.org/people/dion/
> >
> >
> >
> > Jeffrey Bonevich <je...@bonevich.com> wrote on 20/11/2003 11:12:41 AM:
> >
> >
> >>I want to refer to pom specific values in my navigation.xml file (i.e.
> >>current version, etc.). Can I do variable substitution in xdoc
plugin?
> >> Since it is velocity based I assume so, but I can find no
> >>documentation that tells me what variables I can refer to. ${pom} and
> >>${reactorProject} do not seem to be among them. I have seen one
example
> >
> >
> >>that used a velocity forEach loop and refers to the variable
> >>$reactorProjects. This was in the context of a multi-project;
involved
> >>setting an attribute on maven:reactor (postprocessing=true). I
suspect
> >>maybe I can break in here with maven.xml and add my own variables to
> >>reference in my xdocs, but thought I would ask before rolling my own.
> >>
> >>What ever anyone can feed me, I will be happy to compile and put on
the
> >>wiki.
> >>
> >>jeff
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Variable substitution in xdocs
Posted by Jeffrey Bonevich <je...@bonevich.com>.
I have tried setting up a very simple multiproject (a master project and
one subproject) - still no go for $pom or $project. Definetely gets
$reactorProjects in the top level, but not much else I can find in the
subproject. Is there a context at which I can get that could spit out
the names of all variables available to the page when processing?
jeff
dion@multitask.com.au wrote:
>>>From memory the xdocs plugin will look in target/navigation.xml for a
> generated file in preference to ${maven.docs.src}/navigation.xml.
>
> multiproject uses this to pre-process the nav file.
>
> You could simply steal the stuff from multiproject.....
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
>
> Jeffrey Bonevich <je...@bonevich.com> wrote on 20/11/2003 11:12:41 AM:
>
>
>>I want to refer to pom specific values in my navigation.xml file (i.e.
>>current version, etc.). Can I do variable substitution in xdoc plugin?
>> Since it is velocity based I assume so, but I can find no
>>documentation that tells me what variables I can refer to. ${pom} and
>>${reactorProject} do not seem to be among them. I have seen one example
>
>
>>that used a velocity forEach loop and refers to the variable
>>$reactorProjects. This was in the context of a multi-project; involved
>>setting an attribute on maven:reactor (postprocessing=true). I suspect
>>maybe I can break in here with maven.xml and add my own variables to
>>reference in my xdocs, but thought I would ask before rolling my own.
>>
>>What ever anyone can feed me, I will be happy to compile and put on the
>>wiki.
>>
>>jeff
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Variable substitution in xdocs
Posted by di...@multitask.com.au.
>From memory the xdocs plugin will look in target/navigation.xml for a
generated file in preference to ${maven.docs.src}/navigation.xml.
multiproject uses this to pre-process the nav file.
You could simply steal the stuff from multiproject.....
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Jeffrey Bonevich <je...@bonevich.com> wrote on 20/11/2003 11:12:41 AM:
> I want to refer to pom specific values in my navigation.xml file (i.e.
> current version, etc.). Can I do variable substitution in xdoc plugin?
> Since it is velocity based I assume so, but I can find no
> documentation that tells me what variables I can refer to. ${pom} and
> ${reactorProject} do not seem to be among them. I have seen one example
> that used a velocity forEach loop and refers to the variable
> $reactorProjects. This was in the context of a multi-project; involved
> setting an attribute on maven:reactor (postprocessing=true). I suspect
> maybe I can break in here with maven.xml and add my own variables to
> reference in my xdocs, but thought I would ask before rolling my own.
>
> What ever anyone can feed me, I will be happy to compile and put on the
> wiki.
>
> jeff
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org