Plese幫助我在Wildfly中設置依賴關係。 我有Maven項目 家長:WildFly依賴關係
- 服務
- 網絡
服務是EJB。網絡是web.war中
<jboss-deployment-structure>
<!--<ear-subdeployments-isolated>false</ear-subdeployments-isolated>-->
<deployment name="mobile-console.war">
<dependencies>
<module name="by.lib" meta-inf="export" export="true"/>
<module name="deployment.services-1.0.5.ear.model-core-1.1.jar"/>
<module name="deployment.services-1.0.5.ear.by.utils-1.0.2.jar"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
使用utils.jar從Service.ear
Service.ejb Utils.jar在LIB
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>${maven-ear-plugin.version}</version>
<configuration>
<earName>${project.build.finalName}</earName>
<modules>
...
<javaModule>
<groupId>by.services</groupId>
<artifactId>by.utils</artifactId>
<bundleDir>lib</bundleDir>
</javaModule>
...
JBoss的部署,strucuture.xml WAR
所以我有錯誤
11:58:25,987 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "web.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"module.resolved.service.\"deployment.web.war\".main",
"jboss.module.spec.service.\"deployment.services-1.0.5.ear.by.utils-1.0.2.jar\".main"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.module.service.\"deployment.web.war\".main is missing [jboss.module.spec.service.\"deployment.services-1.0.5.ear.by.utils-1.0.2.jar\".main, module.resolved.service.\"deployment.web.war\".main]",
"jboss.module.resolve.phase.\"deployment.web.war\".main.1 is missing [jboss.module.spec.service.\"deployment.mobile.bank.services-1.0.5.ear.by.utils-1.0.2.jar\".main]"
]
}
11:58:25,988 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "web.war" was rolled back with the following failure message:
{
"WFLYCTL0412: Required services that are not installed:" => [
"module.resolved.service.\"deployment.web.war\".main",
"jboss.module.spec.service.\"deployment.services-1.0.5.ear.by.utils-1.0.2.jar\".main"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.module.service.\"deployment.web.war\".main is missing [jboss.module.spec.service.\"deployment.services-1.0.5.ear.by.utils-1.0.2.jar\".main, module.resolved.service.\"deployment.web.war\".main]",
"jboss.module.resolve.phase.\"deployment.web.war\".main.1 is missing [jboss.module.spec.service.\"deployment.services-1.0.5.ear.by.utils-1.0.2.jar\".main]"
]
}
11:58:26,001 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment web.war (runtime-name: web.war) in 12ms
11:58:26,002 INFO [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.module.service."deployment.web.war".main (missing) dependents: [service jboss.deployment.unit."web.war".FIRST_MODULE_USE]
service jboss.module.spec.service."deployment.web.war".main (missing) dependents: [service jboss.module.service."deployment.web.war".main]
service jboss.module.spec.service."deployment.services-1.0.5.ear.by.utils-1.0.2.jar".main (missing) dependents: [service jboss.module.service."deployment.web.war".main, service jboss.module.resolve.phase."deployment.web.war".main.1]
service module.resolved.service."deployment.web.war".main (missing) dependents: [service jboss.module.service."deployment.web.war".main]
我該怎麼做做錯了?
爲什麼你認爲你需要'jboss-deployment-strucuture.xml'文件?你使用的是什麼版本的WildFly? –
Wildfly 10.1.0 jboss-deployment-strucuture.xml - 我的猜測 – LeshaRB