Skip to content

Commit ab152da

Browse files
authored
Merge pull request #20 from ZenWave360/next
rename groupId and package for new namespace "io.zenwave360"
2 parents 400ef00 + a472d89 commit ab152da

File tree

18 files changed

+257
-157
lines changed

18 files changed

+257
-157
lines changed

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Verify Main and Publish Coverage
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
# pull_request:
7+
# branches: [ '**' ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Set up the Java JDK
19+
uses: actions/setup-java@v2
20+
with:
21+
java-version: '17'
22+
distribution: 'adopt'
23+
24+
- name: Verify and Publish Coverage
25+
run: mvn verify
26+
27+
- name: Checkout badges branch to a badges directory nested inside first checkout
28+
uses: actions/checkout@v2
29+
with:
30+
ref: badges
31+
path: badges
32+
33+
- name: Generate JaCoCo Badge
34+
id: jacoco
35+
uses: cicirello/jacoco-badge-generator@v2
36+
with:
37+
badges-directory: badges
38+
generate-branches-badge: true
39+
generate-summary: true
40+
41+
- name: Log coverage percentage
42+
run: |
43+
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
44+
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
45+
46+
- name: Packs Jacoco Reports
47+
run: |
48+
rm -rf badges/jacoco
49+
mkdir -p badges/jacoco
50+
echo "GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED" > badges/jacoco-report.csv
51+
find -name 'jacoco.csv' -exec sed '1d' {} \; >> badges/jacoco-report.csv
52+
tar -c `find -name jacoco.csv` `find -name jacoco.exec` `find -name jacoco.xml` | tar -C badges/jacoco -x
53+
54+
55+
- name: Commit and push the coverage badges and summary file
56+
if: ${{ github.event_name != 'pull_request' }}
57+
run: |
58+
echo $(ls -l)
59+
cd badges
60+
if [[ `git status --porcelain` ]]; then
61+
git config --global user.name 'github-agit pctions'
62+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
63+
git add *.svg *.json jacoco-report.csv jacoco/*
64+
git commit -m "coverage = ${{ steps.jacoco.outputs.coverage }} branches = ${{ steps.jacoco.outputs.branches }}" *.svg *.json jacoco-report.csv jacoco/*
65+
git push
66+
fi
67+

.github/workflows/prepare-maven-release.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,40 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17-
# with:
18-
# token: ${{ github.token }}
17+
1918
- name: Set up Java for publishing to Maven Central Repository
2019
uses: actions/setup-java@v2
2120
with:
2221
java-version: '17'
23-
distribution: 'adopt'
24-
server-id: ossrh
25-
server-username: MAVEN_USERNAME
26-
server-password: MAVEN_PASSWORD
22+
distribution: 'temurin'
2723

2824
- name: Configure Git User
2925
run: |
3026
git config user.email ${{ github.actor }}@users.noreply.github.com
3127
git config user.name ${{ github.actor }}
3228
3329
- name: Prepare Release
34-
run: mvn -B release:prepare -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
30+
run: |
31+
mvn -B release:prepare -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
32+
mvn -B release:clean
3533
env:
3634
GITHUB_ACTOR: ${{ github.actor }}
3735
GITHUB_TOKEN: ${{ github.token }}
3836

39-
- name: Push Release
40-
run: |
41-
git push
42-
git push --tags
37+
- name: Create Pull Request (Main)
38+
id: cpr
39+
uses: peter-evans/create-pull-request@v5
40+
with:
41+
commit-message: 'Release ${{ github.event.inputs.releaseVersion }}'
42+
branch: release/${{ github.event.inputs.releaseVersion }}
43+
title: 'Release ${{ github.event.inputs.releaseVersion }}'
44+
body: 'Release ${{ github.event.inputs.releaseVersion }}'
45+
labels: 'release'
46+
47+
- name: Enable Pull Request Automerge (Main)
48+
run: gh pr merge --merge --auto --delete-branch "${{ steps.cpr.outputs.pull-request-number }}"
49+
env:
50+
GH_TOKEN: ${{ github.token }}
51+
52+
- name: Push Release Tag
53+
run: git push --tags

.github/workflows/publish-maven-central.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,40 @@ name: Publish to Maven Central
22
on:
33
release:
44
types: [created]
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: 'Tag to check out'
9+
required: true
10+
default: 'main'
511
jobs:
612
publish:
713
runs-on: ubuntu-latest
814
steps:
915
- uses: actions/checkout@v2
16+
with:
17+
ref: ${{ github.event.inputs.tag || github.event.release.tag_name }}
18+
1019
- name: Set up Java for publishing to Maven Central Repository
1120
uses: actions/setup-java@v2
1221
with:
1322
java-version: '17'
14-
distribution: 'adopt'
15-
server-id: ossrh
23+
distribution: 'temurin'
24+
server-id: central
1625
server-username: MAVEN_USERNAME
1726
server-password: MAVEN_PASSWORD
27+
28+
# - name: Enforce Release Version
29+
# run: mvn enforcer:enforce@enforce-release-version
30+
1831
- name: Publish to the Maven Central Repository
1932
run: mvn --batch-mode deploy -DdeployAtEnd=true -Dmaven.javadoc.skip=false
2033
env:
21-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
22-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
34+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
35+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
2336
SIGN_KEY: ${{ secrets.SIGN_KEY }}
2437
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
2538

26-
27-
2839
- name: Checkout badges branch to a badges directory nested inside first checkout
2940
uses: actions/checkout@v2
3041
with:
@@ -57,13 +68,14 @@ jobs:
5768
if: ${{ github.event_name != 'pull_request' }}
5869
run: |
5970
echo $(ls -l)
71+
TAG_NAME=${{ github.event.release.tag_name || github.run_id }}
6072
cd badges
6173
if [[ `git status --porcelain` ]]; then
6274
git config --global user.name 'github-agit pctions'
6375
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
6476
git add *.svg *.json jacoco-report.csv jacoco/*
6577
git commit -m "coverage = ${{ steps.jacoco.outputs.coverage }} branches = ${{ steps.jacoco.outputs.branches }}" *.svg *.json jacoco-report.csv jacoco/*
6678
git push
67-
git tag coverage_badges_${{github.event.release.tag_name}}
79+
git tag coverage_badges_${TAG_NAME}
6880
git push --tags
6981
fi

.github/workflows/build.yml renamed to .github/workflows/publish-maven-snapshots.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build and Publish Maven Snapshots
22

33
on:
44
push:
@@ -15,28 +15,26 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v2
1717

18-
- name: Set up the Java JDK
18+
- name: Set up Java for publishing to Maven Central Repository
1919
uses: actions/setup-java@v2
2020
with:
2121
java-version: '17'
22-
distribution: 'adopt'
23-
server-id: ossrh
22+
distribution: 'temurin'
23+
server-id: central
2424
server-username: MAVEN_USERNAME
2525
server-password: MAVEN_PASSWORD
2626

27-
- name: Build and Publish SNAPSHOT to the Maven Central
28-
if: ${{ github.event_name == 'push' }}
29-
run: mvn -B verify deploy -DdeployAtEnd=true
27+
- name: Enforce Snapshot Version
28+
run: mvn enforcer:enforce@enforce-snapshot-version
29+
30+
- name: Publish to the Maven Central Repository
31+
run: mvn --batch-mode deploy -DdeployAtEnd=true -Dmaven.javadoc.skip=false
3032
env:
31-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
32-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
33+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
34+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
3335
SIGN_KEY: ${{ secrets.SIGN_KEY }}
3436
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
3537

36-
# - name: Build and Verify
37-
# if: ${{ github.event_name == 'pull_request' }}
38-
# run: mvn -B verify
39-
4038
- name: Generate JaCoCo Badge
4139
id: jacoco
4240
uses: cicirello/jacoco-badge-generator@v2
@@ -61,5 +59,5 @@ jobs:
6159
gh pr comment ${{github.event.pull_request.number}} -b "${BODY}"
6260
continue-on-error: true
6361
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6563

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ ZenWave Domain Model Language
22
=====================================
33

44

5-
[![Maven Central](https://img.shields.io/maven-central/v/io.github.zenwave360.zenwave-sdk/zdl-jvm.svg?label=Maven%20Central&logo=apachemaven)](https://search.maven.org/artifact/io.github.zenwave360.zenwave-sdk/zdl-jvm)
5+
[![Maven Central](https://img.shields.io/maven-central/v/io.zenwave360.sdk/zdl-jvm.svg?label=Maven%20Central&logo=apachemaven)](https://search.maven.org/artifact/io.zenwave360.sdk/zdl-jvm)
66
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/ZenWave360/zdl-jvm?logo=GitHub)](https://github.com/ZenWave360/zdl-jvm/releases)
7-
[![build](https://github.com/ZenWave360/zdl-jvm/workflows/Build/badge.svg)](https://github.com/ZenWave360/zdl-jvm/actions/workflows/build.yml)
7+
[![build](https://github.com/ZenWave360/zdl-jvm/workflows/Build%20and%20Publish%20Maven%20Snapshots/badge.svg)](https://github.com/ZenWave360/zdl-jvm/actions/workflows/publish-maven-snapshots.yml)
88
[![coverage](https://raw.githubusercontent.com/ZenWave360/zdl-jvm/badges/jacoco.svg)](https://github.com/ZenWave360/zdl-jvm/actions/workflows/build.yml)
9-
[![branches coverage](https://raw.githubusercontent.com/ZenWave360/zdl-jvm/badges/branches.svg)](https://github.com/ZenWave360/zdl-jvm/actions/workflows/build.yml)
9+
[![branches coverage](https://raw.githubusercontent.com/ZenWave360/zdl-jvm/badges/branches.svg)](https://github.com/ZenWave360/zdl-jvm/actions/workflows/main.yml)
1010
[![GitHub](https://img.shields.io/github/license/ZenWave360/zdl-jvm)](https://github.com/ZenWave360/zdl-jvm/blob/main/LICENSE)
1111

12+
> Since version 1.4.0 groupId was changed to `io.zenwave360.sdk`
1213
1314
ZDL is a Domain Specific Language (DSL) for Event-Driven Architectures. With Domain Driven Design principles built-in, it can be used to map the discoveries of an [EventStorming](https://www.eventstorming.com/) session.
1415

pom.xml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>io.github.zenwave360.zenwave-sdk</groupId>
6+
<groupId>io.zenwave360.sdk</groupId>
77
<artifactId>zdl-jvm</artifactId>
88
<version>1.3.0-SNAPSHOT</version>
99
<packaging>jar</packaging>
@@ -28,19 +28,6 @@
2828
</developer>
2929
</developers>
3030

31-
<distributionManagement>
32-
<repository>
33-
<id>ossrh</id>
34-
<name>Central Repository OSSRH</name>
35-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
36-
</repository>
37-
<snapshotRepository>
38-
<id>ossrh</id>
39-
<name>Central Repository OSSRH</name>
40-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
41-
</snapshotRepository>
42-
</distributionManagement>
43-
4431
<scm>
4532
<connection>scm:git:git://github.com/ZenWave360/zdl-jvm.git</connection>
4633
<developerConnection>scm:git:git@github.com:ZenWave360/ZenWave360.git</developerConnection>
@@ -62,6 +49,7 @@
6249
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
6350
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
6451
<maven.javadoc.skip>true</maven.javadoc.skip>
52+
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
6553
</properties>
6654

6755
<build>
@@ -119,6 +107,17 @@
119107
</dependency>
120108
</dependencies>
121109
</plugin>
110+
<plugin>
111+
<groupId>org.sonatype.central</groupId>
112+
<artifactId>central-publishing-maven-plugin</artifactId>
113+
<version>${central-publishing-maven-plugin.version}</version>
114+
<extensions>true</extensions>
115+
<configuration>
116+
<publishingServerId>central</publishingServerId>
117+
<autoPublish>false</autoPublish>
118+
<!-- <tokenAuth>true</tokenAuth>-->
119+
</configuration>
120+
</plugin>
122121
<plugin>
123122
<groupId>org.apache.maven.plugins</groupId>
124123
<artifactId>maven-source-plugin</artifactId>
@@ -186,6 +185,31 @@
186185
</execution>
187186
</executions>
188187
</plugin>
188+
<plugin>
189+
<groupId>org.apache.maven.plugins</groupId>
190+
<artifactId>maven-enforcer-plugin</artifactId>
191+
<version>3.5.0</version>
192+
<executions>
193+
<execution>
194+
<id>enforce-release-version</id>
195+
<configuration>
196+
<rules>
197+
<requireReleaseVersion/>
198+
</rules>
199+
</configuration>
200+
</execution>
201+
<execution>
202+
<id>enforce-snapshot-version</id>
203+
<configuration>
204+
<rules>
205+
<requireSnapshotVersion>
206+
<failWhenParentIsRelease>false</failWhenParentIsRelease>
207+
</requireSnapshotVersion>
208+
</rules>
209+
</configuration>
210+
</execution>
211+
</executions>
212+
</plugin>
189213
</plugins>
190214
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
191215
<plugins>
File renamed without changes.

src/main/antlr4/io.github.zenwave360.zdl.antlr/json-objects.txt renamed to src/main/antlr4/io.zenwave360.zdl.antlr/json-objects.txt

File renamed without changes.

src/main/java/io/github/zenwave360/zdl/ZdlParser.java renamed to src/main/java/io/zenwave360/zdl/ZdlParser.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package io.github.zenwave360.zdl;
1+
package io.zenwave360.zdl;
22

3-
import io.github.zenwave360.zdl.antlr.ZdlLexer;
4-
import io.github.zenwave360.zdl.antlr.ZdlListenerImpl;
5-
import io.github.zenwave360.zdl.antlr.ZdlModel;
6-
import io.github.zenwave360.zdl.antlr.ZdlModelPostProcessor;
7-
import io.github.zenwave360.zdl.antlr.ZdlModelValidator;
3+
import io.zenwave360.zdl.antlr.ZdlLexer;
4+
import io.zenwave360.zdl.antlr.ZdlListenerImpl;
5+
import io.zenwave360.zdl.antlr.ZdlModel;
6+
import io.zenwave360.zdl.antlr.ZdlModelPostProcessor;
7+
import io.zenwave360.zdl.antlr.ZdlModelValidator;
88
import org.antlr.v4.runtime.CharStream;
99
import org.antlr.v4.runtime.CharStreams;
1010
import org.antlr.v4.runtime.CommonTokenStream;
@@ -13,8 +13,6 @@
1313

1414
import java.io.IOException;
1515
import java.util.List;
16-
import java.util.Map;
17-
import java.util.Set;
1816

1917
public class ZdlParser {
2018

@@ -36,7 +34,7 @@ public ZdlModel parseModel(String model) throws IOException {
3634
CharStream zdl = CharStreams.fromString(model);
3735
ZdlLexer lexer = new ZdlLexer(zdl);
3836
CommonTokenStream tokens = new CommonTokenStream(lexer);
39-
io.github.zenwave360.zdl.antlr.ZdlParser parser = new io.github.zenwave360.zdl.antlr.ZdlParser(tokens);
37+
io.zenwave360.zdl.antlr.ZdlParser parser = new io.zenwave360.zdl.antlr.ZdlParser(tokens);
4038
ParseTree tree = parser.zdl();
4139
ParseTreeWalker walker = new ParseTreeWalker();
4240
ZdlListenerImpl listener = new ZdlListenerImpl();

src/main/java/io/github/zenwave360/zdl/antlr/FluentMap.java renamed to src/main/java/io/zenwave360/zdl/antlr/FluentMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.zenwave360.zdl.antlr;
1+
package io.zenwave360.zdl.antlr;
22

33
import java.util.ArrayList;
44
import java.util.LinkedHashMap;

0 commit comments

Comments
 (0)