therore-artifact-cache-plugin

Therore Artifact Cache Plugin

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.therore
Идентификатор

Идентификатор

therore-artifact-cache-plugin
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

therore-artifact-cache-plugin
Therore Artifact Cache Plugin
Ссылка на сайт

Ссылка на сайт

https://github.com/alfredodiaz/therore-artifact-cache-plugin
Система контроля версий

Система контроля версий

http://github.com/alfredodiaz/therore-artifact-cache-plugin

Скачать therore-artifact-cache-plugin

Как подключить последнюю версию

<plugin>
    <groupId>net.therore</groupId>
    <artifactId>therore-artifact-cache-plugin</artifactId>
    <version>1.0.2</version>
</plugin>

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.apache.maven.shared : maven-artifact-transfer jar 0.9.1
org.codehaus.groovy : groovy-all jar 2.4.10

provided (6)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.5.2
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.1
org.apache.maven : maven-core jar 3.5.2
org.apache.maven : maven-compat jar 3.5.2
org.apache.logging.log4j : log4j-api jar 2.8.2
org.apache.logging.log4j : log4j-core jar 2.8.2

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Therore Artifact Cache Plugin

License Maven Central

With this maven plugin you can use any maven repository as a cache for external resources.

For example, supose you want to store the OpenJDK binaries in your maven repository. This could be helpful to reduce the download time or to ensure availability of that resource in the future.

Configuring the plugin like we show, you could do this task automatically.

<plugin>
  <groupId>net.therore</groupId>
  <artifactId>therore-artifact-cache-plugin</artifactId>
  <version>1.0.2</version>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>cache</goal>
      </goals>
      <configuration>
        <resources>
          <resource>
            <sourceURL>https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz</sourceURL>
            <groupId>net.java</groupId>
            <artifactId>openjdk</artifactId>
            <version>9.0.4</version>
            <classifier>linux-x64_bin</classifier>
            <type>tar.gz</type>
          </resource>
        </resources>
      </configuration>
    </execution>
  </executions>
</plugin>

How it works

The plugin first checks if the resource is available in any remote repository. Only if the resource is not found, the sourceURL will be used to download it. Then the downloaded file will be uploaded to the remote repository configured in your pom file.

After the plugin execution, the original resource (OpenJDK in our example) should be available in your remote repository.

You can follow its process through maven logs.

[INFO] --- therore-artifact-cache-plugin:1.0.2:cache (default) @ therore-artifact-cache-plugin-test ---
[WARNING] The POM for net.java:openjdk:tar.gz:linux-x64_bin:9.0.4 is missing, no dependency information available
[ERROR] Failure to find net.java:openjdk:tar.gz:linux-x64_bin:9.0.4 in http://nexus.therore.net/repository/public was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
[INFO] downloading openjdk-9.0.4_linux-x64_bin.tar.gz from https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
Uploading: http://nexus.therore.net/repository/public/net/java/openjdk/9.0.4/openjdk-9.0.4-linux-x64_bin.tar.gz
Uploaded: http://nexus.therore.net/repository/public/net/java/openjdk/9.0.4/openjdk-9.0.4-linux-x64_bin.tar.gz (201191 KB at 48189.2 KB/sec)
Downloading: http://nexus.therore.net/repository/public/net/java/openjdk/maven-metadata.xml
Uploading: http://nexus.therore.net/repository/public/net/java/openjdk/maven-metadata.xml
Uploaded: http://nexus.therore.net/repository/public/net/java/openjdk/maven-metadata.xml (295 B at 288.1 KB/sec)

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0