Skip to content

Commit

Permalink
Feature/integration release (#70)
Browse files Browse the repository at this point in the history
* 👷 ci add s3 rest service to image build

* ♻️ pom mv release information to modules

* ♻️ pom rearrange plugins

* ✨ pom add needed information for maven release

* ✨ pom init maven release

* 👷 ci add maven release configuration

* 👷 pom disable javadoc linting

* 👷 pom javadoc linting only validate not require

* 🐛 fix javadoc
  • Loading branch information
simonhir authored Aug 16, 2024
1 parent 4d5d148 commit f3f0102
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 29 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
cache: "maven"
server-id: "central"
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.gpg_private_key }}
gpg-passphrase: SIGN_KEY_PASS
- name: Maven build
if: ${{ inputs.snapshot-release != false }}
run: mvn --batch-mode clean install
Expand All @@ -47,6 +52,10 @@ jobs:
git config --global user.name "GitHub Actions"
mvn release:prepare -B -DreleaseVersion=${{ inputs.release-version }} -DdevelopmentVersion=${{ inputs.next-version }} -DpushChanges=false -DremoteTagging=false
mvn release:perform -Darguments="-Dmaven.deploy.skip=true" -DlocalCheckout=true
env:
SIGN_KEY_PASS: ${{ secrets.gpg_passphrase }}
CENTRAL_USERNAME: ${{ secrets.sonatype_username }}
CENTRAL_PASSWORD: ${{ secrets.sonatype_password }}
- name: "Upload target artifacts"
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -91,6 +100,8 @@ jobs:
include:
- name: refarch-gateway
path: ./refarch-gateway
- name: s3-integration-rest-service
path: ./refarch-integrations/refarch-s3-integration/refarch-s3-integration-rest-service
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,4 @@
<module>refarch-gateway</module>
<module>refarch-integrations</module>
</modules>

<scm>
<url>https://github.com/it-at-m/refarch.git</url>
<connection>scm:git:https://github.com/it-at-m/refarch.git</connection>
<developerConnection>scm:git:https://github.com/it-at-m/refarch.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>MIT</name>
</license>
</licenses>
</project>
38 changes: 30 additions & 8 deletions refarch-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

<groupId>de.muenchen.refarch</groupId>
<artifactId>refarch-gateway</artifactId>
<name>refarch-gateway</name>
<description>Ready to use RefArch gateway based on Spring Cloud Gateway</description>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>refarch-gateway</name>

<properties>
<!-- Compilation -->
Expand Down Expand Up @@ -139,13 +140,7 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>
<!-- Build -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -159,6 +154,14 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- Testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down Expand Up @@ -214,4 +217,23 @@
</plugin>
</plugins>
</build>

<scm>
<url>https://github.com/it-at-m/refarch.git</url>
<connection>scm:git:https://github.com/it-at-m/refarch.git</connection>
<developerConnection>scm:git:https://github.com/it-at-m/refarch.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>MIT</name>
</license>
</licenses>
<developers>
<developer>
<organization>it@M</organization>
<email>[email protected]</email>
<url>https://github.com/it-at-m</url>
</developer>
</developers>
</project>
129 changes: 121 additions & 8 deletions refarch-integrations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

<groupId>de.muenchen.refarch</groupId>
<artifactId>refarch-integrations</artifactId>
<name>refarch-integrations</name>
<description>Collection of different ready to use RefArch integrations</description>
<version>1.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>refarch-integrations</name>

<modules>
<module>refarch-s3-integration</module>
Expand All @@ -37,6 +38,11 @@
<spotless-maven-plugin.version>2.34.0</spotless-maven-plugin.version>
<itm-java-codeformat.version>1.0.10</itm-java-codeformat.version>

<!-- Release -->
<central-publishing-maven-plugin.version>0.5.0</central-publishing-maven-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>

<!-- Testing -->
<jacoco.version>0.8.12</jacoco.version>

Expand Down Expand Up @@ -112,13 +118,7 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>
<!-- Build -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -144,6 +144,41 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>accessibility,html,reference,syntax</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand All @@ -163,6 +198,18 @@
</execution>
</executions>
</plugin>
<!-- Release -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>

<!-- Codeformatter Spotless -->
<plugin>
Expand Down Expand Up @@ -199,4 +246,70 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- Central Portal Publishing Plugin -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<autoPublish>true</autoPublish>
<deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
<excludeArtifacts>
<!-- Exclude services -->
<artifact>refarch-s3-integration-rest-service</artifact>
</excludeArtifacts>
</configuration>
</plugin>
<!-- GPG plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<scm>
<url>https://github.com/it-at-m/refarch.git</url>
<connection>scm:git:https://github.com/it-at-m/refarch.git</connection>
<developerConnection>scm:git:https://github.com/it-at-m/refarch.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>MIT</name>
</license>
</licenses>
<developers>
<developer>
<organization>it@M</organization>
<email>[email protected]</email>
<url>https://github.com/it-at-m</url>
</developer>
</developers>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface CreatePresignedUrlsInPort {
* @param event event containing the request.
* @return resulting variable map.
* @throws FileSystemAccessException on S3 errors.
* @throws javax.validation.ConstraintViolationException if the request is not valid.
* @throws jakarta.validation.ConstraintViolationException if the request is not valid.
*/
@NonNull
List<PresignedUrl> createPresignedUrls(@Valid CreatePresignedUrlEvent event) throws FileSystemAccessException;
Expand Down

0 comments on commit f3f0102

Please sign in to comment.