Skip to content

Commit

Permalink
fix fabric8io#4540: moving extension model generation to a profile
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Nov 28, 2022
1 parent 80f6c90 commit 005c621
Show file tree
Hide file tree
Showing 28 changed files with 621 additions and 339 deletions.
56 changes: 33 additions & 23 deletions extensions/camel-k/model-v1/pom.xml
Expand Up @@ -78,32 +78,42 @@
<scope>provided</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<!-- removing the generated Schema class -->
<delete
file="${generate.targetDirectory}/io/fabric8/camelk/api/model/CamelKSchemaV1.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<!-- removing the generated Schema class -->
<delete
file="${generate.targetDirectory}/io/fabric8/camelk/api/model/CamelKSchemaV1.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down
58 changes: 34 additions & 24 deletions extensions/camel-k/model-v1alpha1/pom.xml
Expand Up @@ -85,32 +85,42 @@
<scope>provided</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<!-- removing the generated Schema class -->
<delete
file="${generate.targetDirectory}/io/fabric8/camelk/api/model/CamelKSchemaV1alpha1.java"
verbose="true"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugins>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<!-- removing the generated Schema class -->
<delete
file="${generate.targetDirectory}/io/fabric8/camelk/api/model/CamelKSchemaV1alpha1.java"
verbose="true"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down
56 changes: 33 additions & 23 deletions extensions/certmanager/model-v1/pom.xml
Expand Up @@ -81,32 +81,42 @@
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<echo>removing the duplicate generated class</echo>
<delete
file="${generate.targetDirectory}/io/fabric8/certmanager/api/model/v1/CertificateRequestSpec.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<echo>removing the duplicate generated class</echo>
<delete
file="${generate.targetDirectory}/io/fabric8/certmanager/api/model/v1/CertificateRequestSpec.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
18 changes: 14 additions & 4 deletions extensions/certmanager/model-v1alpha2/pom.xml
Expand Up @@ -73,13 +73,23 @@
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
18 changes: 14 additions & 4 deletions extensions/certmanager/model-v1alpha3/pom.xml
Expand Up @@ -73,13 +73,23 @@
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
56 changes: 33 additions & 23 deletions extensions/certmanager/model-v1beta1/pom.xml
Expand Up @@ -73,32 +73,42 @@
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<echo>removing the duplicate generated class</echo>
<delete
file="${generate.targetDirectory}/io/fabric8/certmanager/api/model/v1beta1/CertificateRequestSpec.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<echo>removing the duplicate generated class</echo>
<delete
file="${generate.targetDirectory}/io/fabric8/certmanager/api/model/v1beta1/CertificateRequestSpec.java"
verbose="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
18 changes: 14 additions & 4 deletions extensions/chaosmesh/model/pom.xml
Expand Up @@ -74,12 +74,22 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down

0 comments on commit 005c621

Please sign in to comment.