Search This Blog

Maven: conditionally execute plugins using profiles

<project>
<properties>...</properties>
<repositories>...</repositories>
<dependencies>...</dependencies>
<build>
  <plugins>...</plugins>
</build>
<profiles>
  <profile>
    <id>windows</id>
    <activation>
      <os>
        <name>Windows XP</name>
        <family>Windows</family>
        <arch>x86</arch>
        <version>5.1.2600</version>
      </os>
    </activation>
    <properties>...</properties>
    <repositories>...</repositories>
    <dependencies>...</dependencies>
    <build>
      <plugins>...</plugins>
    </build>
  </profile>
</profiles>
</project>
To activate the profile manually:
mvn package -p PROFILE_ID





see also

No comments:

Post a Comment