Skip to content

Instantly share code, notes, and snippets.

@pwendell
Created November 13, 2014 18:48
Show Gist options
  • Save pwendell/6834223e68f254e6945e to your computer and use it in GitHub Desktop.
Save pwendell/6834223e68f254e6945e to your computer and use it in GitHub Desktop.
Simple pom to demonstrate property activation
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Maven Quick Start Archetype</name>
<url>http://maven.apache.org</url>
<!-- $ mvn help:all-profiles # b is inactive-->
<!-- $ mvn help:all-profiles -Db.active # b is active-->
<properties>
<b.active>true</b.active>
</properties>
<profiles>
<profile>
<id>B</id>
<activation>
<property>
<name>b.active</name>
</property>
</activation>
</profile>
</profiles>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment