From cf7e358c66e3dcdb55e33a1dff559b0283c4aae9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Kr=C3=BCger?=
<56278322+fabapp2@users.noreply.github.com>
Date: Wed, 10 Jan 2024 13:05:18 +0000
Subject: [PATCH] Snapshot build
* Rename modules to follow naming schema
* Deploy snapshot
* Provide ci and pr-ci build
---
.github/workflows/ci-pr.yml | 42 ++++++++
.github/workflows/ci.yml | 91 ++++++++++++++++++
.github/workflows/continuous-integration.yml | 66 -------------
pom.xml | 79 +++++----------
.../.gitignore | 0
.../README.adoc | 0
.../pom.xml | 2 +-
.../com/acme/example/SpringBoot3Upgrade.java | 0
.../src/main/resources/application.properties | 0
.../.gitignore | 0
.../.mvn/wrapper/maven-wrapper.jar | Bin
.../.mvn/wrapper/maven-wrapper.properties | 0
.../README.adoc | 0
.../mvnw | 0
.../mvnw.cmd | 0
.../pom.xml | 2 +-
.../BootUpgradeIterativeApplication.java | 0
.../IterativeBoot3UpgradeExample.java | 0
.../src/main/resources/application.properties | 0
spring-rewrite-commons-examples/pom.xml | 4 +-
.../pom.xml | 13 ---
21 files changed, 161 insertions(+), 138 deletions(-)
create mode 100644 .github/workflows/ci-pr.yml
create mode 100644 .github/workflows/ci.yml
delete mode 100644 .github/workflows/continuous-integration.yml
rename spring-rewrite-commons-examples/{boot-3-upgrade-atomic => boot-3-upgrade-atomic-example}/.gitignore (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-atomic => boot-3-upgrade-atomic-example}/README.adoc (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-atomic => boot-3-upgrade-atomic-example}/pom.xml (98%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-atomic => boot-3-upgrade-atomic-example}/src/main/java/com/acme/example/SpringBoot3Upgrade.java (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-atomic => boot-3-upgrade-atomic-example}/src/main/resources/application.properties (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/.gitignore (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/.mvn/wrapper/maven-wrapper.jar (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/.mvn/wrapper/maven-wrapper.properties (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/README.adoc (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/mvnw (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/mvnw.cmd (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/pom.xml (97%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/src/main/java/com/example/bootupgrade/BootUpgradeIterativeApplication.java (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/src/main/java/com/example/bootupgrade/IterativeBoot3UpgradeExample.java (100%)
rename spring-rewrite-commons-examples/{boot-3-upgrade-iterative => boot-3-upgrade-iterative-example}/src/main/resources/application.properties (100%)
diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml
new file mode 100644
index 0000000..255d8f6
--- /dev/null
+++ b/.github/workflows/ci-pr.yml
@@ -0,0 +1,42 @@
+name: CI PRs
+
+on:
+ workflow_dispatch:
+ pull_request:
+
+jobs:
+ build:
+ timeout-minutes: 15
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - nickname: win
+ os: windows-latest
+ java: 17
+ - nickname: macos
+ os: macos-latest
+ java: 17
+ - nickname: linux
+ os: ubuntu-latest
+ java: 17
+ name: CI Build ${{ matrix.nickname }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: jvalkeal/setup-maven@v1
+ with:
+ maven-version: 3.6.3
+ - uses: actions/setup-java@v4
+ with:
+ distribution: liberica
+ java-version: ${{ matrix.java }}
+ cache: maven
+ - name: Verify formatting
+ run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
+ - name: Build (Windows and MacOS, no functional tests)
+ if: runner.os != 'Linux'
+ run: ./mvnw -B clean install
+ - name: Build (Linux)
+ if: runner.os == 'Linux'
+ run: ./mvnw -B -Pfunctional-tests clean install
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..95ae2a4
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,91 @@
+name: CI
+
+on:
+ workflow_dispatch:
+ push:
+ paths-ignore:
+ - '.github/**'
+
+jobs:
+ build:
+ timeout-minutes: 15
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - nickname: win
+ os: windows-latest
+ java: 17
+ - nickname: macos
+ os: macos-latest
+ java: 17
+ - nickname: linux
+ os: ubuntu-latest
+ java: 17
+ name: CI Build ${{ matrix.nickname }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: jvalkeal/setup-maven@v1
+ with:
+ maven-version: 3.6.3
+ - uses: actions/setup-java@v4
+ with:
+ distribution: liberica
+ java-version: ${{ matrix.java }}
+# this takes minutes and stretches build time
+# - name: Setup docker (missing on MacOS)
+# if: runner.os == 'macos'
+# run: |
+# brew install docker
+# colima start
+#
+# # For testcontainers to find the Colima socket
+# # https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
+# sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
+ - name: Verify formatting
+ run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
+ - name: Build (Windows and MacOS, no functional tests)
+ if: runner.os != 'Linux'
+ run: ./mvnw -B clean install
+ - name: Build (Linux)
+ if: runner.os == 'Linux'
+ run: ./mvnw -B -Pfunctional-tests clean install
+ deploy:
+ needs: build
+ if: |
+ github.ref_name == 'main' &&
+ github.repository == 'spring-projects/spring-rewrite-commons'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: jfrog/setup-jfrog-cli@v3
+ env:
+ JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
+
+ - name: Deploy Snapshot
+ run: |
+
+ jf mvnc \
+ --server-id-deploy repo.spring.io \
+ --repo-deploy-releases release \
+ --repo-deploy-snapshots snapshot
+ echo JFROG_CLI_BUILD_NAME=spring-rewrite-commons-main >> $GITHUB_ENV
+ echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
+
+ jf mvn clean install -X -B -DskipTests
+ jf rt build-publish
+
+# - uses: actions/checkout@v4
+# - uses: jvalkeal/setup-maven@v1
+# with:
+# maven-version: 3.6.3
+# - uses: actions/setup-java@v4
+# with:
+# distribution: liberica
+# java-version: 17
+# - name: Deploy Snapshot
+# working-directory: ./spring-rewrite-commons-launcher
+# env:
+# ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
+# ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
+# run: ./mvnw -B -Partifactory,javadoc -DskipTests deploy
\ No newline at end of file
diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
deleted file mode 100644
index fbc197a..0000000
--- a/.github/workflows/continuous-integration.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-name: CI
-
-on:
- workflow_dispatch:
- pull_request:
- push:
- paths-ignore:
- - '.github/**'
-
-jobs:
- build:
- timeout-minutes: 15
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - nickname: win
- os: windows-latest
- java: 17
- - nickname: macos
- os: macos-latest
- java: 17
- - nickname: linux
- os: ubuntu-latest
- java: 17
- name: CI Build ${{ matrix.nickname }}
- steps:
- - uses: actions/checkout@v4
- - uses: jvalkeal/setup-maven@v1
- with:
- maven-version: 3.6.3
- - uses: actions/setup-java@v4
- with:
- distribution: liberica
- java-version: ${{ matrix.java }}
- - name: Setup docker (missing on MacOS)
- if: runner.os == 'macos'
- run: |
- brew install docker
- colima start
-
- # For testcontainers to find the Colima socket
- # https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
- sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- - name: Verify formatting
- run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
- - name: Build (Windows, no functional tests)
- if: runner.os == 'Windows'
- run: ./mvnw -B clean install
- - name: Build (Non Windows)
- if: runner.os != 'Windows'
- run: ./mvnw -B -Pfunctional-tests clean install
- deploy:
- # Deploy when in own repo, on main, and previous build succeeded
- if: |
- github.ref == 'ref/head/main' &&
- github.repository == 'spring-projects/spring-rewrite-commons'
- needs: build
- runs-on: ubuntu-latest
- steps:
- - name: Deploy Snapshot
- env:
- ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
- ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- run: ./mvnw -B -DskipTests clean deploy -Partifactory
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 6a3b8aa..240ae5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,9 +13,9 @@
spring-rewrite-commons-launcher
- spring-rewrite-commons-docs
- spring-rewrite-commons-examples
- spring-rewrite-commons-gradle
+
+
+
@@ -82,8 +82,8 @@
https://github.com/spring-projects/rewrite-commons
scm:git:https://github.com/spring-projects/spring-rewrite-commons
scm:git:https://github.com/spring-projects/spring-rewrite-commons.git
- spring-rewrite-commons-0.1.0
-
+ HEAD
+
Github Issues
https://github.com/spring-projects/spring-rewrite-commons/issues
@@ -92,16 +92,6 @@
Github Actions
https://github.com/spring-projects/spring-rewrite-commons/actions
-
-
- spring-snapshots
- https://repo.spring.io/libs-snapshot-local
- default
-
- false
-
-
-
Apache-2.0
@@ -272,58 +262,37 @@ limitations under the License.
- artifactory
-
- true
-
+ javadoc
- org.jfrog.buildinfo
- artifactory-maven-plugin
- ${artifactory-maven-plugin.version}
- false
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.4.1
- deploy-to-artifactory
+ attach-javadocs
- publish
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.0
+
+
+ attach-sources
+
+ jar-no-fork
-
-
- https://repo.spring.io
-
- ${env.ARTIFACTORY_USERNAME}
-
- ${env.ARTIFACTORY_PASSWORD}
- libs-milestone-local
- libs-snapshot-local
-
-
- CI build for sbm-support-rewrite ${project.version}
-
-
-
-
- spring-milestone
- https://repo.spring.io/milestone
-
- false
-
-
-
- spring-snapshot
- https://repo.spring.io/snapshot
-
- false
-
-
-
\ No newline at end of file
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/.gitignore b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/.gitignore
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-atomic/.gitignore
rename to spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/.gitignore
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/README.adoc b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/README.adoc
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-atomic/README.adoc
rename to spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/README.adoc
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/pom.xml b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/pom.xml
similarity index 98%
rename from spring-rewrite-commons-examples/boot-3-upgrade-atomic/pom.xml
rename to spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/pom.xml
index 9319c93..dad320e 100644
--- a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/pom.xml
+++ b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/pom.xml
@@ -12,7 +12,7 @@
com.example
- boot-3-upgrade-atomic
+ boot-3-upgrade-atomic-example
Boot 3 Atomic Upgrade Example
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/src/main/java/com/acme/example/SpringBoot3Upgrade.java b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/src/main/java/com/acme/example/SpringBoot3Upgrade.java
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-atomic/src/main/java/com/acme/example/SpringBoot3Upgrade.java
rename to spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/src/main/java/com/acme/example/SpringBoot3Upgrade.java
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-atomic/src/main/resources/application.properties b/spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/src/main/resources/application.properties
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-atomic/src/main/resources/application.properties
rename to spring-rewrite-commons-examples/boot-3-upgrade-atomic-example/src/main/resources/application.properties
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/.gitignore b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.gitignore
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/.gitignore
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.gitignore
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/.mvn/wrapper/maven-wrapper.jar b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.mvn/wrapper/maven-wrapper.jar
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/.mvn/wrapper/maven-wrapper.jar
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.mvn/wrapper/maven-wrapper.jar
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/.mvn/wrapper/maven-wrapper.properties b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.mvn/wrapper/maven-wrapper.properties
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/.mvn/wrapper/maven-wrapper.properties
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/.mvn/wrapper/maven-wrapper.properties
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/README.adoc b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/README.adoc
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/README.adoc
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/README.adoc
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/mvnw b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/mvnw
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/mvnw
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/mvnw
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/mvnw.cmd b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/mvnw.cmd
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/mvnw.cmd
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/mvnw.cmd
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/pom.xml b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/pom.xml
similarity index 97%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/pom.xml
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/pom.xml
index f0b44f3..5c38695 100644
--- a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/pom.xml
+++ b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/pom.xml
@@ -11,7 +11,7 @@
com.example
- boot-3-upgrade-iterative
+ boot-3-upgrade-iterative-example
Boot 3 Iterative Upgrade Example
Example of iterative Boot upgrade with PRs
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/java/com/example/bootupgrade/BootUpgradeIterativeApplication.java b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/java/com/example/bootupgrade/BootUpgradeIterativeApplication.java
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/java/com/example/bootupgrade/BootUpgradeIterativeApplication.java
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/java/com/example/bootupgrade/BootUpgradeIterativeApplication.java
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/java/com/example/bootupgrade/IterativeBoot3UpgradeExample.java b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/java/com/example/bootupgrade/IterativeBoot3UpgradeExample.java
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/java/com/example/bootupgrade/IterativeBoot3UpgradeExample.java
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/java/com/example/bootupgrade/IterativeBoot3UpgradeExample.java
diff --git a/spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/resources/application.properties b/spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/resources/application.properties
similarity index 100%
rename from spring-rewrite-commons-examples/boot-3-upgrade-iterative/src/main/resources/application.properties
rename to spring-rewrite-commons-examples/boot-3-upgrade-iterative-example/src/main/resources/application.properties
diff --git a/spring-rewrite-commons-examples/pom.xml b/spring-rewrite-commons-examples/pom.xml
index 30084a9..6f9c431 100644
--- a/spring-rewrite-commons-examples/pom.xml
+++ b/spring-rewrite-commons-examples/pom.xml
@@ -17,8 +17,8 @@
Examples using Spring Rewrite Commons
- boot-3-upgrade-atomic
- boot-3-upgrade-iterative
+ boot-3-upgrade-atomic-example
+ boot-3-upgrade-iterative-example
list-applicable-recipes-example
diff --git a/spring-rewrite-commons-functional-tests/pom.xml b/spring-rewrite-commons-functional-tests/pom.xml
index 8fba74b..a84951c 100644
--- a/spring-rewrite-commons-functional-tests/pom.xml
+++ b/spring-rewrite-commons-functional-tests/pom.xml
@@ -61,19 +61,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
org.springframework.boot
spring-boot-dependencies