My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

mavenize

This tool will take any number of existing java projects and

  • Generate the maven directory structure.
  • Split source and resource files apart and drop them into the relevant directory.
  • Generate a default pom with configurable version and package types.
  • Generate group id's based on the most common package prefix.
  • Generate artifact id's based on project title.

If the source project is a "NetBeans" module it will read the project description files and generate dependencies.

Arguments:

  • -i {input directory path}
  • -o {output directory path}
  • -t {project type} (Optional - only choice apart from default is 'netbeans')
  • -v {version} (Optional - defaults to 1.0.0)
  • -p {packaging} (Optional - defaults to JAR)

Typical usage:

java -jar mavenize-1.0.0.jar -iC:\Development\java\project\original -oC:\Development\java\project\mavenized
java -jar mavenize-1.0.0.jar -iC:\Development\java\original -oC:\Development\java\mavenized -v0.0.1-SNAPSHOT -pZIP

How It Works

The tool will search for each occurrence of a "src" directory under the input directory and treat each one it finds as a new project. It will then recreate the mavenized directory structures under the output directory with the pom in the appropriate place.

The group id will be generated based on the most common package prefix for the source files being processed within a project.

The artifact id will be the lowercase version of the top level project directory i.e. the one that contains the "src" directory.

Tips

  • Don't make the output directory the same as the input. That wouldn't be very clever.
  • There is a companion tool to this called pommel which will replace dependencies for you. See links at the side.

Java

Uses Java 1.6+

Powered by Google Project Hosting