I wrote some documentation about properties available during Velocity 
processing in Doxia [1]
project (type MavenProject) should be available, which has getProperties() 
method: this should be what you are looking for

this documentation can probably be enhanced: any feedback appreciated

Regards,

Hervé


[1] http://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/

Le mardi 15 janvier 2013 15:45:18 Mark H. Wood a écrit :
> On Mon, Jan 14, 2013 at 10:26:56PM +0200, Graham Leggett wrote:
> > On 14 Jan 2013, at 10:02 PM, Mirko Friedenhagen <mfriedenha...@gmail.com> 
wrote:
> > > I once was successful with referencing injected properties in velocity
> > > by using the get method. Maybe something like:
> > > ${project.properties.get("tomcat.port.http.confluence43.live")}
> > > will work?
> > 
> > Alas, no.
> > 
> > The idea is that the properties in the pom and the properties published to
> > the site are always in sync, even after the current crop of architects
> > have moved on from the project. If you have to add a property in two
> > steps, there is no way the project will stay in sync.
> Yeah, he's asking for a way to get the site plugin to ask the POM for
> a list of all defined properties, whatever they may be today, so that
> the plugin can enumerate them (with their values I suppose) in its
> report *without knowing their names in advance*.
> 
> The value of project.properties seems to be a java.util.Properties, so
> there may be some way to get at its propertyNames() method, or the
> keys() keySet() etc. methods it inherits from Hashtable, but you will
> probably have to write your own report plugin to make use of any of
> them.
> 
> org.codehaus.mojo:properties-maven-plugin seems to know how to
> enumerate properties, but it doesn't do reporting.  It could perhaps
> be studied as a model.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to