[errai-dev] Excluding dependencies in Maven profiles

Christian Sadilek csadilek at redhat.com
Mon Oct 22 10:06:06 EDT 2012


nice! with this we should be able to delete 100's of lines in our pom.xmls.

On 2012-10-22, at 8:34 AM, Karel Piwko <kpiwko at redhat.com> wrote:

> 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
> _______________________________________________
> errai-dev mailing list
> errai-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/errai-dev




More information about the errai-dev mailing list