diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index fcb84bb..4b1f8a9 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -17,13 +17,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Cache Maven packages
+ - name: Use Cache for Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
-
+
+ - name: Import GPG keys
+ run: 'echo -e "$GPG_FILE" | gpg2 --import --no-tty --batch --yes'
+ shell: bash
+ env:
+ GPG_FILE: ${{secrets.GPG_FILE}}
+
- name: Set up Java for Apache Maven Central
uses: actions/setup-java@v1
with:
@@ -33,18 +39,12 @@ jobs:
server-password: OSSRH_PASSWORD # env variable for token in deploy
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
- - name: Import GPG keys
- run: 'echo -e "$GPG_FILE" | gpg2 --import --no-tty --batch --yes'
- shell: bash
- env:
- GPG_FILE: ${{secrets.GPG_FILE}}
-
- - name: Build with Maven
+ - name: Build and Verify with Maven
run: mvn --batch-mode --update-snapshots clean compile verify
- name: Publish to Apache Maven Central
# run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras -Dmaven.test.skip=true
- run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras -Dmaven.test.skip=true
+ run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras,deploy-ossrh -Dmaven.test.skip=true
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
@@ -56,11 +56,12 @@ jobs:
java-version: 11
- name: Publish to GitHub Packages
- run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras,!deploy-ossrh -Dmaven.test.skip=true -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/csowada/ebus
+ # -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/csowada/ebus
+ run: mvn deploy --batch-mode --update-snapshots -P !sign,!build-extras,!deploy-ossrh,deploy-github -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Create Release
+ - name: Create GitGub Release
id: create_release
uses: actions/create-release@v1
env:
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index c3cc9b0..e7d65c0 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -5,9 +5,9 @@ name: Java CI with Maven
on:
push:
- branches: [ master ]
+ branches: [ master, develop ]
pull_request:
- branches: [ master ]
+ types: [opened, synchronize, reopened]
jobs:
@@ -17,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache Maven packages
uses: actions/cache@v2
@@ -24,14 +26,24 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
-
+
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
- - name: Build witrh Maven
- run: mvn --batch-mode --update-snapshots clean compile verify
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- run: mkdir staging && cp target/*.jar staging
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88fab67..4690391 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,104 +1,120 @@
-## 1.0.7 (2020-05-17)
-
-Features:
-
- - Limit the ThreadPoolExecutor to max. 30 threads
-
-Bugfixes:
-
- - Add sender thread restart to main loop
- - Fix a NullPoint Exception
+# Changelog
+All notable changes to this project will be documented in this file.
+
+## Unreleased
+
+## [1.1.2] - 2020-12-17
+### Added
+- Added ``sonarcloud`` to build pipeline
+### Removed
+- Removed all old CI files from the project
+
+## [1.1.1] - 2020-12-17
+### Added
+- Added ``gitflow-maven-plugin`` to manage release process, see BUILD-HELP.md
+### Changed
+- Switched from Travis CI to GitHub Actions
+
+## [1.1.0] - 2020-12-12
+### Added
+- Add Eclipse Null Annotionas to project
+### Changed
+- Changed a lot of code lines to fix several ``null`` issues etc.
+- Declare all dependencies in ``pom.xml`` as ``provided``
+
+## [1.0.8] - 2020-06-21
+### Fixed
+- Fixed several ``NullPointException``
+
+## [1.0.7] - 2020-05-17
+
+### Changed
+- Limit the ThreadPoolExecutor to max. 30 threads
+
+### Fixed
+- Add sender thread restart to main loop
+- Fix a NullPoint Exception
-## 1.0.6 (2020-02-09)
+## [1.0.6] - 2020-02-09
-Features:
+### Added
+- Add a send preparation function incl. auto attach crc if missing
- - Add a send preparation function incl. auto attach crc if missing
- - Enhance fireOn... events, including some sendId fixes
+### Change
+- Enhance fireOn... events, including some sendId fixes
-Bugfixes:
-
- - Disable ``InterruptedIOException`` to prevent ebusd connector from closing after a short time
+### Fixed
+- Disable ``InterruptedIOException`` to prevent ebusd connector from closing after a short time
-## 1.0.5 (2020-01-29)
+## [1.0.5] - 2020-01-29
-Features:
-
- - Enhance telegram matcher in Command registry
- - Add (debug) warning if master-slave command configuration is without slave part
- - Throw an exception on ``master-master`` commands with slave addresses that have no master address pair
+### Changed
+- Enhance telegram matcher in Command registry
+- Add (debug) warning if master-slave command configuration is without slave part
+- Throw an exception on ``master-master`` commands with slave addresses that have no master address pair
-Bugfixes:
-
- - Fix matcher in Command registry
- - Fix several nested template bugs
- - Fix internal clone() of nested templates
- - Set type and default value for nested types
- - Use list for ``template-block`` to also copy values without ``name``
- - Rename template to valueDto, better variable name
- - Add nested values to ``composeMasterData`` incl. test case
- - Fix parent method for nested values
-
-## 1.0.4 (2020-01-21)
-
-Features:
-
- - Add Version class to identify build version, commit etc.
-
-Bugfixes:
-
- - Use timestamps for Bundle-Version
-
-## 1.0.3 (2020-01-20)
-
-Features:
-
- - enhance ebusd controller with version check
- - update all unit tests
- - improve NRJavaSerial connector
- - add a warning if the received data doesn't match to the found config method.
-
-Bugfixes:
-
- - fix ``FF`` byte issue on sending
- - add a warning if a template-block element has no name (more a bug workaround!)
- - revert default telegram type to ``master-slave`` if not specified
- - harden slave length function, expect no slave data
+### Fixed
+- Fix matcher in Command registry
+- Fix several nested template bugs
+ - Fix internal clone() of nested templates
+ - Set type and default value for nested types
+ - Use list for ``template-block`` to also copy values without ``name``
+ - Rename template to valueDto, better variable name
+ - Add nested values to ``composeMasterData`` incl. test case
+ - Fix parent method for nested values
+
+## [1.0.4] - 2020-01-21
+
+### Added
+- Add Version class to identify build version, commit etc.
+
+### Fixed
+- Use timestamps for Bundle-Version
+
+## [1.0.3] - 2020-01-20
+
+### Changed
+- enhance ebusd controller with version check
+- update all unit tests
+- improve NRJavaSerial connector
+- add a warning if the received data doesn't match to the found config method.
+
+### Fixed
+- fix ``FF`` byte issue on sending
+- add a warning if a template-block element has no name (more a bug workaround!)
+- revert default telegram type to ``master-slave`` if not specified
+- harden slave length function, expect no slave data
-## 1.0.2 (2020-01-12)
+## [1.0.2] - 2020-01-12
-Features:
-
- - check every send byte for LowLevelController
- - enhance error and parsing logging
- - enhance queue for ebusd controller
- - adjust NRJavaSerial driver for low latency
+### Changed
+- check every send byte for LowLevelController
+- enhance error and parsing logging
+- enhance queue for ebusd controller
+- adjust NRJavaSerial driver for low latency
-Bugfixes:
-
- - block send queue while controller is not connected
- - reduce Device Table Service log messages
+### Fixed
+- block send queue while controller is not connected
+- reduce Device Table Service log messages
-## 1.0.1 (2020-01-03)
-
-Features:
-
- - add more details on connection errors
- - add more details on parser errors
- - add connection status incl. listeners to controllers
-
-Bugfixes:
+## [1.0.1] - 2020-01-03
- - fix thread interrupt handling
- - allow null values for date and/or time for "datetime" type
- - fix wrong replace broadcast message on building a telegram
- - block table services if connection is not established
- - add slave length to command match function to only process expected slave answer
+### Changed
+- add more details on connection errors
+- add more details on parser errors
+- add connection status incl. listeners to controllers
+### Fixed
+- fix thread interrupt handling
+- allow null values for date and/or time for "datetime" type
+- fix wrong replace broadcast message on building a telegram
+- block table services if connection is not established
+- add slave length to command match function to only process expected slave answer
-## 1.0.0 (2019-12-28)
-Just a new label for the Alpha 0.9.22 release
+## [1.0.0] - 2019-12-28
+### Changed
+- Just a new label for the Alpha 0.9.22 release
## Alpha 0.9.22 (2019-12.28)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 80c4e3b..0000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Maven
-# Build your Java project and run tests with Apache Maven.
-# Add steps that analyze code, save build artifacts, deploy, and more:
-# https://docs.microsoft.com/azure/devops/pipelines/languages/java
-
-trigger:
-- master
-
-pool:
- vmImage: 'Ubuntu-16.04'
-
-steps:
-- task: Maven@3
- inputs:
- mavenPomFile: 'pom.xml'
- mavenOptions: '-Xmx3072m'
- javaHomeOption: 'JDKVersion'
- jdkVersionOption: '1.8'
- jdkArchitectureOption: 'x64'
- publishJUnitResults: false
- testResultsFiles: '**/surefire-reports/TEST-*.xml'
- goals: 'package'
diff --git a/cd/settings.xml b/cd/settings.xml
deleted file mode 100644
index a89dbe3..0000000
--- a/cd/settings.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- ossrh
- ${env.OSSRH_USERNAME}
- ${env.OSSRH_PASSWORD}
-
-
-
-
-
- ossrh
-
- true
-
-
- gpg
- ${env.GPG_PASSPHRASE}
-
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 78568b2..245a774 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
eBUS core library - This library handles the communication with heating engineering via the BUS specification. This protocol is used by many heating manufacturers in Europe.
de.cs-dev.ebus
ebus-core
- 1.1.1
+ 1.1.2
https://github.com/csowada/ebus
bundle
@@ -19,6 +19,9 @@
8
2020
+ csowada_ebus
+ csowada
+ https://sonarcloud.io
@@ -35,7 +38,7 @@
- git@cs-dev.de
+ opensource@cs-dev.de
Christian Sowada
https://github.com/csowada
csowada
@@ -267,6 +270,22 @@
+
+
+ deploy-github
+
+ false
+
+
+
+
+ github
+ GitHub Packages
+ https://maven.pkg.github.com/csowada/ebus
+
+
+
+
@@ -345,4 +364,4 @@
-
+
\ No newline at end of file
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..3130950
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,6 @@
+sonar.organization=csowada
+sonar.projectKey=csowada_ebus
+
+# relative paths to source directories. More details and properties are described
+# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
+sonar.sources=.
\ No newline at end of file