Skip to content

Commit

Permalink
doc(java-generator): document <dependencies> in pom.xml example
Browse files Browse the repository at this point in the history
  • Loading branch information
matteriben authored Apr 23, 2024
1 parent eaf7cff commit 492264e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#### Improvements
* Fix #5878: (java-generator) Add implements Editable for extraAnnotations
* Fix #5878: (java-generator) Update documentation to include dependencies

#### Dependency Upgrade

Expand Down
63 changes: 47 additions & 16 deletions doc/java-generation-from-CRD.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,53 @@ jbang io.fabric8:java-generator-cli:<version>
The Java generator Maven plugin can be used from your project `pom.xml` adding a section like:

```xml
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>java-generator-maven-plugin</artifactId>
<version>${kubernetes-client.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<source>src/main/resources/kubernetes</source>
...
</configuration>
</plugin>
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
<version>${kubernetes-client.version}</version>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>generator-annotations</artifactId>
<version>${kubernetes-client.version}</version>
</dependency>

<!-- extraAnnotations requires these additional dependencies -->
<dependency>
<groupId>io.sundr</groupId>
<artifactId>builder-annotations</artifactId>
<version>${sundrio.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>java-generator-maven-plugin</artifactId>
<version>${kubernetes-client.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<source>src/main/resources/kubernetes</source>
<!-- .. .-->
</configuration>
</plugin>
</plugins>
</build>
```

## Quick start Gradle
Expand Down

0 comments on commit 492264e

Please sign in to comment.