Skip to content

Commit

Permalink
Differentiate Java packages generation for ODH and RHODS manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Jan 6, 2025
1 parent 0773855 commit 95ba7c6
Showing 1 changed file with 45 additions and 14 deletions.
59 changes: 45 additions & 14 deletions provisioners/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,25 +236,56 @@
<artifactId>java-generator-maven-plugin</artifactId>
<executions>
<execution>
<id>default-crd-generation</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<target>target/generated-sources</target>
<source>src/main/resources/crds</source>
<!--
This is needed to force the Java generator from CRD to stick with the original names
for enums, and avoid to uppercase them, since this could generate duplicate names,
as in https://github.com/infinispan/infinispan-operator/blob/2.3.4.Final/config/crd/bases/infinispan.org_infinispans.yaml#L1473-L1477
-->
<enumUppercase>false</enumUppercase>
<!--
The following is required in order to generate Sundrio and Lombok annotations
-->
<extraAnnotations>true</extraAnnotations>
</configuration>
</execution>
<execution>
<id>odh-crd-generation</id>
<goals>
<goal>generate</goal>
</goals>

<configuration>
<target>target/generated-sources</target>
<source>src/main/resources/crds/rhods</source>
<!--
This is needed to force the Java generator from CRD to stick with the original names
for enums, and avoid to uppercase them, since this could generate duplicate names,
as in https://github.com/infinispan/infinispan-operator/blob/2.3.4.Final/config/crd/bases/infinispan.org_infinispans.yaml#L1473-L1477
-->
<enumUppercase>false</enumUppercase>
<!--
The following is required in order to generate Sundrio and Lombok annotations
-->
<extraAnnotations>true</extraAnnotations>
<!--
Add a prefix for the Red Hat OpenShift AI CRDs generated packages, to avoid conflicts
in the Java model with the upstream Open Data Hub ones
-->
<packageOverrides>
<io.opendatahub.datasciencecluster.v1>rhods.io.opendatahub.datasciencecluster.v1</io.opendatahub.datasciencecluster.v1>
<io.opendatahub.dscinitialization.v1>rhods.io.opendatahub.dscinitialization.v1</io.opendatahub.dscinitialization.v1>
<io.opendatahub.features.v1>rhods.io.opendatahub.features.v1</io.opendatahub.features.v1>
</packageOverrides>
</configuration>
</execution>
</executions>
<configuration>
<target>target/generated-sources</target>
<source>src/main/resources/crds</source>
<!--
This is needed to force the Java generator from CRD to stick with the original names
for enums, and avoid to uppercase them, since this could generate duplicate names,
as in https://github.com/infinispan/infinispan-operator/blob/2.3.4.Final/config/crd/bases/infinispan.org_infinispans.yaml#L1473-L1477
-->
<enumUppercase>false</enumUppercase>
<!--
The following is required in order to generate Sundrio and Lombok annotations
-->
<extraAnnotations>true</extraAnnotations>
</configuration>
</plugin>

<plugin>
Expand Down

0 comments on commit 95ba7c6

Please sign in to comment.