2017-06-17 87 views
1

第三方JAR的传递依赖我已经安装在我的本地仓库使用Maven的 - 在找不到战争

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \ 
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> 

,所以我可以用我的战争项目罐子第三方罐子。这个jar在它的的pom.xml以下依赖性:

<dependency> 
    <groupId>org.infinispan</groupId> 
    <artifactId>infinispan-core</artifactId> 
    <version>5.1.6.Final</version> 
</dependency> 

我能够成功编译并生成战争。但是,当我在JBoss中7部署它,我得到以下运行时错误:

java.lang.NoClassDefFoundError: org/infinispan/manager/DefaultCacheManager 

这是我应该在传递依赖Infinispan的核心发现的一类。为什么这个传递性依赖不被包含在我的战争中?

回答

0

JBoss issue提到:

Can we see your MANIFEST.MF and jboss-deployment-structure.xml ?

Infinispan jar files are not automatically exported to WildFly deployments and you need to explicitly add them as dependencies using the techniques described at " Class Loading in WildFly "