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

https://github.com/jdcasey/build-migration-maven-plugin

Maven plugin to aid in migration from other build systems
https://github.com/jdcasey/build-migration-maven-plugin

Last synced: about 1 year ago
JSON representation

Maven plugin to aid in migration from other build systems

Awesome Lists containing this project

README

          

Build Migration Maven Plugin
============================

This plugin is meant to be a small collection of helpers to smooth the migration path from another build system, like Ant, to Maven. The plugins will probably all be very simple, yet they will address use cases that are currently not supported by any plugin, or are excessively complicated to configure.

The `main-artifact` Goal
------------------------

The `main-artifact` goal can set the file of the project's main artifact and main pom file. It can also attach auxillary artifacts to be deployed (in the same way as the build-helper-maven-plugin)

| Parameters | Type | Required | Description |
| ---------- | ---- | -------- | ----------- |
| mainArtifact | String | No | File path to the new main artifact to deploy |
| mainPom | String | No | File path to the replacement main pom to deploy |
| artifacts | Artifact[] | No | Attach an array of artifacts to the project |

This can be useful if you're wrapping another build system's output with Maven pom.xml files, and need to get Maven to recognize the build output for purposes of installation or deployment. Its use is very simple:


[...]



maven-antrun-plugin


build-ant

run









org.commonjava.maven.plugins
build-migration-maven-plugin
0.4


main-artifact

main-artifact


build/project-1.1.jar
resources/myproject.pom


myproject-sources.jar
jar
sources








By default, the `main-artifact` goal will run in the `package` phase, which means it will normally run after the `jar:jar` goal has run. If you want to disable the `jar:jar` goal, one way to do that is with something like the following:


maven-jar-plugin


**/*

true

This tells the jar plugin to skip all classes, and then skip building the jar (since it would be empty).

Another way would be to bind the maven-jar-plugin to a disabled phase:


maven-jar-plugin


default-jar
DISABLED