Maven Mavenizer Plugin
The Mavenizer Plugin aims to facilitate the deployment of non-maven binaries into a maven repository while keeping the whole benefits of Maven dependency management.
It provides a special maven livecycle and some specific goals that helps analysing, installing and deploying JAR files into a Maven repository associated with the appropriate POM definitions. The analysis of the dependencies directly from the binaries helps in creating useful POM definition containing a correct list of dependencies required by these non-maven libraries without requiring access to their sources, and very quickly compared to a complete conversion of the underlying project to Maven.
See thefor the most up to date and more detailed documentation on using this project. Here under is just an quick overview.
Use theto report issue and request support.
This plugin has 6 goals:
- download and extract the binaries of the project
- analyse dependencies between binaries of the project.
- delete analysis results (xml and pom).
- create POM files based on the dependency analysis
- install the binaries of the project with their generated POM to a local repository
- deploy the binaries of the project with their generated POM to a remote repository
The Mavenizer plugin introduce a special lifecyle that could be triggered using a mavenize packaging. The mavenize lifecycle define the following phases:
- generate-sources phase execute the goal which download and extract the binaries of the project
- generate-resources phase execute the goal which analyze dependencies between binaries of the project
- prepare-package phase execute the goal which create POM files based on the dependency analysis
- install phase execute the goal which install the binaries of the project with their generated POM to a local repository
- deploy phase execute the goal which deploy the binaries of the project with their generated POM to a remote repository
For a really quick overview, here is the most common usage and a typical pom.xml file to use the full feature of this plugin:
... some maven dependencies for the binaries
To deploy, just use:
This will download the binary archive of the project and extract, analyse and deploy its libraries to a remote maven repository with appropriate POM file that assure correct dependency management. However, writing such POM is not always a straight forward process, until you have a very good knowledge of the binaries you want to deploy.
The complete procedure to write a correct POM is describe on the Usage page. It will teach you all the details about the usage of this plugin allowing you to deploy almost any set of JARs into a maven properly. If you need more in-depth coverage of the configuration options, you may also read the goals documentation.
For those who learn by example, we ready-made POM file for common non-maven projects: