Java 更改继承依赖项的依赖项
我在Maven中使用JBoss AS 7,还添加了RichFaces,我几乎可以肯定,JBoss中没有。因此,我将其添加到pom.xml中:Java 更改继承依赖项的依赖项,java,maven,jboss7.x,Java,Maven,Jboss7.x,我在Maven中使用JBoss AS 7,还添加了RichFaces,我几乎可以肯定,JBoss中没有。因此,我将其添加到pom.xml中: <dependency> <groupId>org.richfaces.core</groupId> <artifactId>richfaces-core-impl</artifactId> <version>4.1.0.Final</version>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<version>4.1.0.Final</version>
<scope>compile</scope>
</dependency>
我相信出现这个警告是因为我在war和JBoss上都有这个模块,所以我想知道:有没有办法将它们的范围更改为我的POM中提供的?即使它们是继承的?否,也不能更改可传递依赖项的作用域。您最好在依赖项声明中使用
排除这些依赖项。但排除依赖项有时可能会破坏我的代码,不是吗?当然可以。但正如您所说,这些依赖项无论如何都是由cointainer或其他东西提供的。我没说这是最好的做事方式。不幸的是,这是你对Maven所能做的最好的了。
Deployment "deployment.test.war" is using a private module ("org.w3c.css.sac:main") which may be changed or removed in future versions without notice.
Deployment "deployment.test.war" is using a private module ("net.sourceforge.cssparser:main") which may be changed or removed in future versions without notice.