Skip to content

Gradle plugin which steals dependency information from pom.xml files

License

Notifications You must be signed in to change notification settings

wfhartford/gradle-maven-thief

Repository files navigation

gradle-maven-thief

Download Build Status

Gradle plugin which steals project information from pom.xml files.

This plugin attempts to parse Maven pom.xml files in the project directory and apply the project settings to the gradle build. It does not add any tasks to the project, but is executed only in the configuration phase.

This plugin works in the configuration phase of the build, and applies the dependency information from Maven pom.xml files to the current build. This differs from the built-in gradle init plugin, which can generate build.gradle files for a project based on the Maven pom.xml files. The init plugin is intended to assist in the transition from Maven to Gradle. The Thief plugin is intended to facilitate use of Maven and Gradle in parallel by reducing the amount of duplicate configuration required.

Goal

The goal of this plugin is to allow parallel development using Maven and Gradle. Why on earth would someone want to do that? I certainly wouldn't recommend it in most cases, though it can be quite useful in a few rare situations such as:

  • Demonstrating what a build might look like if it was transitioned from Maven to Gradle
  • To facilitate a gradual transition from Maven to Gradle.
  • To allow developers to take advantage of the superior performance and features of Gradle while still supporting some complex build requirements implemented by Maven plugins.

Non-Goals

This plugin does not attempt to replicate all maven configuration options, nor to configure anything to replace the plethora of Maven plugins.

Dependencies

This plugin parses pom.xml files for dependencies, then adds those dependencies to the appropriate configuration of the gradle project. The parsing of pom.xml files is quite simple, but supports some commonly used features of maven including

  • Dependency Management
  • Project Properties
  • Parent POM files (only when the relativePath element is used)
  • Dependency Exclusions

Source Directories

This plugin parses pom.xml files for project source directories and sets the gradle source sets to match the maven POM. If the POM file does not contain any source directory settings, the plugin uses the maven defaults, which match the gradle defaults.

About

Gradle plugin which steals dependency information from pom.xml files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages