Skip to content

Commit 7406f86

Browse files
authored
Merge pull request #8 from Bernardo-MG/release
Release
2 parents 4493622 + c2f3496 commit 7406f86

22 files changed

Lines changed: 318 additions & 273 deletions

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ on:
77
jobs:
88
github:
99
name: Github
10-
uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_github.yml@v1
10+
uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_github.yml@v1
1111
secrets:
1212
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Doc deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
9+
jobs:
10+
deploy_develop_docs:
11+
name: Deploy docs for develop
12+
uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1
13+
with:
14+
branch: develop
15+
host: docs.bernardomg.com
16+
secrets:
17+
url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }}
18+
username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}
19+
password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}
20+
21+
deploy_master_docs:
22+
name: Deploy docs for master
23+
uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1
24+
with:
25+
branch: master
26+
host: docs.bernardomg.com
27+
secrets:
28+
url: ${{ secrets.DEPLOY_DOCS_SITE }}
29+
username: ${{ secrets.DEPLOY_DOCS_USER }}
30+
password: ${{ secrets.DEPLOY_DOCS_PASSWORD }}

.github/workflows/test.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
1-
name: Tests and docs
1+
name: Tests
22

33
on: [push, pull_request]
44

55
jobs:
6-
tests:
7-
name: Tests
8-
uses: Bernardo-MG/github-workflow/.github/workflows/maven_testing.yml@v1
9-
10-
deploy_develop_docs:
11-
name: Deploy development docs
12-
needs: tests
13-
uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_site.yml@v1
6+
tests_11:
7+
name: Tests with JDK 11
8+
uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1
149
with:
15-
branch: develop
16-
host: docs.bernardomg.com
17-
secrets:
18-
url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }}
19-
username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}
20-
password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}
10+
jdk: 11
2111

22-
deploy_docs:
23-
name: Deploy docs
24-
needs: tests
25-
uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_site.yml@v1
12+
tests_17:
13+
name: Tests with JDK 17
14+
uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1
2615
with:
27-
branch: master
28-
host: docs.bernardomg.com
29-
secrets:
30-
url: ${{ secrets.DEPLOY_DOCS_SITE }}
31-
username: ${{ secrets.DEPLOY_DOCS_USER }}
32-
password: ${{ secrets.DEPLOY_DOCS_PASSWORD }}
16+
jdk: 17

pom.xml

Lines changed: 42 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<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">
43

54
<modelVersion>4.0.0</modelVersion>
65

@@ -11,7 +10,7 @@
1110
<parent>
1211
<groupId>com.bernardomg.maven</groupId>
1312
<artifactId>base-pom</artifactId>
14-
<version>1.4.2</version>
13+
<version>1.5.3</version>
1514
</parent>
1615

1716
<!-- ********************************************** -->
@@ -20,7 +19,7 @@
2019

2120
<groupId>com.bernardomg.tabletop</groupId>
2221
<artifactId>dice-cli</artifactId>
23-
<version>1.2.2</version>
22+
<version>1.2.3</version>
2423
<packaging>jar</packaging>
2524

2625
<name>Dice Notation Tools CLI</name>
@@ -63,17 +62,6 @@
6362
<!-- ********************************************** -->
6463

6564
<profiles>
66-
<profile>
67-
<!-- Profile for the Eclipse Maven plugin -->
68-
<!-- Sets the POM so this plugin does not give the usual unregistered goals errors -->
69-
<!-- It will be activated automatically on Eclipse if this has the m2e plugin, by detecting the version property -->
70-
<id>eclipse-maven</id>
71-
<activation>
72-
<property>
73-
<name>m2e.version</name>
74-
</property>
75-
</activation>
76-
</profile>
7765
<!-- ============================================== -->
7866
<!-- ============ DEPLOYMENT PROFILES ============= -->
7967
<!-- ============================================== -->
@@ -138,34 +126,34 @@
138126
<!-- ********************************************** -->
139127

140128
<properties>
141-
<!-- ============================================== -->
142-
<!-- ================ JAVA VERSION ================ -->
143-
<!-- ============================================== -->
144-
<java.version>11</java.version>
145129
<!-- ============================================== -->
146130
<!-- =============== MANIFEST DATA ================ -->
147131
<!-- ============================================== -->
148132
<manifest.name>com/bernardomg/dice/cli</manifest.name>
149133
<!-- ============================================== -->
150134
<!-- =========== DEPENDENCIES VERSIONS ============ -->
151135
<!-- ============================================== -->
152-
<dice.version>2.2.1</dice.version>
153-
<guava.version>31.0.1-jre</guava.version>
154-
<junit.jupiter.version>5.8.2</junit.jupiter.version>
155-
<mockito.version>4.2.0</mockito.version>
156-
<picocli.version>4.6.2</picocli.version>
157-
<log4j.version>2.17.1</log4j.version>
158-
<slf4j.version>1.7.30</slf4j.version>
159-
<spring.boot.version>2.5.3</spring.boot.version>
136+
<dice.version>2.2.3</dice.version>
137+
<guava.version>31.1-jre</guava.version>
138+
<junit.jupiter.version>5.9.2</junit.jupiter.version>
139+
<picocli.version>4.7.1</picocli.version>
140+
<spring.boot.version>2.7.8</spring.boot.version>
160141
<!-- ============================================== -->
161142
<!-- ============== PLUGINS VERSIONS ============== -->
162143
<!-- ============================================== -->
163144
<plugin.spring.boot.version>${spring.boot.version}</plugin.spring.boot.version>
164145
<!-- ============================================== -->
146+
<!-- ============ PLUGIN CONFIGURATION ============ -->
147+
<!-- ============================================== -->
148+
<!-- Checkstyle customized rules file -->
149+
<checkstyle.config.location>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</checkstyle.config.location>
150+
<!-- ============================================== -->
165151
<!-- ================= MAVEN SITE ================= -->
166152
<!-- ============================================== -->
167-
<site.skin.version>2.2.5</site.skin.version>
168-
<githubArtifactURL><![CDATA[https://github.com/Bernardo-MG?tab=packages&amp;repo_name=dice-notation-java-cli]]></githubArtifactURL>
153+
<site.skin.version>2.3.1</site.skin.version>
154+
<githubArtifactURL>
155+
<![CDATA[https://github.com/Bernardo-MG?tab=packages&amp;repo_name=dice-notation-java-cli]]>
156+
</githubArtifactURL>
169157
<!-- ============================================== -->
170158
<!-- ================= EXECUTABLE ================= -->
171159
<!-- ============================================== -->
@@ -179,6 +167,14 @@
179167

180168
<dependencyManagement>
181169
<dependencies>
170+
<dependency>
171+
<!-- Spring Boot Dependencies BOM -->
172+
<groupId>org.springframework.boot</groupId>
173+
<artifactId>spring-boot-dependencies</artifactId>
174+
<version>${spring.boot.version}</version>
175+
<type>pom</type>
176+
<scope>import</scope>
177+
</dependency>
182178
<dependency>
183179
<!-- JUnit BOM -->
184180
<groupId>org.junit</groupId>
@@ -208,6 +204,22 @@
208204
<groupId>com.bernardomg.tabletop</groupId>
209205
<artifactId>dice</artifactId>
210206
<version>${dice.version}</version>
207+
<exclusions>
208+
<exclusion>
209+
<!-- SLF4J API -->
210+
<groupId>org.slf4j</groupId>
211+
<artifactId>slf4j-api</artifactId>
212+
</exclusion>
213+
</exclusions>
214+
</dependency>
215+
<!-- ============================================== -->
216+
<!-- ================== LOMBOK ==================== -->
217+
<!-- ============================================== -->
218+
<dependency>
219+
<!-- Lombok -->
220+
<groupId>org.projectlombok</groupId>
221+
<artifactId>lombok</artifactId>
222+
<scope>provided</scope>
211223
</dependency>
212224
<!-- ============================================== -->
213225
<!-- ================== LOGGERS =================== -->
@@ -216,19 +228,16 @@
216228
<!-- SLF4J API -->
217229
<groupId>org.slf4j</groupId>
218230
<artifactId>slf4j-api</artifactId>
219-
<version>${slf4j.version}</version>
220231
</dependency>
221232
<dependency>
222233
<!-- Log4j SLF4J Bridge -->
223234
<groupId>org.apache.logging.log4j</groupId>
224235
<artifactId>log4j-slf4j-impl</artifactId>
225-
<version>${log4j.version}</version>
226236
</dependency>
227237
<dependency>
228238
<!-- Log4j core -->
229239
<groupId>org.apache.logging.log4j</groupId>
230240
<artifactId>log4j-core</artifactId>
231-
<version>${log4j.version}</version>
232241
</dependency>
233242
<!-- ============================================== -->
234243
<!-- ======= TEST ENVIRONMENT DEPENDENCIES ======== -->
@@ -249,7 +258,6 @@
249258
<!-- Mockito -->
250259
<groupId>org.mockito</groupId>
251260
<artifactId>mockito-core</artifactId>
252-
<version>${mockito.version}</version>
253261
<scope>test</scope>
254262
</dependency>
255263
</dependencies>
@@ -370,17 +378,6 @@
370378

371379
<reporting>
372380
<plugins>
373-
<plugin>
374-
<!-- Checkstyle -->
375-
<!-- Checks that the source files comply with style standards -->
376-
<!-- It is using a customized rules file -->
377-
<groupId>org.apache.maven.plugins</groupId>
378-
<artifactId>maven-checkstyle-plugin</artifactId>
379-
<configuration>
380-
<!-- The customized rules file -->
381-
<configLocation>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</configLocation>
382-
</configuration>
383-
</plugin>
384381
<plugin>
385382
<!-- PMD -->
386383
<!-- Checks that the code complies with a series of code quality rules -->
@@ -393,13 +390,7 @@
393390
</rulesets>
394391
</configuration>
395392
</plugin>
396-
<plugin>
397-
<!-- SpotBugs -->
398-
<!-- Checks for patterns which are prone to errors -->
399-
<groupId>com.github.spotbugs</groupId>
400-
<artifactId>spotbugs-maven-plugin</artifactId>
401-
</plugin>
402393
</plugins>
403394
</reporting>
404395

405-
</project>
396+
</project>

src/changes/changes.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,16 @@
4141
Updated CI files.
4242
</action>
4343
</release>
44+
<release version="1.2.3" date="2023-02-18" description="">
45+
<action dev="bmg" type="fix">
46+
Fixed docs.
47+
</action>
48+
<action dev="bmg" type="update">
49+
Version command is more resistant to errors.
50+
</action>
51+
<action dev="bmg" type="update">
52+
Updated dependencies.
53+
</action>
54+
</release>
4455
</body>
4556
</document>

src/config/checkstyle/checkstyle-rules.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
<property name="eachLine" value="true" />
3939
</module>
4040

41-
<!-- Checks line lenght -->
41+
<!-- Checks line length -->
4242
<module name="LineLength">
43-
<property name="max" value="100" />
43+
<property name="max" value="120" />
4444
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://" />
4545
</module>
4646

src/main/java/com/bernardomg/tabletop/dice/cli/Main.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2020 the original author or authors
2+
* Copyright 2020-2023 the original author or authors
33
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -16,32 +16,26 @@
1616

1717
package com.bernardomg.tabletop.dice.cli;
1818

19-
import org.slf4j.Logger;
20-
import org.slf4j.LoggerFactory;
21-
2219
import com.bernardomg.tabletop.dice.cli.menu.DiceMenu;
2320

21+
import lombok.extern.slf4j.Slf4j;
2422
import picocli.CommandLine;
2523

2624
/**
2725
* Main executable class.
28-
*
29-
* @author Bernardo Martínez Garrido
26+
*
27+
* @author Bernardo Mart&iacute;nez Garrido
3028
*
3129
*/
30+
@Slf4j
3231
public class Main {
3332

34-
/**
35-
* Logger.
36-
*/
37-
private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
38-
3933
public static void main(final String[] args) {
4034
final Integer exitCode;
4135

4236
exitCode = new CommandLine(new DiceMenu()).execute(args);
4337

44-
LOGGER.debug("Exited with code {}", exitCode);
38+
log.debug("Exited with code {}", exitCode);
4539

4640
System.exit(exitCode);
4741
}

0 commit comments

Comments
 (0)