You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gajo Csaba <cs...@cosylab.com> on 2009/12/17 19:34:05 UTC

Filtering a file in maven mojo

Hello,

One of our custom mojos is generating a file, and the template for this 
file is stored in the jar file of the mojo. What is done is that the 
resource is read with getClass().getResourceAsStream(), and then printed 
into a real file line by line.

What I would like to do is, before writing the line, to process the line 
with maven's filter. I was looking at the source code of the "resources" 
plugin [1], and as far as I can see, it is using a 
MavenResourcesFiltering component for filtering. However, it doesn't 
explicitly filter line by line (which is a requirement for me, because 
we also do other stuff with it). How can I do this?

Thanks, Csaba

[1] - 
http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.4.1/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java?view=markup



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