Pavel Mi
Pavel Mi

Reputation: 43

Maven, exclude dependency with condition

I have two dependencies:

<dependency>A</dependency>
<dependency>B</dependency>

And variously I want to build A+B and A only.

So I should use some properties, but I'm not sure:

mvn clean package -Dcondition=X

Upvotes: 1

Views: 3518

Answers (1)

Pavel Mi
Pavel Mi

Reputation: 43

The answer is combination of profiles and skip options for plugin section.

Different dependencies for different build profiles in maven - was usefull also.

Upvotes: 1

Related Questions