is there a way where i can pass a command switch to change my dependencies?
meaning, i have
<dependency>
<groupId>api</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
and set it up in such a way where if i do
mvn package -Dprovided
my effective POM would be
<dependency>
<groupId>nmsc</groupId>
<artifactId>nmsc_api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>provided</scope>
</dependency>
without using profiles as profiles require me to put the dependencies in twice. is this possible?