Как ускорить maven-deploy-plugin для развертывания артефактов на артефакте? - PullRequest
0 голосов
/ 30 августа 2018

Я использую Maven версию 3.5.4 с версией плагина maven-deploy-plugin 2.8.2 для развертывания моих артефактов в версии Artifactory 6.3.2.

Когда я выполняю mvn deploy -DdeployAtEnd=true, на каждый модуль уходит около 2 минут. У меня есть 15 модулей, что занимает около 30 минут.

Есть ли у нас способ ускорить этот процесс?

Вот моя информация Maven

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 
    2018-06-18T01:33:14+07:00)
Maven home: C:\Java.Application\Apache\apache-maven-3.5.4\bin\..
Java version: 1.8.0_181, vendor: Oracle Corporation, 
    runtime: C:\Java.Application\Sun\Java\jdk1.8.0_181\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Артефактория artifactroy.log

2018-08-30 15:08:16,496 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:08:19,550 - Deploy to 'core-snapshot-local:/some/artifact/maven-metadata.xml' Content-Length: 416
2018-08-30 15:08:22,677 - Deploy to 'core-snapshot-local:/some/artifact/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:08:25,731 - Deploy to 'core-snapshot-local:/some/artifact/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:08:28,800 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-javadoc.jar' Content-Length: 110853
2018-08-30 15:08:32,016 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-javadoc.jar.sha1' Content-Length: 40
2018-08-30 15:08:35,100 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-javadoc.jar.md5' Content-Length: 32
2018-08-30 15:08:38,182 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml' Content-Length: 1868
2018-08-30 15:08:41,413 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:08:42,249 - Indexing archive: core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7.jar
2018-08-30 15:08:42,336 - Indexing archive: core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-javadoc.jar
2018-08-30 15:08:44,462 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:08:47,520 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-javadoc.jar' Content-Length: 221096
2018-08-30 15:08:50,731 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-javadoc.jar.sha1' Content-Length: 40
2018-08-30 15:08:53,816 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-javadoc.jar.md5' Content-Length: 32
2018-08-30 15:08:56,912 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml' Content-Length: 1868
2018-08-30 15:08:59,973 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:09:03,027 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:09:06,084 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-sources.jar' Content-Length: 19103
2018-08-30 15:09:09,293 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-sources.jar.sha1' Content-Length: 40
2018-08-30 15:09:12,886 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-sources.jar.md5' Content-Length: 32
2018-08-30 15:09:16,032 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml' Content-Length: 1868
2018-08-30 15:09:19,086 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:09:22,136 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:09:25,196 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-sources.jar' Content-Length: 66693
2018-08-30 15:09:28,455 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-sources.jar.sha1' Content-Length: 40
2018-08-30 15:09:31,573 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-sources.jar.md5' Content-Length: 32
2018-08-30 15:09:34,665 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml' Content-Length: 1868
2018-08-30 15:09:37,717 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:09:40,771 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32
2018-08-30 15:09:42,250 - Indexing archive: core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-javadoc.jar
2018-08-30 15:09:42,499 - Indexing archive: core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-sources.jar
2018-08-30 15:09:42,565 - Indexing archive: core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-sources.jar
2018-08-30 15:09:43,832 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-tests.jar' Content-Length: 60117
2018-08-30 15:09:47,060 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-tests.jar.sha1' Content-Length: 40
2018-08-30 15:09:50,309 - Deploy to 'core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-tests.jar.md5' Content-Length: 32
2018-08-30 15:09:53,402 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml' Content-Length: 1868
2018-08-30 15:09:56,458 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1' Content-Length: 40
2018-08-30 15:09:59,509 - Deploy to 'core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.md5' Content-Length: 32

Артефактория access.log

2018-08-30 15:07:48,401 [ACCEPTED DOWNLOAD] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:07:48,456 [ACCEPTED DOWNLOAD] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml.sha1 for some-user/some-ip.
2018-08-30 15:07:51,641 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:07:51,642 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7.jar for some-user/some-ip.
2018-08-30 15:08:00,997 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:00,997 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7.pom for some-user/some-ip.
2018-08-30 15:08:01,079 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:07,271 [ACCEPTED DOWNLOAD] core-snapshot-local:/some/artifact/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:07,328 [ACCEPTED DOWNLOAD] core-snapshot-local:/some/artifact/maven-metadata.xml.sha1 for some-user/some-ip.
2018-08-30 15:08:19,594 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:28,919 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:28,920 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-javadoc.jar for some-user/some-ip.
2018-08-30 15:08:47,637 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:08:47,639 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-javadoc.jar for some-user/some-ip.
2018-08-30 15:09:06,192 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:09:06,193 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-sources.jar for some-user/some-ip.
2018-08-30 15:09:25,295 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:09:25,297 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-test-sources.jar for some-user/some-ip.
2018-08-30 15:09:43,950 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/maven-metadata.xml for some-user/some-ip.
2018-08-30 15:09:43,951 [ACCEPTED DEPLOY] core-snapshot-local:/some/artifact/some/version/my-artifact-1.0.2-20180830.080748-7-tests.jar for some-user/some-ip.

РЕДАКТИРОВАТЬ 1

Ранее я обнаружил некоторые проблемы с Maven 3.5.2 здесь , которые дают мне некоторое представление о различиях между Maven 3.3.9 и 3.5.x, версией wagon.

  • Maven 3.3.9 версия универсала 2.10
  • Maven 3.5.4 версия универсала 3.1.0

Опять я копирую maven_home/lib из Maven 3.3.9 в Maven 3.5.4. Все будет быстро, всего 2-3 минуты.

У меня также есть возможность скопировать maven_home/lib из Maven 3.5.4 в Maven 3.3.9. Процесс снова медленный.

РЕДАКТИРОВАТЬ 2

Даже используя wagon версию 2.10 в качестве временного решения, похоже, работает, я также открываю для правильного способа работы с Maven 3.5.4 и надеюсь, что вы можете пролить свет.

1 Ответ

0 голосов
/ 30 августа 2018

Так как wagon версия 2.10 кажется лучше, то временное решение добавляет эти универсалы в качестве расширения на моем pom.xml следующим образом: -

<properties>
    <my.wagon.vesion>2.10</my.wagon.vesion>
</properties>

<build>
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
            <version>${my.wagon.vesion}</version>
        </extension>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-shared</artifactId>
            <version>${my.wagon.vesion}</version>
        </extension>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http</artifactId>
            <version>${my.wagon.vesion}</version>
        </extension>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
            <version>${my.wagon.vesion}</version>
        </extension>
    </extensions>
</build>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...