gpt4 book ai didi

java - maven jboss-as :start A required class was missing . .. org/sonaty.../ArtifactResolutionException 异常

转载 作者:行者123 更新时间:2023-11-30 07:14:09 31 4
gpt4 key购买 nike

我正在尝试使用 mvn jboss-as:start 命令启动一个 jboss-as 服务器,简单地说它不会运行。

http://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:start (default-cli) on project thenaglecode: Execution default-cli of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:start failed: A required class was missing while executing org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:start: org/sonatype/aether/resolution/ArtifactResolutionException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/jxnagl/.m2/repository/org/jboss/as/plugins/jboss-as-maven-plugin/7.4.Final/jboss-as-maven-plugin-7.4.Final.jar
[ERROR] urls[1] = file:/C:/Users/jxnagl/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
...
[ERROR] urls[33] = file:/C:/Users/jxnagl/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
[ERROR] urls[34] = file:/C:/Users/jxnagl/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.sonatype.aether.resolution.ArtifactResolutionException
[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]

此链接:'[ Help 1 ]' 从跟踪底部的上述错误日志中可以看出,这个问题是非常新的,不超过一天。

但是该页面对我来说不是很有用,可能是因为我是 Maven 的新手所以请对我好一点,即我无法弄清楚是什么依赖项失败了。

这是我的 pom.xml 供您细读,请原谅对属性的矫枉过正,我将很快恢复这种做事方式。

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.thenaglecode</groupId>
<artifactId>thenaglecode</artifactId>
<packaging>pom</packaging>
<version>1.0.0.Pre-Alpha</version>
<modules>
<module>core</module>
<module>algorithms</module>
<module>web</module>
<module>testing</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- the nagle code properties -->
<thenaglecode.java.compiler.version>1.7</thenaglecode.java.compiler.version>
<thenaglecode.java.home>C:\Program Files\Java\jdk1.7.0_25</thenaglecode.java.home>
<thenaglecode.version>1.0.0.Pre-Alpha</thenaglecode.version>

<!-- third party library versions format: "libraries.version.<groupid>.<artifactid>" -->
<libraries.version.org.jboss.spec.jboss-javaee-6.0>3.0.2.Final
</libraries.version.org.jboss.spec.jboss-javaee-6.0>
<libraries.version.org.jboss.spec.jboss-javaee-all-6.0>3.0.2.Final
</libraries.version.org.jboss.spec.jboss-javaee-all-6.0>
<libraries.version.org.jboss.as.jboss-as-arquillian-container-remote>7.2.0.Final
</libraries.version.org.jboss.as.jboss-as-arquillian-container-remote>
<libraries.version.org.jboss.arqullian.protocol.arquillian-protocol-servlet>1.1.0.Final
</libraries.version.org.jboss.arqullian.protocol.arquillian-protocol-servlet>
<libraries.version.org.jboss.weld.weld-api>2.0.Final</libraries.version.org.jboss.weld.weld-api>
<libraries.version.org.jboss.arquillian.container.arquillian-glassfish-remote-3.1>1.0.0.CR4
</libraries.version.org.jboss.arquillian.container.arquillian-glassfish-remote-3.1>
<libraries.version.org.jboss.spec.javax.servlet.jstl.jboss-jstl-api_1.2_spec>1.0.3.Final
</libraries.version.org.jboss.spec.javax.servlet.jstl.jboss-jstl-api_1.2_spec>
<libraries.version.org.jboss.arquillian.arquillian-bom>1.1.1.Final
</libraries.version.org.jboss.arquillian.arquillian-bom>
<libraries.version.xalan.xalan>2.7.1</libraries.version.xalan.xalan>
<libraries.version.joda-time.joda-time>2.2</libraries.version.joda-time.joda-time>
<libraries.version.junit.junit>4.11</libraries.version.junit.junit>
<libraries.version.org.apache.commons.commons-lang3>3.1</libraries.version.org.apache.commons.commons-lang3>
<libraries.version.commons-collections.commons-collections>3.2.1</libraries.version.commons-collections.commons-collections>
<libraries.version.commons-io.commons-io>2.4</libraries.version.commons-io.commons-io>

<!-- plugins format: "plugins.version.<groupid>.<artifactid>" -->
<plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin>7.4.Final</plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin>
<plugins.version.org.apache.maven.plugins.maven-compiler-plugin>3.1</plugins.version.org.apache.maven.plugins.maven-compiler-plugin>
<plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin>7.4.Final</plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin>
</properties>

<dependencyManagement>


<dependencies>
<!-- thenaglecode projects -->
<dependency>
<groupId>com.thenaglecode</groupId>
<artifactId>core</artifactId>
<version>${thenaglecode.version}</version>
</dependency>
<dependency>
<groupId>com.thenaglecode</groupId>
<artifactId>web</artifactId>
<version>${thenaglecode.version}</version>
</dependency>
<dependency>
<groupId>com.thenaglecode</groupId>
<artifactId>algorithms</artifactId>
<version>${thenaglecode.version}</version>
</dependency>

<!-- third party libraries -->
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${libraries.version.org.jboss.arquillian.arquillian-bom}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<version>${libraries.version.org.jboss.spec.jboss-javaee-all-6.0}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${libraries.version.org.apache.commons.commons-lang3}</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${libraries.version.commons-collections.commons-collections}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${libraries.version.commons-io.commons-io}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${libraries.version.junit.junit}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet.jstl</groupId>
<artifactId>jboss-jstl-api_1.2_spec</artifactId>
<version>${libraries.version.org.jboss.spec.javax.servlet.jstl.jboss-jstl-api_1.2_spec}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>${libraries.version.xalan.xalan}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${libraries.version.joda-time.joda-time}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugins.version.org.apache.maven.plugins.maven-compiler-plugin}</version>
<configuration>
<source>${thenaglecode.java.compiler.version}</source>
<target>${thenaglecode.java.compiler.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${plugins.version.org.jboss.as.plugins.jboss-as-maven-plugin}</version>
<configuration>
<javaHome>${thenaglecode.java.home}</javaHome>
<execute-commands/>
<executeCommands/>
</configuration>
</plugin>
</plugins>
</build>
</project>

最佳答案

在 Maven 3.1 中,他们转而使用 eclipse aether。 jboss-as-maven-plugin 使用 Sonatype aether 就像我们 Maven 3.0.x 使用的那样。这两个版本不兼容,这意味着需要两个不同的插件。一个用于 Maven 3.1,一个用于 Maven 3.0.x。

请注意,如您所见,这只会影响运行和开始目标。没有解决方法。在发布支持 eclipse aether 的 jboss-as-maven-plugin 之前,您必须使用 Maven 3.0.x。

关于java - maven jboss-as :start A required class was missing . .. org/sonaty.../ArtifactResolutionException 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18609590/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com