From 90d97d6169d1d254503e2d903121a7c8ca6f0e86 Mon Sep 17 00:00:00 2001 From: Shawn Hurley Date: Tue, 4 Mar 2025 13:37:05 -0500 Subject: [PATCH 1/4] Adding ability to publish jar files to maven Signed-off-by: Shawn Hurley --- .github/workflows/image-build.yaml | 37 ++++++++++++++++++ gradle/.gradle/8.8/checksums/checksums.lock | Bin 0 -> 17 bytes .../8.8/dependencies-accessors/gc.properties | 0 gradle/.gradle/8.8/fileChanges/last-build.bin | Bin 0 -> 1 bytes gradle/.gradle/8.8/fileHashes/fileHashes.bin | Bin 0 -> 18547 bytes gradle/.gradle/8.8/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes gradle/.gradle/8.8/gc.properties | 0 .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .../buildOutputCleanup/cache.properties | 2 + gradle/.gradle/vcs-1/gc.properties | 0 pom.xml | 19 ++++++--- 11 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 gradle/.gradle/8.8/checksums/checksums.lock create mode 100644 gradle/.gradle/8.8/dependencies-accessors/gc.properties create mode 100644 gradle/.gradle/8.8/fileChanges/last-build.bin create mode 100644 gradle/.gradle/8.8/fileHashes/fileHashes.bin create mode 100644 gradle/.gradle/8.8/fileHashes/fileHashes.lock create mode 100644 gradle/.gradle/8.8/gc.properties create mode 100644 gradle/.gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 gradle/.gradle/buildOutputCleanup/cache.properties create mode 100644 gradle/.gradle/vcs-1/gc.properties diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index 60bc7dd..ccc6d36 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -13,7 +13,44 @@ concurrency: group: build-${{ github.ref }} cancel-in-progress: true +env: + tag: ${{ github.ref == 'refs/heads/main' && 'latest' || github.ref_name }} jobs: + jar-artifact: + name: Publish package to GitHub Packages + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: temurin + - name: set-version + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + run: | + echo "TAG=${{ env.tag }}" >> $GITHUB_ENV + echo "VERSION=${TAG#v}" >> $GITHUB_ENV + mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${VERSION} + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: create new snapshot version on release + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + run: | + mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${VERSION}-SNAPSHOT + - name: create pull request with changes + uses: peter-evans/create-pull-request@v7 + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + with: + commit-message: Bumping to new snapshot for release ${{env.tag}} + title: Bumping to new snapshot for release ${{env.tag}} + branch: "${{env.tag}}-snapshot" + image-build: uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main with: diff --git a/gradle/.gradle/8.8/checksums/checksums.lock b/gradle/.gradle/8.8/checksums/checksums.lock new file mode 100644 index 0000000000000000000000000000000000000000..27d2b6af2b478500f38e111a7241dfe267dac6de GIT binary patch literal 17 TcmZR!c|31h|FX9R3{U_7JNpF5 literal 0 HcmV?d00001 diff --git a/gradle/.gradle/8.8/dependencies-accessors/gc.properties b/gradle/.gradle/8.8/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/gradle/.gradle/8.8/fileChanges/last-build.bin b/gradle/.gradle/8.8/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/gradle/.gradle/8.8/fileHashes/fileHashes.bin b/gradle/.gradle/8.8/fileHashes/fileHashes.bin new file mode 100644 index 0000000000000000000000000000000000000000..203f5e0b41cae215e8d9d7ca53d9414b1b974d1c GIT binary patch literal 18547 zcmeI(F^WPl5CG7ujj#y*MzC2{OF=~N1d52TVCM}itVPg9JcC$Rc^BPkYrTlVT5CRE z@d_d@kj#)YGp|k34WXP|?;|`%>6yw15FkK+009C72oNAZfB*pk1PBlyK!5;&cM%xI zMn1D<%Jp2D6lWnc3o-eaRyKqA;dhW7_uG&AgGY?}wd~AFfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5)Wfui2><{9 literal 0 HcmV?d00001 diff --git a/gradle/.gradle/8.8/gc.properties b/gradle/.gradle/8.8/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/gradle/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/gradle/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..399f43e214896e9013f1a0d16b1dd9bbc8b3064d GIT binary patch literal 17 UcmZR!y=z<-DfM>}0|YPv04|0D(f|Me literal 0 HcmV?d00001 diff --git a/gradle/.gradle/buildOutputCleanup/cache.properties b/gradle/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..29d0374 --- /dev/null +++ b/gradle/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Mar 04 12:44:54 EST 2025 +gradle.version=8.8 diff --git a/gradle/.gradle/vcs-1/gc.properties b/gradle/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml index ccdc200..58d1e8d 100644 --- a/pom.xml +++ b/pom.xml @@ -15,18 +15,20 @@ UTF-8 UTF-8 - 3.0.1 - 3.0.1 + 4.0.9 + ${tycho.version} scm:git:https://github.com/konveyor/java-analyzer-bundle.git true - -Xmx512m ${tycho.test.platformArgs} + -Xmx1G -DDetectVMInstallationsJob.disabled=true ${tycho.test.platformArgs} + - 0.7.9 - org.eclipse.jdt.ls.* + 0.8.8 + org.eclipse.lsp4mp.jdt.* reuseReports ${project.build.directory}/jacoco.exec ${jacoco.destFile} + 600 @@ -168,4 +170,11 @@ java-analyzer-bundle.test java-analyzer-bundle.tp + + + github + GitHub Packages + https://maven.pkg.github.com/konveyor/java-analyzer-bundle + + From bf10828b0d399e138a66da6dead3fea8278729fa Mon Sep 17 00:00:00 2001 From: Shawn Hurley Date: Tue, 4 Mar 2025 15:09:15 -0500 Subject: [PATCH 2/4] fixup Signed-off-by: Shawn Hurley --- .github/workflows/image-build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index ccc6d36..b4a2530 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -42,6 +42,8 @@ jobs: - name: create new snapshot version on release if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') run: | + echo "TAG=${{ env.tag }}" >> $GITHUB_ENV + echo "VERSION=${TAG#v}" >> $GITHUB_ENV mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${VERSION}-SNAPSHOT - name: create pull request with changes uses: peter-evans/create-pull-request@v7 From 315efa968dd793b97de17bf949cea10c7dce4937 Mon Sep 17 00:00:00 2001 From: Shawn Hurley Date: Wed, 5 Mar 2025 10:21:08 -0500 Subject: [PATCH 3/4] fixing the build when needing maven-3.9 Signed-off-by: Shawn Hurley --- Dockerfile | 6 +++++- pom.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b25d4b..5e40734 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,11 @@ RUN ./gradlew build -x test && rm -rf /root/.gradle RUN mkdir /output && cp ./build/libs/fernflower.jar /output FROM registry.access.redhat.com/ubi9/ubi AS addon-build -RUN dnf install -y maven-openjdk17 && dnf clean all && rm -rf /var/cache/dnf +RUN curl -fsSL -o /tmp/apache-maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz && \ + tar -xzf /tmp/apache-maven.tar.gz -C /usr/local/ && \ + ln -s /usr/local/apache-maven-3.9.5/bin/mvn /usr/bin/mvn && \ + rm /tmp/apache-maven.tar.gz +RUN dnf install -y java-17-openjdk-devel && dnf clean all && rm -rf /var/cache/dnf WORKDIR /app COPY ./ /app/ RUN export JAVA_HOME=/usr/lib/jvm/java-17-openjdk diff --git a/pom.xml b/pom.xml index 58d1e8d..5c3026a 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,7 @@ java-analyzer-bundle.core - java-analyzer-bundle.site + java-analyzer-bundle.test java-analyzer-bundle.tp From 9f1a81674becaf78766510228871dba5dffabbd2 Mon Sep 17 00:00:00 2001 From: Shawn Hurley Date: Wed, 5 Mar 2025 10:33:50 -0500 Subject: [PATCH 4/4] fixup for testing the workflow --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c3026a..41a9f63 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ github GitHub Packages - https://maven.pkg.github.com/konveyor/java-analyzer-bundle + https://maven.pkg.github.com/shawn-hurley/java-analyzer-bundle