如何在jboss-deployment-structure.xml中获得库依赖关系?
这是我的存档树:
project.ear
|-> /META-INF
|-> /lib (folder with library.jar)
|-> subproject.jar
文件“project.ear”部署在as jboss 7.1中。在“/lib”中有许多库,其中一个(“library.jar”)读取jboss中包含的外部文件。在“library.jar”中,我在“/src/main/resources/meta-inf”内部路径创建了“jboss deployment structure.xml”,内容如下:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.properties.configuration" />
</dependencies>
</deployment>
</jboss-deployment-structure>
在“project.ear/meta-inf”中,我创建了“jboss deployment structure.xml”,内容如下:
<jboss-deployment-structure>
<sub-deployment name="library.jar">
<dependencies>
<module name="com.properties.configuration" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
当我尝试在jboss 7.1管理控制台中部署包时,出现以下错误:
Cannot upload deployment:
{ ... Failed to process phase STRUCTURE of deployment \"project.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
Sub deployment library.jar in jboss-deployment-structure.xml was not found.
Available sub deployments: subproject.jar"}
文件名为“reads”only“subproject.jar”。我还试图以各种方式更改子部署名称(例如“lib/library.jar”),但结果总是否定的。
有人能帮我吗?提前谢谢。
暂无答案!
目前还没有任何答案,快来回答吧!