First of all, download Mavenizer, the easiest solution is to download mavenizer-cli-$version-jar-with-dependencies.jar. It is a executable jar which includes all required dependencies to run. It requires a JRE 1.5 to run.

Using Mavenizer involves 4 steps:

Step 1: Preparation

Download the distribution(s) of the project(s) you want to mavenize. Additionally, if the project depends on other libraries not included in the distribution, then download their distribution also.

Uncompress each downloaded distribution to a folder, ideally one folder for each distribution. Mavenizer allows to specify as many search directories as necessary.

Step 2: Analysis

First of all, run Mavenizer without any parameter to display the usage:

java -jar mavenizer-cli-${version}-jar-with-dependencies.jar

It will display the following usage:

Usage: mavenizer [ command ] -workdir WORKDIR [ command-options-and-arguments ]
  where command is analyse or generate
  where WORKDIR is mavenizer's working directory for this analysis
  where command-options-and-arguments depend on the specific command

Detailed usage:
  mavenizer analyse -workdir WORKDIR searchfile [ searchfiles ... ]
    where searchfile can be a directory or a jar file (not a url)

  mavenizer generate -workdir WORKDIR

Type the analyse command. Replace WORKDIR with the root directory of your mavenization project. Replace searchfile with the folder in which you uncompressed the distribution. If you uncompressed additional distributions, then specify them after on the command line.

Mavenizer which will crawl through the jars in the distribution, and for each jar:

  • analyse the bytecode of the compiled classes
  • analyse common descriptors: MANIFEST, ...
  • analyse the filename

Mavenizer will build a dependency graph of all the jars and for each jar will try to guess:

  • version
  • groupId
  • artifactId
  • licence
  • ...

In order to guess those informations, a set of rules will be applied in turn.

Because this analysis is likely to make mistakes (ambiguous or missing information), or because you might want to customize the metadata, the result of the analysis is stored in a document.

Step 3: User customization

Edit the mavenizer.xml document generated during the analysis to fill in the gaps and correct the errors. It has been generated in WORKDIR/ and conforms to that XML Schema.

Once you're happy with the result, you can process with the next step.

Step 4: Maven repository metadata generation

In order to launch the generation, type the following command:

  mavenizer generate -workdir WORKDIR

The WORKDIR here has to be the same as the one you mentionned to the analyse command.

Mavenizer will load the analysis document and generate a full Maven 2 repository out of it with all the metadata files. Check that the generated repository looks ok. If not just delete it, edit the analysis document and relaunch the generation.


The artifacts can then either be used on a corporate intranet maven 2 repository or better be submitted to Maven 2 public repositories.