0
有没有一种方法可以让我通过命令开关来改变我的依赖关系?maven的两个版本的依赖关系
意义,我有
<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>
,并以这样的方式在那里,如果我做-Dprovided
MVN包设置它
我的有效POM将
<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>
没有使用配置文件作为配置文件要求我把依赖关系放在两次。这可能吗?
这么简单它的辉煌。谢谢 – scphantm