An open API service indexing awesome lists of open source software.

https://github.com/wildfly/wildfly-zip-plugin

Provides Plexus components to support 'zip' as a Maven packaging type
https://github.com/wildfly/wildfly-zip-plugin

Last synced: about 1 year ago
JSON representation

Provides Plexus components to support 'zip' as a Maven packaging type

Awesome Lists containing this project

README

          

# wildfly-zip-plugin
Provides Plexus components to support 'zip' as a Maven packaging type. Provides a Maven mojo to attach a configured zip file to the project as the main artifact.

A typical use case for this would be a maven module that uses the `maven-assembly-plugin` to produce a zip, and that zip is the primary output of the module.

This project is primarily a workaround to an issue where `nxrm3-maven-plugin` was having problems dealing with `pom` packaging projects that attached a zip to the project with no Maven classifier. Using this plugin allows the packaging to be `zip` and for the zip file to be used as the main artifact of the module.

# Usage

Imagine a project where `maven-assembly-plugin` or some other tool produces a zip in the `target` dir with a file name equivalent to `${project.artifactId}-${project.version}.zip`. Using this plugin would look like this:

```


....

com.example
foo-zip

zip

....




org.wildfly.plugins
wildfly-zip-plugin
${version.org.wildfly.plugins.wildfly-zip-plugin}

true


org.apache.maven.plugins
maven-assembly-plugin


default-single

prepare-package
....


false

false
....





```

The project provides a `package` mojo that attaches a specified file as the project's main artifact. It supports two configuration options:

* `artifact-directory` -- directory where the artifact is located. Defaults to `${project.build.directory}`.
* `artifact-name` -- file name of the artifact. Defaults to `${project.artifactId}-${project.version}.zip`

When the plugin is used as a maven extension (`true` in the plugin declaration), a `default-package` maven execution will run the `package` goal in the `package` phase.