Сообщение о сбое сборки отображается, когда я пытаюсь запустить mvn clean install.Хотя файлы .jar присутствуют в библиотеке (репозиторий .m2) - PullRequest
0 голосов
/ 14 сентября 2018

Я уже попробовал следующие шаги: 1. Добавил зависимость в pom.xml 2. Очистить и собрать проект.3. Maven -> Обновление проекта 4. mvn clean install.Тем не менее ошибка сохраняется. Пожалуйста, помогите.

Я добавил изображение, которое показывает, что файлы jar присутствуют в зависимостях maven.Я добавил их вручную.

enter image description here

Зависимости в pom.xml-

<dependencies>

        <!-- https://mvnrepository.com/artifact/log4j/log4j -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.2</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
            <version>1.8</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.31</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>3.0.2.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.codehaus.jettison/jettison -->
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.1</version>
        </dependency>



    </dependencies>

Ошибка на консоли -

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building CreateProjectMyNextHire 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.2/gson-2.8.2.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/sun/jersey/jersey-json/1.8/jersey-json-1.8.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/spring-context/3.0.2.RELEASE/spring-context-3.0.2.RELEASE.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/spring-core/3.0.2.RELEASE/spring-core-3.0.2.RELEASE.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/spring-jdbc/3.0.2.RELEASE/spring-jdbc-3.0.2.RELEASE.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/spring-tx/3.0.2.RELEASE/spring-tx-3.0.2.RELEASE.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/spring-beans/3.0.2.RELEASE/spring-beans-3.0.2.RELEASE.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/jettison/jettison/1.1/jettison-1.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.620 s
[INFO] Finished at: 2018-09-14T19:24:17+05:30
[INFO] Final Memory: 9M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project CreateProjectMyNextHire: Could not resolve dependencies for project com.sgt.pwt:CreateProjectMyNextHire:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at log4j:log4j:jar:1.2.17: Failed to read artifact descriptor for log4j:log4j:jar:1.2.17: Could not transfer artifact log4j:log4j:pom:1.2.17 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [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/DependencyResolutionException
...