jOOQ/jOOQ — pull request #3615 by sean8223 (2014-09-01 16:41:51+00:00)
Title: Integrated SBT plugin from: https://github.com/sean8223/jooq-sbt-plugin

Re: https://github.com/sean8223/jooq-sbt-plugin/issues/1, I've created a new Maven module that provides a SBT plugin for jOOQ as a part of the core project.

The module adds the standard Typesafe releases repo to the build and declares a dependency on SBT. The specific version is configurable via the sbt.version property in the POM.

The plugin is built as follows:

1. An SBT project is generated via the maven-resources-plugin, using the build.sbt contained in src/main/sbt. The name, organization and version variables are passed in from Maven (replaced with project.artifactId, project.groupId and project.version);

2. The source of the plugin is copied from src/main/scala into this project, also via the maven-resources-plugin;

3. "sbt package" is invoked on the generated project via the maven-exec-plugin

4. The result of this command is a JAR file containing the plugin. This is fished out of the SBT build tree by the maven-antrun-plugin and replaces the the default-jar output.

The plugin installs as a JAR artifact referencable as org.jooq:jooq-codegen-sbt:

The only differences from the original plugin are:

1. The name/version of the plugin artifact have been changed from sean8223/jooq-sbt-plugin to org.jooq/jooq-codegen-sbt, and they inherit the current version of jOOQ;

2. The plugin class itself was renamed to "jOOQPlugin" (lowercase "j") and moved to the org.jooq.util.sbt namespace.

Next steps, pending review and acceptance of the code, are to test the integration with SBT by building/installing to a snapshot repository and verifying that a test SBT project is able to link to and download the refactored plugin.