Skip to content

Commit

Permalink
Merge branch 'master' into issue291
Browse files Browse the repository at this point in the history
  • Loading branch information
angeliski authored Feb 13, 2025
2 parents 3d6d3d5 + f1d635c commit 8b973ae
Show file tree
Hide file tree
Showing 25 changed files with 719 additions and 240 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Java CI
on:
push:
branches:
- master

env:
MAVEN_OPTS: -Dmaven.artifact.threads=256 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: 'Cache Maven packages'
uses: actions/cache@v4
with:
path: ~/.m2
key: 'cache'
restore-keys: 'cache'
- name: 'Build with Maven'
run: mvn -B install --file pom.xml
- name: 'Remove Snapshots Before Caching'
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf
28 changes: 28 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Pull Request
on:
pull_request:
branches:
- master

env:
MAVEN_OPTS: -Dmaven.artifact.threads=256 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: 'Cache Maven packages'
uses: actions/cache@v4
with:
path: ~/.m2
key: 'cache'
restore-keys: 'cache'
- name: 'Build with Maven'
run: mvn -B install --file pom.xml
- name: 'Remove Snapshots Before Caching'
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf
77 changes: 77 additions & 0 deletions .github/workflows/sonatype-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

name: Maven Release

on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Define the release version"
required: true
default: ""
developmentVersion:
description: "Define the snapshot version"
required: true
default: ""

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git User
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Import SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa
known_hosts: unnecessary_just_github

- name: Import GPG Key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: 'Cache Maven packages'
uses: actions/cache@v4
with:
path: ~/.m2
key: 'cache'
restore-keys: 'cache'

- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11

- name: 'Build with Maven'
run: mvn -B install --file pom.xml

- name: Verify Whether a Release is Ready
id: release
shell: bash
run: |
if [ "${{ github.event.inputs.releaseVersion }}" != "" ] && [ "${{ github.event.inputs.developmentVersion }}" != "" ]; then
echo "auto_release=true" >> $GITHUB_ENV
else
echo "auto_release=false" >> $GITHUB_ENV
fi
- name: Release With Maven
run: |
mvn -B -U \
-PsonatypeDeploy \
release:prepare \
release:perform \
javadoc:jar \
source:jar \
-s settings.xml \
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/faces-example-1x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>br.com.caelum.stella</groupId>
<artifactId>caelum-stella</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>2.1.8-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>faces-example-1x</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/faces-example-2x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>br.com.caelum.stella</groupId>
<artifactId>caelum-stella</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>2.1.8-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>faces-example-2x</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/hibernate-persistence-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>br.com.caelum.stella</groupId>
<artifactId>caelum-stella</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>2.1.8-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>hibernate-persistence-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/vraptor-validator-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>br.com.caelum.stella</groupId>
<artifactId>caelum-stella</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>2.1.8-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>vraptor-validator-example</artifactId>
Expand Down
114 changes: 101 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>br.com.caelum.stella</groupId>
<artifactId>caelum-stella</artifactId>
<packaging>pom</packaging>
<version>2.1.7-SNAPSHOT</version>
<version>2.1.8-SNAPSHOT</version>
<name>Caelum Stella</name>
<description>
Caelum Stella is a set of validators, formatters and converters
Expand Down Expand Up @@ -73,6 +73,18 @@
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<!-- API, java.xml.bind module -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.2</version>
</dependency>
<!-- Runtime, com.sun.xml.bind module -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -94,6 +106,14 @@
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -106,15 +126,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
<version>3.8.1</version>
<configuration>
<release>11</release>
<source>1.8</source>
<target>1.8</target>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-javadoc</id>
Expand All @@ -128,8 +151,6 @@
http://java.sun.com/j2se/1.5/docs/api
</link>
</links>
<encoding>utf-8</encoding>
<charset>utf-8</charset>
</configuration>
</execution>
</executions>
Expand All @@ -149,7 +170,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<version>3.0.0-M5</version>
<configuration>
<forkMode>once</forkMode>
<printSummary>true</printSummary>
Expand Down Expand Up @@ -181,6 +202,14 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Expand All @@ -207,7 +236,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -216,7 +245,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -414,12 +443,71 @@
</pluginManagement>
</build>
</profile>
<profile>
<!-- required, used in .github/workflows/sonatype-publish.yml -->
<id>sonatypeDeploy</id>
<properties>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
<gpg.keyname>${env.GPG_KEY_ID}</gpg.keyname>
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- we need to release from staging to avoid errors and ensure double check -->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<scm>
<connection>scm:git:git://github.com/caelum/caelum-stella</connection>
<developerConnection>scm:git:[email protected]:caelum/caelum-stella.git</developerConnection>
<url>https://github.com/caelum/caelum-stella</url>
<tag>HEAD</tag>
</scm>

<mailingLists>
Expand Down Expand Up @@ -454,12 +542,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8.1</version>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
Loading

0 comments on commit 8b973ae

Please sign in to comment.