Skip to content

Commit

Permalink
Enabled Maven CI Friendly Versions
Browse files Browse the repository at this point in the history
Avoid the need to run the release plugin locally.
  • Loading branch information
freemanjp committed Nov 17, 2024
1 parent 5355438 commit e9c7126
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- name: Build with Maven
run: |
"$M2_HOME/bin/mvn" install \
"-Drevision=${GIT_TAG:-development-SNAPSHOT}" \
--batch-mode \
--show-version \
-Dinvoker.streamLogs=true \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -57,6 +57,7 @@ jobs:
run: |
./mvnw deploy \
-P publish-artifacts,sign-artifacts,ossrh-deploy \
"-Drevision=${GIT_TAG:-development-SNAPSHOT}" \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -69,6 +69,7 @@ jobs:
- name: Build Maven site
run: |
./mvnw site \
"-Drevision=${GIT_TAG:-development-SNAPSHOT}" \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
Expand All @@ -79,6 +80,7 @@ jobs:
- name: Stage Maven site
run: |
./mvnw site:stage \
"-Drevision=${GIT_TAG:-development-SNAPSHOT}" \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
Expand All @@ -89,6 +91,7 @@ jobs:
run: |
./mvnw scm-publish:publish-scm \
-P gh-pages \
"-Drevision=${GIT_TAG:-development-SNAPSHOT}" \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>3.3.1-SNAPSHOT</version>
<version>${revision}</version>

<packaging>maven-plugin</packaging>

Expand Down
2 changes: 1 addition & 1 deletion src/it/check/postbuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
*/
String buildLog = new File(basedir, 'build.log').text
assert buildLog.contains('[ERROR] src/main/kotlin/example/Example.kt:29:39: Unnecessary semicolon')
assert buildLog =~ /\Q[ERROR] Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:\E[0-9.]+(-SNAPSHOT)?\Q:check (check) on project test-project: Kotlin source failed ktlint check. -> [Help 1]\E/
assert buildLog =~ /\Q[ERROR] Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:\E[0-9a-z.]+(-SNAPSHOT)?\Q:check (check) on project test-project: Kotlin source failed ktlint check. -> [Help 1]\E/

0 comments on commit e9c7126

Please sign in to comment.