TechnoCrat
TechnoCrat

Reputation: 2065

How to include all files in a directory while using maven-replacer-plugin?

I want to replace token value in all the files inside a specific directory (say dir1):

Few examples:

  1. /dir1/helloworld.jsp
  2. /dir1/dir2/sample.jsp
  3. /dir1/dir2/dir3/produtinfo.jsp
  4. /dir1/random/dir3/dir4/random.jsp

I tried using following configuration which does not seem to be working

<configuration>
   <delimiters>
       <delimiter>@</delimiter>
   </delimiters>
   <basedir>target/dir1</basedir>
   <filesToInclude>*.jsp</filesToInclude>
   <tokenValueMap>/usr/home/output.properties</tokenValueMap>
</configuration>

Am I missing something here?

Also, I have two properties something like

prop1.value=10
prop2.prop1.value=20

so this plugin replaces "sample text ${prop2.prop1.value}" with "sample text prop2.10". How do I fix this? It should update it with "sample text 20" instead.

In short, I want to replace some property values present in all the jsp files present inside src/main/webapp/jsp while building maven project so if there are any alternatives, please feel free to suggest.

Upvotes: 3

Views: 334

Answers (0)

Related Questions