Aktivierung in meinem Maven-Profil wird ignoriert (Profil wird immer ausgeführt), wenn die Datei vorhanden ist
Ich benutze die Aktivierung basierend auf der Datei, die in meiner Datei pom.xml vorhanden ist.
Mein Profil wird jedoch IMMER ausgeführt, egal was passiert.
Hier ist die Profilbeschreibung:
<profile>
<id>copy</id>
<activation>
<file>
<exists>file.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<configuration>
<target name="copy and rename file">
<copy file="${basedir}/src/main/resources/application.${env}.properties" tofile="${basedir}/src/main/fabric8/io.fabric8.system.properties" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Ich rufe mein Profil so auf: mvn package -Pcopy
Aber das Profil wird immer aufgerufen, egal ob die Datei vorhanden ist oder nicht. Was mache ich falsch
ielen Dank, Romai