Thomas,
> Depending on what you need, this is not entirely trivial. If you just want
> to set property 'foo' to value 'bar', then the approach below is just fine.
> But say you have a property 'baz' in your pom like this:
>
>xx${foo}xx
>
>
> And you want 'baz' to evaluate to 'xxbarxx', then
Hi Paul
Depending on what you need, this is not entirely trivial. If you just want to
set property 'foo' to value 'bar', then the approach below is just fine. But say
you have a property 'baz' in your pom like this:
xx${foo}xx
And you want 'baz' to evaluate to 'xxbarxx', then you need a b
Le mercredi 11 mars 2009 19:24:20, Nord, James a écrit :
> The following will set a variable I_WAS_HERE to "true".
Thanks, that's what I was looking for.
Simple :)
Paul
> /**
> * Goal which stores some properties
> *
> * @goal getProperty
> * @phase validate
> */
> The following gets the m
Le mercredi 11 mars 2009 19:21:45, Paul Gier a écrit :
> Maybe the properties maven plugin does something similar to what you want.
> http://mojo.codehaus.org/properties-maven-plugin/
I was not aware of this one, thanks for the pointer it can be usefull !
The following will set a variable I_WAS_HERE to "true".
/**
* Goal which stores some properties
*
* @goal getProperty
* @phase validate
*/
The following gets the maven version and stores it as the maven.version
property.
public class MavenPropertiesMojo extends AbstractMojo {
/**
Maybe the properties maven plugin does something similar to what you want.
http://mojo.codehaus.org/properties-maven-plugin/
Paul wrote:
I need to write a mojo that reads some data and makes it available in the pom
as ${properties}.
Is there a way to achieve this ?
--