Simplify replacing of build-parameters.

This commit is contained in:
asofold 2013-03-01 15:02:28 +01:00
parent e7cfdd4b3e
commit 36b402c27a
3 changed files with 12 additions and 48 deletions

View File

@ -31,43 +31,16 @@
Version updating is done for NCPPlugin mainly, expect the other poms version to change randomly rather.</description>
<build>
<!-- <defaultGoal>clean package</defaultGoal> -->
<!-- <directory>../target</directory> Build it one level up, because it is the one we care about -->
<plugins>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreMissingFile>true</ignoreMissingFile>
<file>src/main/resources/_BuildParameters.properties</file>
<outputFile>src/main/resources/BuildParameters.properties</outputFile>
<regex>false</regex>
<replacements>
<replacement>
<token>@GENERATED_NOTE@</token>
<value>!!! THIS FILE IS AUTO GENERATED, ANY MANUAL CHANGES TO IT WILL GET LOST !!!</value>
</replacement>
<replacement>
<token>@TEST_LEVEL@</token>
<value>${TEST_LEVEL}</value>
</replacement>
<replacement>
<token>@DEBUG_LEVEL@</token>
<value>${DEBUG_LEVEL}</value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>../NCPBuildBase/src/main/resources</directory>
<includes>
<include>BuildParameters.properties</include>
</includes>
</resource>
</resources>
</build>
</project>

View File

@ -1,5 +1,4 @@
# @GENERATED_NOTE@
# These parameters are filled in during building (maven), they are not strictly needed.
# Replacement mappings are defined in the pom.xml.
TEST_LEVEL=@TEST_LEVEL@
DEBUG_LEVEL=@DEBUG_LEVEL@
TEST_LEVEL=${TEST_LEVEL}
DEBUG_LEVEL=${DEBUG_LEVEL}

View File

@ -93,14 +93,6 @@
<include>LICENSE.txt</include>
</includes>
</resource>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>../NCPBuildBase/src/main/resources</directory>
<includes>
<include>BuildParameters.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>