Artifact Spy Plugin

A small Maven plugin that spies out all the artifacts that are produced by a Maven build.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.itemis.maven.plugins
ArtifactId

ArtifactId

artifact-spy-plugin
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Artifact Spy Plugin
A small Maven plugin that spies out all the artifacts that are produced by a Maven build.
Project URL

Project URL

https://github.com/shillner/artifact-spy-plugin
Project Organization

Project Organization

itemis AG
Source Code Management

Source Code Management

https://github.com/shillner/artifact-spy-plugin

Download artifact-spy-plugin

How to add to project

<plugin>
    <groupId>com.itemis.maven.plugins</groupId>
    <artifactId>artifact-spy-plugin</artifactId>
    <version>1.0.6</version>
</plugin>

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.3.9
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

Project Modules

There are no modules declared in this project.

Artifact Spy Plugin

Maven Central

The purpose of this plugin is to spy out the artifacts that are produced by a project build. It serializes the project artifact and all attached artifacts into a properties file with the following format:

  • key: the artifact's coordinates (groupId:artifactId:type:version:classifier)
  • value: the filepath of the artifact relative to the project's base directory

The path of the artifact properties file can be adapted using the parameter outputFile and is by default set to ${project.build.directory}/artifact-spy/artifacts.properties.

Sample usage

<project>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>com.itemis.maven.plugins</groupId>
        <artifactId>artifact-spy-plugin</artifactId>
        <version>${version.artifact-spy-plugin}</version>
        <executions>
          <execution>
            <id>spy-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>spy</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.directory}/spy/artifacts.properties</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Sample output

Project with packaging 'pom'

#
#Wed Apr 27 09:26:52 CEST 2016
com.itemis.maven.plugins\:org-parent\:pom\:1=pom.xml

Project with packaging 'jar'

#
#Wed Apr 27 08:51:13 CEST 2016
com.itemis.maven.plugins\:cdi-plugin-utils\:jar\:1.0.0=target/cdi-plugin-utils-1.0.0.jar

Project attaching an additional artifact

#
#Wed Apr 27 09:08:03 CEST 2016
com.itemis.maven.plugins\:ump-it-core\:zip\:pack\:0.0.1=target/ump-it-core-resources-0.0.1.zip
com.itemis.maven.plugins\:ump-it-core\:jar\:0.0.1=target/ump-it-core-0.0.1.jar
com.itemis.maven.plugins\:ump-it-core\:pom\:0.0.1=pom.xml

Versions

Version
1.0.6
1.0.5
1.0.3
1.0.2
1.0.1
1.0.0