From c36101d1e721c6f9a20833d0425c2a2d69dc376d Mon Sep 17 00:00:00 2001 From: Shaun Francis Date: Mon, 11 Mar 2019 11:25:43 +0000 Subject: [PATCH] Add independent mojo plugin for generation --- CHANGELOG.md | 5 ++ catalog-generation-plugin-it/pom.xml | 36 +++++++++++-- catalog-generation-plugin/pom.xml | 54 +++++++++++++++++++ .../catalog/maven/CatalogGenerationMojo.java | 12 +++++ pom.xml | 1 + 5 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 catalog-generation-plugin/pom.xml create mode 100644 catalog-generation-plugin/src/main/java/uk/gov/justice/schema/catalog/maven/CatalogGenerationMojo.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 45970f9..8d418c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ on [Keep a CHANGELOG](http://keepachangelog.com/). This project adheres to ## Unreleased +## [1.6.0] - 2019-03-11 + +### Added +- Maven Mojo which allows independent dependency setting + ## [1.5.0] - 2019-02-18 ### Changed diff --git a/catalog-generation-plugin-it/pom.xml b/catalog-generation-plugin-it/pom.xml index 07884f9..b736b30 100644 --- a/catalog-generation-plugin-it/pom.xml +++ b/catalog-generation-plugin-it/pom.xml @@ -14,9 +14,9 @@ - generator-plugin - uk.gov.justice.maven.generator - ${generator-maven-plugin.version} + uk.gov.justice.schema + catalog-generation-plugin + ${project.version} internal-jsons @@ -42,7 +42,7 @@ - generate + generate-schema-catalog generate-sources @@ -55,6 +55,34 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${plugins.maven.enforcer.version} + + + enforce-rules + + enforce + + + + + ${enforcer.java.version.range} + + + ${enforcer.maven.version.range} + + + Please define plugin versions + false + + + + + + + diff --git a/catalog-generation-plugin/pom.xml b/catalog-generation-plugin/pom.xml new file mode 100644 index 0000000..a63f2fb --- /dev/null +++ b/catalog-generation-plugin/pom.xml @@ -0,0 +1,54 @@ + + + + json-schema-catalog + uk.gov.justice.schema + 1.5.1-SNAPSHOT + + 4.0.0 + + catalog-generation-plugin + maven-plugin + + + + + org.apache.maven.plugins + maven-plugin-plugin + ${plugins.maven-plugin-plugin.version} + + false + raml + + + + default-descriptor + process-classes + + + + + + + + + uk.gov.justice.maven.generator + generator-plugin + ${generator-maven-plugin.version} + + + org.apache.maven.plugin-tools + maven-plugin-annotations + provided + + + org.apache.maven + maven-artifact + + + + + + \ No newline at end of file diff --git a/catalog-generation-plugin/src/main/java/uk/gov/justice/schema/catalog/maven/CatalogGenerationMojo.java b/catalog-generation-plugin/src/main/java/uk/gov/justice/schema/catalog/maven/CatalogGenerationMojo.java new file mode 100644 index 0000000..b3ff715 --- /dev/null +++ b/catalog-generation-plugin/src/main/java/uk/gov/justice/schema/catalog/maven/CatalogGenerationMojo.java @@ -0,0 +1,12 @@ +package uk.gov.justice.schema.catalog.maven; + +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; +import static org.apache.maven.plugins.annotations.ResolutionScope.COMPILE_PLUS_RUNTIME; + +import uk.gov.justice.maven.generator.io.files.parser.generator.GenerateMojo; + +import org.apache.maven.plugins.annotations.Mojo; + +@Mojo(name = "generate-schema-catalog", requiresDependencyResolution = COMPILE_PLUS_RUNTIME, defaultPhase = GENERATE_SOURCES) +public class CatalogGenerationMojo extends GenerateMojo { +} diff --git a/pom.xml b/pom.xml index d7249a3..6977056 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ schema-service schema-example-context catalog-test-utils + catalog-generation-plugin