Hi,

What templating-maven-plugin actually does is filtering sources with the
properties the current maven properties context.
It will not load any property anywhere if you don't configure it somewhere.

The simplest way would be by defining a new property outputLine in your
pom.xml under xpath://project/properties tag with the value you want.

If you want is to somehow create a dynamic property (see <properties> tag
in maven pom.xml file to understand the parallel), there are many
possibilities. You might want for example to have a look at
http://mojo.codehaus.org/properties-maven-plugin/read-project-properties-mojo.html
to
load properties from a property file.

HTH
Cheers



2013/9/24 Kevin Mayer <ke...@colorado.edu>

> I need to filter a java source file(in src/main/java-templates) with
> this line of code:
>
> "${outputLine}"
>
> with a property in a properties file. Ex:
> outputLine=res.sendRedirect(res.encodeURL(redirectURL));
>
> I can run the example fine given here:
>
> http://www.hascode.com/2013/09/filtering-source-files-using-the-templating-maven-plugin/
>
> but it is using maven pom properties.
>
> Do I need to specify the delimiters as provide here?:
> http://mojo.codehaus.org/templating-maven-plugin/filter-sources-mojo.html
>
> If so, can someone show me the pom?
>
> Here is what I am using thus far:
>
>                 <plugin>
>                   <groupId>org.codehaus.mojo</groupId>
>                   <artifactId>templating-maven-plugin</artifactId>
>                   <version>1.0-alpha-3</version>
>                   <executions>
>                       <execution>
>                       <phase>generate-sources</phase>
>                       <id>filter-src</id>
>                       <goals>
>                           <goal>filter-sources</goal>
>                       </goals>
>                       </execution>
>                   </executions>
>                 </plugin>
>
> thank you
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;! <http://xircles.codehaus.org/manage_email>

Reply via email to