2
我在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>
<scope>compile</scope>
</dependency>
但是RichFaces的也有它的依赖性,所以cssparser
和sac
还带有编译范围,但同时又是在JBoss AS 7,所以下面的警告是当我运行JBoss的:
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.
我认为,出现这样的警告,因为我有这个模块都在我的战争和JBoss上,所以我想知道:有一种方法将它们的范围更改为提供的,在我POM?即使他们是遗传的?
但排除依赖有时可能会破坏我的代码,不是吗? – Montolide
当然可以。但正如你所说,这些依赖关系无论如何都是由钱包提供的。我没有说这是做事的最好方式。不幸的是,这是Maven能做的最好的。 –