我已经通过Arun Gupta检查了https://github.com/arun-gupta/wildfly-samples/tree/master/swarm,但在尝试启动内置jar时,我得到了Error: Could not find or load main class org.wildfly.swarm.bootstrap.Main.
\wildfly-samples-master\swarm>mvn clean install
[INFO] --- wildfly-swarm-plugin:1.0.0.Alpha1:create (default) @ swarm ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ swarm ---
[INFO] Installing \wildfly-samples-master\swarm\target\swarm-1.0-SNAPSHOT.war to \.m2\repository\org\wildfly\samples\swarm\swarm\1.0-SNAPSHOT\swarm-1.0-SNAPSHOT.war
[INFO] Installing \wildfly-samples-master\swarm\pom.xml to \.m2\repository\org\wildfly\samples\swarm\swarm\1.0-SNAPSHOT\swarm-1.0-SNAPSHOT.pom
[INFO] Installing \wildfly-samples-master\swarm\target\swarm-1.0-SNAPSHOT-swarm.jar to \.m2\repository\org\wildfly\samples\swarm\swarm\1.0-SNAPSHOT\swarm-1.0-SNAPSHOT-swarm.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.115 s
[INFO] Finished at: 2015-05-26T21:06:59+01:00
[INFO] Final Memory: 49M/313M
[INFO] ------------------------------------------------------------------------
\wildfly-samples-master\swarm>java -jar target/swarm-1.0-SNAPSHOT-swarm.jar
Error: Could not find or load main class org.wildfly.swarm.bootstrap.Main
\wildfly-samples-master\swarm>mvn --version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: C:\tools\apache-maven-3.2.1
Java version: 1.7.0_21
Java home: C:\Progra~1\Java\jdk1.7.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
我不明白这里可能出现什么问题。
有人可以提出建议吗?
编辑:我先尝试建立自己的例子,但我遇到了同样的问题。提到一个对我来说失败的现有例子就更容易了。答案 0 :(得分:1)
这是Alpha1中的一个已知问题
已经修复https://github.com/wildfly-swarm/wildfly-swarm/commit/761cdf1848a8720614b20a2272983bcd4e5f3c60
最好从源代码构建它,直到Alpha2发布完成。
答案 1 :(得分:1)
这些是官方的例子: https://github.com/wildfly-swarm/wildfly-swarm-examples
Alpha4版本(来源)有:
还有许多改进......