Cross-platform Profile Activiation: Is Example 11.4 Correct?
Example 11.4: Problems with including OS check and file exists check. I am trying to check for linux and a file exists. If on windows the profile does not trigger. On linux the profile always executes. I took out the os check and then the file exists check worked. So I do not know what I am doing wrong.
<profiles>
<profile>
<id>linux</id>
<activation>
<activebydefault>false</activebydefault>
<os>
<family>unix</family>
</os>
<file>
<exists>src/main/rpm/release.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-antrun-plugin</artifactid>
<version>1.2</version>
<executions>
<execution>
<phase>deploy</phase>
<configuration>
<tasks>
<ant target="release">
<property name="release.version" value="${project.version}">
</property></ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<profiles>
<profile>
<id>linux</id>
<activation>
<activebydefault>false</activebydefault>
<os>
<family>unix</family>
</os>
<file>
<exists>src/main/rpm/release.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-antrun-plugin</artifactid>
<version>1.2</version>
<executions>
<execution>
<phase>deploy</phase>
<configuration>
<tasks>
<ant target="release">
<property name="release.version" value="${project.version}">
</property></ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company .
-
Inappropriate?This sounds like the same issue as reported in bug MNG-3106. According to the bug comments, this was fixed by activating a profile if any of the activation conditions is true.
-
Inappropriate?Ok, I'm not exaclty sure what the status of this is in light of MNG-3106, but I have made a JIRA issue to check this example and see if it is affected by this bug:
https://issues.sonatype.org/browse/MV...
Loading Profile...



EMPLOYEE