Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Add independent mojo plugin for generation #48

Merged
merged 1 commit into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 32 additions & 4 deletions catalog-generation-plugin-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<build>
<plugins>
<plugin>
<artifactId>generator-plugin</artifactId>
<groupId>uk.gov.justice.maven.generator</groupId>
<version>${generator-maven-plugin.version}</version>
<groupId>uk.gov.justice.schema</groupId>
<artifactId>catalog-generation-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>internal-jsons</id>
Expand All @@ -42,7 +42,7 @@
</generatorProperties>
</configuration>
<goals>
<goal>generate</goal>
<goal>generate-schema-catalog</goal>
</goals>
<phase>generate-sources</phase>
</execution>
Expand All @@ -55,6 +55,34 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${plugins.maven.enforcer.version}</version>
<executions>
<execution>
<id>enforce-rules</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>${enforcer.java.version.range}</version>
</requireJavaVersion>
<requireMavenVersion>
<version>${enforcer.maven.version.range}</version>
</requireMavenVersion>
<requirePluginVersions>
<message>Please define plugin versions</message>
<banSnapshots>false</banSnapshots>
</requirePluginVersions>
<dependencyConvergence/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
54 changes: 54 additions & 0 deletions catalog-generation-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>json-schema-catalog</artifactId>
<groupId>uk.gov.justice.schema</groupId>
<version>1.5.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>catalog-generation-plugin</artifactId>
<packaging>maven-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${plugins.maven-plugin-plugin.version}</version>
<configuration>
<skip>false</skip>
<goalPrefix>raml</goalPrefix>
</configuration>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>uk.gov.justice.maven.generator</groupId>
<artifactId>generator-plugin</artifactId>
<version>${generator-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -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 {
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<module>schema-service</module>
<module>schema-example-context</module>
<module>catalog-test-utils</module>
<module>catalog-generation-plugin</module>
</modules>

<properties>
Expand Down