project-artifact-info-maven-plugin
A Maven plugin for supporting execution of install:install and deploy:deploy goals outside of Maven build lifecycle. It is meant to be used in build pipelines, where project is built and deployed in separate steps.
Getting started
Add project-artifact-info-maven-plugin
plugin to your project's pom.xml
:
<project>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>ee.originaal.maven.plugins</groupId>
<artifactId>project-artifact-info-maven-plugin</artifactId>
<version>LATEST</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Build your project and persist artifact info to disk (target/project-artifacts.txt
by default)
mvn clean verify project-artifact-info:persist
Restore artifact info from disk (target/project-artifacts.txt
by default) and install/deploy
mvn project-artifact-info:restore install:install
# or
mvn project-artifact-info:restore deploy:deploy
Goals
Goal | Description |
---|---|
project-artifact-info:persist |
Persists details (type, classifier and file path) of every built artifact to disk so that we can restore them later. |
project-artifact-info:restore |
Restores previously built artifacts' details (type, classifier and file path) from disk so that we can execute install:install and deploy:deploy without rebuilding the project. |
Optional parameters
Name | Type | Description |
---|---|---|
<filename> |
String | The name of the file where artifact details are stored Default value is: project-artifacts.txt User property is: project-artifact-info.filename |
<directory> |
File | The directory where artifact info file is stored Default value is: ${project.build.directory} User property is: project-artifact-info.directory |