在 WildFly 上部署 Apache Isis

Deploying Apache Isis on WildFly

我正在尝试在 WildFly 服务器上部署 Apache Isis 项目。

该项目只是 simpleapp-archetype-1.10.0,它启动并与 mvn antrun:run -P self-host 配合使用mvn jetty:run-war.

对于码头部分,我在父pom.xml

的org.eclipse.jetty插件中添加了配置
<plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.3.2.v20150730</version>
    <configuration>
        <war>${project.basedir}/webapp/target/simpleapp.war</war>
    </configuration>
</plugin>

现在我想将其部署到 WildFly 服务器上,但出现以下错误:

Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"simpleapp.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"simpleapp.war\".WeldStartService: Failed to start service Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type IsisJdoSupport with qualifiers @Default at injection point [BackedAnnotatedField] @Inject org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService.isisJdoSupport at org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService.isisJdoSupport(TimestampService.java:0) "}}

我该如何修复这个错误,为什么 Jetty 会绕过这个错误?

我通过 Apache Isis 邮件列表得到了答案。

The error says that WildFly tries to do CDI work. Jetty is just a web server and doesn't support Java EE stuff like CDI. Try to disable CDI support for this application (I have no idea how exactly).

http://isis.markmail.org/message/d3coq6qus3rca7kx

要修复此错误:

将文件jboss-all.xml添加到简单应用Webapp/Web Pages/WEB-INF 使用以下代码:

<jboss xmlns="urn:jboss:1.0">
    <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
</jboss>

https://docs.jboss.org/author/display/WFLY8/CDI+Reference

感谢 Martin Grigorov。