Skip to content

Commit

Permalink
Generate SDK build alongside the jar for containers
Browse files Browse the repository at this point in the history
The SDK contains the connector's common models that
the chaincode developers can utilize. If the connector's
flag is set to parse the events, the events will be
parsed for common structure and utilized for Kafka
publishing.

The SDK can be later reused for other purposes.

Signed-off-by: S m, Aruna <[email protected]>
  • Loading branch information
arsulegai committed Dec 19, 2023
1 parent 4432210 commit cc3d3c5
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
shell: bash
env:
USERNAME_OR_ORG: "${{ github.repository_owner }}"
- name: Release the SDK to GitHub
run: |
mvn -B deploy -Dsdk
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Increment the pom version
run: |
mvn build-helper:parse-version help:effective-pom validate -D${type}
Expand Down
84 changes: 71 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,46 @@
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/hyperledger-labs/hlf-connector</url>
</repository>
</distributionManagement>

<!-- this section is for auto version increments -->
<profiles>
<profile>
<id>hlf-connector-sdk</id>
<activation>
<property>
<name>sdk</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classifier>sdk-only</classifier>
<includes>
<include>**/hlf/java/rest/client/sdk/*</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>patch-release</id>
<activation>
Expand All @@ -242,6 +280,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -269,6 +318,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -296,26 +356,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<finalName>hlf-connector</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
Expand Down

0 comments on commit cc3d3c5

Please sign in to comment.