<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>DB schema-replacement</id>
<phase>compile</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>src/main/java/com/swissre/gc7/dao/hibernate/*.java</include>
<include>src/main/java/com/swissre/gc7/dao/*.java</include>
<include>src/main/java/com/swissre/gc7/dao/hibernate/*.java</include>
<include>src/main/java/com/swissre/gc7/dao/*/*/hibernate/*.java</include>
<include>src/main/java/com/swissre/gc7/dao/*/*/valueGroup/hibernate/*.java</include>
</includes>
<replacements>
<replacement>
<token>G10MDA.</token> <!-- Token which needs to be replaced -->
<value>S1MTHT.</value> <!-- Value which is replaced for given token -->
</replacement>
<replacement>
<token>"G10MDA.</token> <!-- Token which needs to be replaced -->
<value>"S1MTHT.</value> <!-- Value which is replaced for given token -->
</replacement>
.....
.....
上面的代码不起作用。
你能请人帮我吗?
我想替换 java 源文件中的令牌,并且值应该包含在 .class 文件中。