0

我正在尝试在 GitHub 上学习开源项目。它的多模块项目,为此,我可以成功执行 mvn clean install。但问题是当我使用mvn wildfly:deploy -DskipTests=true它进行部署时会出现以下错误。所以我该如何在本地设置这种类型的项目,请帮助如何成功部署它关于wildfly以下错误--->

$mvn wildfly:deploy -DskipTests=true
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building hibernate-ogm-hiking-demo 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) > package @ hibernate-ogm-hiking-demo >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hibernate-ogm-hiking-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ hibernate-ogm-hiking-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hibernate-ogm-hiking-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ hibernate-ogm-hiking-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ hibernate-ogm-hiking-demo ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.4:war (default-war) @ hibernate-ogm-hiking-demo ---
[INFO] Packaging webapp
[INFO] Assembling webapp [hibernate-ogm-hiking-demo] in [/media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/src/main/webapp]
[INFO] Webapp assembled in [109 msecs]
[INFO] Building war: /media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT.war
[INFO] 
[INFO] <<< wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) < package @ hibernate-ogm-hiking-demo <<<
[INFO] 
[INFO] --- wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) @ hibernate-ogm-hiking-demo ---
Sep 16, 2016 12:21:47 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.2.0.Final
Sep 16, 2016 12:21:47 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.2.0.Final
Sep 16, 2016 12:21:47 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.0.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.268 s
[INFO] Finished at: 2016-09-16T12:21:53+05:30
[INFO] Final Memory: 27M/341M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) on project hibernate-ogm-hiking-demo: Could not execute goal deploy on /media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

如果我尝试使用 `mvn jboss-as:deploy -DskipTests=true 运行相同的错误。

4

1 回答 1

1

目标是将wilfdly:deploy工件部署到正在运行的 Wildfly。在您的情况下,没有运行 Wildfly。

您可以使用wildfly:run目标来启动 Wildfly 并部署您的工件。

参考:https ://docs.jboss.org/wildfly/plugins/maven/latest/usage.html

于 2016-09-16T12:58:13.937 回答