Skip to content

Commit d3bb786

Browse files
committed
The VIES API client for Java - release 1.0.0
0 parents  commit d3bb786

40 files changed

+7118
-0
lines changed

.github/settings.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
5+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
6+
<servers>
7+
<server>
8+
<id>github</id>
9+
<username>${env.MAVEN_USERNAME}</username>
10+
<password>${env.MAVEN_PASSWORD}</password>
11+
</server>
12+
<server>
13+
<id>central</id>
14+
<username>${{env.OSSRH_USERNAME_TOKEN }}</username>
15+
<password>${{env.OSSRH_PASSWORD_TOKEN }}</password>
16+
</server>
17+
</servers>
18+
19+
</settings>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Publish to Maven Central
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- 'release/*'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
cache: maven
25+
26+
- name: Setup GPG
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
29+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
30+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
31+
run: |
32+
echo "Setting up GPG..."
33+
mkdir -p ~/.gnupg
34+
chmod 700 ~/.gnupg
35+
36+
# Debug: Sprawdź długość klucza
37+
echo "GPG_PRIVATE_KEY length: ${#GPG_PRIVATE_KEY}"
38+
39+
# Debug: Sprawdź początek klucza (bez ujawniania tajemnicy)
40+
echo "GPG_KEYNAME: $GPG_KEYNAME"
41+
echo "GPG_PASSPHRASE length: ${#GPG_PASSPHRASE}"
42+
echo "First 10 chars of GPG_PRIVATE_KEY: ${GPG_PRIVATE_KEY:0:10}"
43+
44+
# Tepporary write key for debug
45+
echo "$GPG_PRIVATE_KEY" > private.tmp
46+
echo "File content (first line): $(head -1 private.tmp)"
47+
48+
# Import key
49+
echo "Importing GPG key..."
50+
gpg --batch --import private.tmp || echo "Import failed!"
51+
rm private.tmp
52+
53+
- name: Configure Maven
54+
run: |
55+
mkdir -p ~/.m2
56+
cat > ~/.m2/settings.xml << EOF
57+
<settings>
58+
<servers>
59+
<server>
60+
<id>central</id>
61+
<username>${{ secrets.OSSRH_USERNAME_TOKEN }}</username>
62+
<password>${{ secrets.OSSRH_PASSWORD_TOKEN }}</password>
63+
</server>
64+
</servers>
65+
<profiles>
66+
<profile>
67+
<id>central</id>
68+
<activation>
69+
<activeByDefault>true</activeByDefault>
70+
</activation>
71+
<properties>
72+
<gpg.executable>gpg</gpg.executable>
73+
<gpg.passphrase>${{ secrets.GPG_PASSPHRASE }}</gpg.passphrase>
74+
</properties>
75+
</profile>
76+
</profiles>
77+
</settings>
78+
EOF
79+
80+
- name: Build and Publish
81+
env:
82+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
83+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
84+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
85+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
86+
run: |
87+
echo "Starting Maven build and deploy..."
88+
mvn clean deploy -P release \
89+
-Dmaven.javadoc.skip=false \
90+
-Dmaven.deploy.skip=false \
91+
-Dgpg.keyname=$GPG_KEYNAME \
92+
-Dgpg.useagent=false \
93+
-Dgpg.passphrase=$GPG_PASSPHRASE \
94+
-Dmaven.test.failure.ignore=false \
95+
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
96+
-DrepositoryId=ossrh \
97+
-Dusername=$OSSRH_USERNAME \
98+
-Dpassword=$OSSRH_PASSWORD

.github/workflows/maven.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
packages: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
cache: 'maven'
25+
- name: Build
26+
run: mvn clean install -Dmaven.javadoc.skip=true
27+
- name: Create Release
28+
if: startsWith(github.ref, 'refs/tags/')
29+
uses: softprops/action-gh-release@v1
30+
with:
31+
files: |
32+
target/*.jar
33+
target/*.pom
34+
target/*.asc
35+
target/*.md5
36+
target/*.sha1
37+
generate_release_notes: true
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
cache: 'maven'
24+
25+
- name: Build with Maven
26+
run: |
27+
mvn -B clean package -DskipTests
28+
mvn -B javadoc:javadoc
29+
mvn -B source:jar
30+
31+
- name: Create Release
32+
uses: softprops/action-gh-release@v1
33+
with:
34+
name:

.gitignore

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# Maven
27+
target/
28+
pom.xml.tag
29+
pom.xml.releaseBackup
30+
pom.xml.versionsBackup
31+
pom.xml.next
32+
release.properties
33+
dependency-reduced-pom.xml
34+
buildNumber.properties
35+
.mvn/timing.properties
36+
.mvn/wrapper/maven-wrapper.jar
37+
38+
# IntelliJ IDEA
39+
.idea/
40+
*.iws
41+
*.iml
42+
*.ipr
43+
44+
# Eclipse
45+
.classpath
46+
.project
47+
.settings/
48+
49+
# VS Code
50+
.vscode/
51+
52+
# Mac
53+
.DS_Store
54+
55+
# Windows
56+
Thumbs.db
57+
ehthumbs.db
58+
Desktop.ini
59+
60+
# GPG
61+
*.asc
62+
*.gpg
63+
private.key
64+
65+
# Eclipse
66+
.classpath
67+
.project
68+
.settings/
69+
.factorypath
70+
bin/
71+
.metadata/
72+
*.launch
73+
.apt_generated
74+
.classpath
75+
.factorypath
76+
.project
77+
.settings
78+
.springBeans
79+
.sts4-cache
80+
81+
# VS Code
82+
.vscode/
83+
*.code-workspace
84+
85+
# Mac OS
86+
.DS_Store
87+
88+
# Windows
89+
Thumbs.db
90+
ehthumbs.db
91+
Desktop.ini
92+
93+
# Logs
94+
*.log
95+
logs/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 🚀 WTX Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)