Hi guys,
there is a most convenient way how to exclude an dependency from a war when a
profile is activated, figured out by Marius:
<dependencies>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<scope>${dependency.scope}</scope>
<version>1.0</version>
</dependency>
...
</dependencies>
...
<profile>
<id>jbossas7</id>
<properties>
<dependency.scope>provided</dependency.scope>
</properties>
</profile>
<profile>
<id>jetty</id>
<properties>
<dependency.scope>compile</dependency.scope>
</properties>
</profile>
HTH,
Karel