Skip to content

StevenMassaro/file-replacer-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-replacer-maven-plugin

A simple maven plugin which replaces placeholders in a file with the contents of other files.

Usage example

Given the following <plugin> declaration in your pom.xml:

<plugin>
    <groupId>com.stevenmassaro</groupId>
    <artifactId>file-replacer-maven-plugin</artifactId>
    <version>0.0.1</version>
    <executions>
        <execution>
            <goals>
                <goal>replace</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <file>${project.build.directory}/example.txt</file>
        <filters>
            <key>${project.build.directory}/replacement.txt</key>
        </filters>
    </configuration>
</plugin>

And the following files:

  • example.txt:
    hello key
    
  • replacement.txt:
    world
    

After execution, example.txt will look like:

hello world

About

A simple maven plugin which replaces placeholders in a file with the contents of other files.

Resources

License

Stars

Watchers

Forks

Languages