Skip to content

Instantly share code, notes, and snippets.

@4n3w
Last active November 21, 2019 19:24
Show Gist options
  • Save 4n3w/3365657 to your computer and use it in GitHub Desktop.
Save 4n3w/3365657 to your computer and use it in GitHub Desktop.
Configuration for the maven-replacer-plugin on two separate executions
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.3.5</version>
<executions>
<execution>
<id>replace-for-documentation</id>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<filesToInclude>
src/site/markdown/*.md,src/site/site.xml
</filesToInclude>
<preserveDir>true</preserveDir>
<outputDir>target</outputDir>
<replacements>
<replacement>
<token>%VERSION%</token>
<value>${project.version}</value>
</replacement>
</replacements>
</configuration>
</execution>
<execution>
<id>replace-for-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<filesToInclude>
target/${project.build.finalName}/WEB-INF/classes/spring/default.properties
</filesToInclude>
<token>%VERSION%</token>
<value>${project.version}</value>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment