У меня есть два файла в моем src / main / resources, и я хочу, чтобы тело одного файла было вставлено в определенное место другого файла.Таким образом, один файл должен быть шаблоном, а другой файл будет содержать данные для заполнения этого шаблона (что-то вроде Apache Velocity).
Могу ли я сделать это с помощью какого-либо существующего плагина Maven?
Спасибоadvance.
Решение: Я решил не использовать специальный плагин, а добавить его в pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>rng-injection</id>
<phase>generate-resources</phase>
<configuration>
<target>
<echo message="Injecting RNG schemes"/>
<copy file="${main.resources}/RNG/enets-template.rng"
tofile="${main.resources}/RNG/enets.rng"
verbose="true"
overwrite="true"/>
<copy file="${main.resources}/RNG/modeldefinition-template.rng"
tofile="${main.resources}/RNG/modeldefinition.rng"
verbose="true"
overwrite="true"/>
<property name="enets-def" value="${main.resources}/RNG/enetsdefinitions.rng"/>
<loadfile property="def-file" srcfile="${enets-def}"/>
<replace file="${main.resources}/RNG/enets.rng">
<replacefilter token="{!enets-definition!}" value="${def-file}"/>
</replace>
<replace file="${main.resources}/RNG/modeldefinition.rng">
<replacefilter token="{!enets-definition!}" value="${def-file}"/>
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>