maven-replacer-pluginを使用して、index.html ファイル内の JavaScript インポート ステートメントの名前を変更したいと考えています。
ただし、パスがで始まる場所でのみこれを実行したいと思いますapp
index.html スニペット
...
<!-- rename this one to app/something12345.js -->
<script src="app/something.js"></script>
<!-- leave this one as it is -->
<script src="vendor/angular.js"></script>
...
これまでのpom.xmlには、maven-replacer-plugin用にこの構成があります
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>target/${project.build.finalName}/index.html</file>
<replacements>
<replacement>
<token>(\.js")</token>
<value>12345.js"</value>
</replacement>
</replacements>
</configuration>
</plugin>
現時点では、これは明らかにすべての.js
試合に取って代わります。
<token>
これを達成するためにセクションに入れることができる魔法の呪文はありますか?