Не могу загрузить затененную банку в Nexus - PullRequest
1 голос
/ 29 сентября 2019

Я пытаюсь развернуть проект maven на нашем Nexus, используя Gitlab-Ci, но конвейер всегда терпит неудачу при попытке загрузить shaded-jar, созданный maven-shade-plugin.Любые идеи, почему это так?

Ошибка конвейера:

[INFO] Uploading to pp-snapshots: https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/net/myplayplanet/MyPlayPlanet-Core/1.14.0-SNAPSHOT/MyPlayPlanet-Core-1.14.0-20190929.002150-7-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:53 min
[INFO] Finished at: 2019-09-29T00:21:51Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project MyPlayPlanet-Core: Failed to deploy artifacts: Could not transfer artifact net.myplayplanet:MyPlayPlanet-Core:jar:shaded:1.14.0-20190929.002150-7 from/to pp-snapshots (https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/): Connection reset by peer (Write failed) -> [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/MojoExecutionException

Конфигурация плагина-тени:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.1</version>
    <configuration>
        <shadedArtifactAttached>true</shadedArtifactAttached>
        <filters>
            <filter>
                <artifact>*:*</artifact>
                <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                </excludes>
            </filter>
        </filters>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Ответы [ 2 ]

1 голос
/ 29 сентября 2019

Похоже, я использовал неправильное изображение maven.Я просто использовал maven: latest, но когда я изменил его на maven: 3.6.2-jdk-8, он снова работает.

0 голосов
/ 29 сентября 2019

Ошибка:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) 
  on project MyPlayPlanet-Core: 

Failed to deploy artifacts: 

Could not transfer artifact net.myplayplanet:MyPlayPlanet-Core:jar:shaded:1.14.0-20190929.002150-7 
from/to pp-snapshots (https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/)

Connection reset by peer (Write failed)

Проверьте размер артефакта снимка, может быть проблема с ограничением размера.

Проверьте также вашу версию JDK, используемую локально, как в эта проблема

Отключение протокола TLS 1.3 с помощью:

-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
...