ここに私の問題があります。ファイルがあります。異なるプロファイルを使用する場合は、それぞれのファイルの名前を変更する必要があります。
だから私はあなたが見つけることができるdev.propertiesに2つの.propertiesファイル、dev.propertiesとrec.propertiesを持っています:
machineName=marin
prefix=DEV
fileOneName=node
rec.properties で見つけることができます:
machineName=marin
prefix=REC
fileOneName=node
私が今欲しいのは、使用するプロファイルを設定するときに、これらの変数の内容を使用できるようにすることです:
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Filter name -->
<cogepat.filter.properties>dev.properties</cogepat.filter.properties>
</properties>
</profile>
しかし、次を使用すると、変数が入力されません。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>run-ant-rename-war</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="mavencopyfrom/adeplacer.txt" tofile="mavencopyto/${prefix}_${fileOneName}${machineName}.txt"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
最終的には、次の名前のファイルになります。
${prefix}_${fileOneName}${machineName}.txt