Невозможно запустить весеннюю загрузку с помощью команды maven. org / springfrawork / asm / ClassValidator отсутствует - PullRequest
0 голосов
/ 14 сентября 2018

Я новичок в весенней загрузке и пытался запустить мою программу "Hello World", используя ту же самую версию.

Я пытался настроить проект и выполнить команду maven (mvn spring-boot:run) для запуска загрузки пружины, но я сталкиваюсь с ошибкой ниже

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.283s
[INFO] Finished at: Fri Sep 14 20:46:39 IST 2018
[INFO] Final Memory: 16M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:run (default-cli) on project com.ravi.springboot: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:run failed: A required class was missing while executing org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:run: org/springframework/asm/ClassVisitor
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/MavenRepository/org/springframework/boot/spring-boot-maven-plugin/2.0.5.RELEASE/spring-boot-maven-plugin-2.0.5.RELEASE.jar
[ERROR] urls[1] = file:/C:/MavenRepository/org/springframework/boot/spring-boot-loader-tools/2.0.5.RELEASE/spring-boot-loader-tools-2.0.5.RELEASE.jar
[ERROR] urls[2] = file:/C:/MavenRepository/org/springframework/spring-core/5.0.9.RELEASE/spring-core-5.0.9.RELEASE.jar
[ERROR] urls[3] = file:/C:/MavenRepository/org/springframework/spring-jcl/5.0.9.RELEASE/spring-jcl-5.0.9.RELEASE.jar
[ERROR] urls[4] = file:/C:/MavenRepository/org/apache/commons/commons-compress/1.14/commons-compress-1.14.jar
[ERROR] urls[5] = file:/C:/MavenRepository/org/apache/maven/maven-archiver/2.6/maven-archiver-2.6.jar
[ERROR] urls[6] = file:/C:/MavenRepository/org/apache/maven/shared/maven-shared-utils/0.7/maven-shared-utils-0.7.jar
[ERROR] urls[7] = file:/C:/MavenRepository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[8] = file:/C:/MavenRepository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
[ERROR] urls[9] = file:/C:/MavenRepository/org/eclipse/aether/aether-spi/0.9.0.M2/aether-spi-0.9.0.M2.jar
[ERROR] urls[10] = file:/C:/MavenRepository/org/eclipse/aether/aether-impl/0.9.0.M2/aether-impl-0.9.0.M2.jar
[ERROR] urls[11] = file:/C:/MavenRepository/org/eclipse/aether/aether-api/0.9.0.M2/aether-api-0.9.0.M2.jar
[ERROR] urls[12] = file:/C:/MavenRepository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[13] = file:/C:/MavenRepository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.0.0.M5/org.eclipse.sisu.plexus-0.0.0.M5.jar
[ERROR] urls[14] = file:/C:/MavenRepository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[15] = file:/C:/MavenRepository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[16] = file:/C:/MavenRepository/javax/inject/javax.inject/1/javax.inject-1.jar
[ERROR] urls[17] = file:/C:/MavenRepository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
[ERROR] urls[18] = file:/C:/MavenRepository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[19] = file:/C:/MavenRepository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar
[ERROR] urls[20] = file:/C:/MavenRepository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[21] = file:/C:/MavenRepository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[22] = file:/C:/MavenRepository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[23] = file:/C:/MavenRepository/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
[ERROR] urls[24] = file:/C:/MavenRepository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
[ERROR] urls[25] = file:/C:/MavenRepository/log4j/log4j/1.2.12/log4j-1.2.12.jar
[ERROR] urls[26] = file:/C:/MavenRepository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[ERROR] urls[27] = file:/C:/MavenRepository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[28] = file:/C:/MavenRepository/junit/junit/4.12/junit-4.12.jar
[ERROR] urls[29] = file:/C:/MavenRepository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] urls[30] = file:/C:/MavenRepository/org/codehaus/plexus/plexus-archiver/2.8.1/plexus-archiver-2.8.1.jar
[ERROR] urls[31] = file:/C:/MavenRepository/org/codehaus/plexus/plexus-io/2.3.2/plexus-io-2.3.2.jar
[ERROR] urls[32] = file:/C:/MavenRepository/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.jar
[ERROR] urls[33] = file:/C:/MavenRepository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[34] = file:/C:/MavenRepository/org/apache/maven/plugins/maven-shade-plugin/2.2/maven-shade-plugin-2.2.jar
[ERROR] urls[35] = file:/C:/MavenRepository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[36] = file:/C:/MavenRepository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[37] = file:/C:/MavenRepository/asm/asm/3.3.1/asm-3.3.1.jar
[ERROR] urls[38] = file:/C:/MavenRepository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
[ERROR] urls[39] = file:/C:/MavenRepository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
[ERROR] urls[40] = file:/C:/MavenRepository/org/jdom/jdom/1.1/jdom-1.1.jar
[ERROR] urls[41] = file:/C:/MavenRepository/org/apache/maven/shared/maven-dependency-tree/2.1/maven-dependency-tree-2.1.jar
[ERROR] urls[42] = file:/C:/MavenRepository/org/vafer/jdependency/0.7/jdependency-0.7.jar
[ERROR] urls[43] = file:/C:/MavenRepository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
[ERROR] urls[44] = file:/C:/MavenRepository/asm/asm-analysis/3.2/asm-analysis-3.2.jar
[ERROR] urls[45] = file:/C:/MavenRepository/asm/asm-util/3.2/asm-util-3.2.jar
[ERROR] urls[46] = file:/C:/MavenRepository/com/google/guava/guava/11.0.2/guava-11.0.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.springframework.asm.ClassVisitor
[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/PluginContainerException

Вот мой 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>springboot-tutorial</groupId>
<artifactId>com.ravi.springboot</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>

<name>springboot-tutorial</name>
<description>Project to gain knowledge on springboot and web servcies</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.RELEASE</version>
</parent>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>com.ravi.springboot.HelloWorld</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>
</project>

Я также попытался добавить перечисленные ниже артефакты после некоторого поиска в Google.

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-asm</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>

убрал вышесказанное, когда оно не работало, и добавил ниже

 <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>org.springframework.asm</artifactId>
     <version>3.1.0.RELEASE</version>
  </dependency>

но, похоже, ничего не получилось.

Пожалуйста, помогите мне решить проблему.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...