我在尝试运行Wildfly Swarm时遇到了问题。以下是错误。
org.jboss.modules.ModuleLoadException: Error loading module from modules/org/jboss/shrinkwrap/descriptors/impl/module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.wildfly.swarm.bootstrap.modules.BootstrapClasspathModuleFinder.findModule(BootstrapClasspathModuleFinder.java:58)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
at org.jboss.modules.Module.addExportedPaths(Module.java:1230)
at org.jboss.modules.Module.addExportedPaths(Module.java:1278)
at org.jboss.modules.Module.addExportedPaths(Module.java:1278)
at org.jboss.modules.Module.addPaths(Module.java:1122)
at org.jboss.modules.Module.link(Module.java:1449)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1477)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.wildfly.swarm.bootstrap.MainInvoker.getMainClass(MainInvoker.java:76)
at org.wildfly.swarm.bootstrap.MainInvoker.<init>(MainInvoker.java:35)
at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact 'org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-impl-jboss:2.0.0-alpha-9' (position: END_TAG seen ...rap.descriptors:shrinkwrap-descriptors-impl-jboss:2.0.0-alpha-9"/>... @15:104) caused by: java.util.zip.ZipException: error in opening zip file
at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:836)
at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:739)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:535)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
... 15 more
java.lang.ClassNotFoundException: org.wildfly.swarm.Swarm
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.wildfly.swarm.bootstrap.MainInvoker.getMainClass(MainInvoker.java:81)
at org.wildfly.swarm.bootstrap.MainInvoker.<init>(MainInvoker.java:35)
at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
Exception in thread "main" java.lang.ClassNotFoundException: org.wildfly.swarm.Swarm
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.wildfly.swarm.bootstrap.MainInvoker.getMainClass(MainInvoker.java:81)
at org.wildfly.swarm.bootstrap.MainInvoker.<init>(MainInvoker.java:35)
at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
以下是我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.research</groupId>
<artifactId>indexer</artifactId>
<name>WildFly Swarm Example</name>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<version.wildfly.swarm>2017.2.0</version.wildfly.swarm>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>bom-all</artifactId>
<version>${version.wildfly.swarm}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>demo</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${version.wildfly.swarm}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Java EE 7 dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- WildFly Swarm Fractions -->
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
</dependencies>
</project>
曾经尝试过清理maven repo几次。但没有任何帮助。请帮忙。非常感谢你的帮助。