From aedd063e3b0e819e31424c92fe3cb5850144c2e0 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Wed, 27 Jul 2022 17:03:02 +0200 Subject: [PATCH] GH-18 - Setup deployment to Artifactory for general builds. Tweak build to contain a dedicated ci build profile for Javadoc creation post delombokification. Added an artifactory build profile to set up Artifactory deployment for milestones and snapshots. Cleanups in sonatype build profile to avoid the definition of a snapshot repository to avoid snapshots accidentally be deployed there. --- .github/workflows/build.yaml | 6 ++ pom.xml | 147 ++++++++++++++++++++++++----------- 2 files changed, 108 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d20b99cc..0e370cdd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,3 +25,9 @@ jobs: - name: Build with Maven run: ./mvnw -B + + - name: Deploy to Artifactory + env: + ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} + ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + run: ./mvnw -B clean deploy -Pci,artifactory diff --git a/pom.xml b/pom.xml index 4dfcf2c7..760dfdaa 100644 --- a/pom.xml +++ b/pom.xml @@ -96,30 +96,92 @@ limitations under the License. spring-modulith-integration-test - - - spring-snapshot - Spring Snapshot Repository - https://repo.spring.io/snapshot - - + - - - spring-snapshot - https://repo.spring.io/snapshot - - false - - - - spring-milestone - https://repo.spring.io/milestone - - false - - - + + + ci + + + + + + org.projectlombok + lombok-maven-plugin + 1.18.20.0 + + false + ${project.basedir}/src/main/java + + + + generate-sources + + delombok + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + none + true + package + target/generated-sources/delombok + + + + + + + + + + artifactory + + true + + + + + org.jfrog.buildinfo + artifactory-maven-plugin + 3.4.0 + false + + + deploy-to-artifactory + + publish + + + + https://repo.spring.io + ${env.ARTIFACTORY_USERNAME} + ${env.ARTIFACTORY_PASSWORD} + libs-milestone-local + libs-snapshot-local + + + CI build for Spring Modulith ${project.version} + + + + + + + @@ -142,24 +204,6 @@ limitations under the License. - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - -Xdoclint:none - - package - - @@ -167,10 +211,6 @@ limitations under the License. sonatype-new https://s01.oss.sonatype.org/service/local/staging/deploy/maven2 - - sonatype-new - https://s01.oss.sonatype.org/content/repositories/snapshots - @@ -302,4 +342,21 @@ limitations under the License. main + + + spring-snapshot + https://repo.spring.io/snapshot + + false + + + + spring-milestone + https://repo.spring.io/milestone + + false + + + +