Skip to content

freddy33/maven2gradle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This tool obtains the effective pom of the current project, reads its dependencies and generates build.gradle scripts.

Features list:

  • Uses effective pom and effective settings (support for pom inheritance, dependency management, properties)
  • Supports both single module and multimodule projects
  • Generates settings.gradle for multimodule projects
  • Supports custom module names (that differ from directory names)
  • Generates general metadata - id, description and version
  • Applies maven, java and war plugins (as needed)
  • Supports packaging war projects as jars if needed
  • Generates dependencies (both external and inter-module)
  • Generates download repositories (inc. local maven repository)
  • Adjusts java compiler settings
  • Supports packaging of sources and tests
  • Supports testng runner
  • Generates global exclusions from Maven enforcer plugin settings

To do:

  • Generate deployment settings (with support to optional dependencies and provided scope in generated pom.xml)
  • Add installation task to build.gradle of the project to setup the libs and scripts automatically.

Installation:

  • Current version works with Gradle 0.9-rc-3 only.
  • Download the latest jar from JFrog Artifactory repository
  • Put the jar into $GRADLE_HOME/lib
  • Put the batch files from sources bin directory into $GRADLE_HOME/bin

Usage:

  • Run maven2gradle batch in the root of the converted project

Available options:

  • -verbose prints the obtained effective pom
  • -keepFile saves the obtained effective pom

Building from source:

Note: Your project will be considered multi-module only if your reactor is also a parent of at least one of your modules. Why so? Reactor project is built last, when Parent project is built first. I need reactor to be built first, because effective-pom Mojo generates needed output only if it founds modules in first project it encounters. Making reactor also a parent achieves this.

Antony Stubbs

Baruch Sadogursky

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 100.0%