Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic deployment to github #393

Merged
merged 11 commits into from
Sep 21, 2024
13 changes: 11 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,17 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# - name: Autobuild
# uses: github/codeql-action/autobuild@v3

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'

- name: Build with Maven
run: mvn clean install

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '17', '21' ]

steps:
- uses: actions/checkout@v4
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/maven-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.8 for Github deployment
- name: Set up JDK 17 for Github deployment
uses: actions/setup-java@v4
with:
java-version: 8.0.302+8
java-version: 17
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
Expand Down Expand Up @@ -58,10 +58,10 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}


- name: Set up JDK 1.8 for NERZ-Snapshot-Deployment
- name: Set up JDK 17 for NERZ-Snapshot-Deployment
uses: actions/setup-java@v4
with:
java-version: 8.0.302+8
java-version: 17
distribution: 'temurin'
server-id: nerz-snapshots
server-username: MAVEN_USERNAME
Expand All @@ -76,10 +76,10 @@ jobs:
MAVEN_USERNAME: ${{ secrets.NERZ_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NERZ_TOKEN }}

- name: Set up JDK 1.8 for NERZ-Release-Deployment
- name: Set up JDK 17 for NERZ-Release-Deployment
uses: actions/setup-java@v4
with:
java-version: 8.0.302+8
java-version: 17
distribution: 'temurin'
server-id: nerz-releases
server-username: MAVEN_USERNAME
Expand All @@ -93,7 +93,13 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.NERZ_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NERZ_TOKEN }}


- name: Publish to GitHub
run: |
mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
MAVEN_USERNAME: ${{ github.actor }}
MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}



Expand Down
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# com.bitctrl
Allgemeine Bibliothek für BitCtrl-Projekte

## Version 3.0.0
- Update auf Java 17
- javax Namespace durch jakarta ersetzt
- DAO & Criteria Klassen deprecated

## Version 2.1.0

- Publikation auf dem NERZ-Maven-Repository
Expand Down
100 changes: 21 additions & 79 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<groupId>com.bitctrl</groupId>
<artifactId>com.bitctrl</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>

<name>Allgemeine BitCtrl-Bibliothek</name>
<url>http://bitctrl.github.io/${project.artifactId}/</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<licenses>
Expand All @@ -36,7 +36,8 @@

<scm>
<connection>scm:git:https://github.com/bitctrl/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://github.com/bitctrl/${project.artifactId}.git</developerConnection>
<developerConnection>
scm:git:https://github.com/bitctrl/${project.artifactId}.git</developerConnection>
<url>https://github.com/bitctrl/${project.artifactId}</url>
</scm>

Expand All @@ -63,12 +64,14 @@
<repository>
<id>bitctrl.nexus</id>
<name>BitCtrl Nexus Releases Repository</name>
<url>http://bitctrlbuildserver:8081/nexus/content/repositories/releases/</url>
<url>
http://nexus.ad.bitctrl.de/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>bitctrl.nexus.snapshots</id>
<name>BitCtrl Nexus Snapshots Repository</name>
<url>http://bitctrlbuildserver:8081/nexus/content/repositories/snapshots/</url>
<url>
http://nexus.ad.bitctrl.de/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</profile>
Expand Down Expand Up @@ -111,7 +114,8 @@
<snapshotRepository>
<id>nerz-snapshots</id>
<name>NERZ Snapshots</name>
<url>https://repo.nerz-ev.de/repository/nerz-maven-snapshots/</url>
<url>
https://repo.nerz-ev.de/repository/nerz-maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</profile>
Expand All @@ -130,16 +134,11 @@
<version>1.16.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.5</version>
</dependency>


</dependencies>

<build>
Expand Down Expand Up @@ -170,7 +169,8 @@
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
Expand Down Expand Up @@ -229,20 +229,13 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.3</version>
<configuration>
<threshold>High</threshold>
<includeTests>true</includeTests>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
Expand Down Expand Up @@ -304,57 +297,6 @@
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<includeTests>true</includeTests>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>Ungelöste Probleme</displayName>
<tags>
<tag>
<matchString>FIXME</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Offene Punkte</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Markierungen</displayName>
<tags>
<tag>
<matchString>XXX</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
</tagClass>
</tagClasses>
</tagListOptions>
</configuration>
</plugin>
</plugins>
</reporting>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/bitctrl/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public final class Constants {
/**
* Ein leerer String.
* <p>
* <em>Hinweis</em>: Der Test mit {@code equals()} auf den Leerstring ist
* sehr ineffektiv, deswegen sollte bis Java 6 besser geprüft werden ob
* <em>Hinweis</em>: Der Test mit {@code equals()} auf den Leerstring ist sehr
* ineffektiv, deswegen sollte bis Java 6 besser geprüft werden ob
* {@link String#length()} gleich 0 ist. Ab Java 6 kann für den Test auf den
* Leerstring {@link String#isEmpty()} verwendet werden.
*/
Expand Down
45 changes: 16 additions & 29 deletions src/main/java/com/bitctrl/ReleaseInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public class ReleaseInfo {
/**
* Erzeugt eine Versionsnummer.
*
* @param major
* das Major-Release.
* @param major das Major-Release.
*/
public ReleaseInfo(final int major) {
this.major = major;
Expand All @@ -60,10 +59,8 @@ public ReleaseInfo(final int major) {
/**
* Erzeugt eine Versionsnummer.
*
* @param major
* das Major-Release.
* @param minor
* das Minor-Release.
* @param major das Major-Release.
* @param minor das Minor-Release.
*/
public ReleaseInfo(final int major, final int minor) {
this.major = major;
Expand All @@ -75,12 +72,9 @@ public ReleaseInfo(final int major, final int minor) {
/**
* Erzeugt eine Versionsnummer.
*
* @param major
* das Major-Release.
* @param minor
* das Minor-Release.
* @param patchLevel
* der Patch-Level.
* @param major das Major-Release.
* @param minor das Minor-Release.
* @param patchLevel der Patch-Level.
*/
public ReleaseInfo(final int major, final int minor, final int patchLevel) {
this.major = major;
Expand All @@ -92,17 +86,12 @@ public ReleaseInfo(final int major, final int minor, final int patchLevel) {
/**
* Erzeugt eine Versionsnummer.
*
* @param major
* das Major-Release.
* @param minor
* das Minor-Release.
* @param patchLevel
* der Patch-Level.
* @param buildNumber
* die Build-Number.
* @param major das Major-Release.
* @param minor das Minor-Release.
* @param patchLevel der Patch-Level.
* @param buildNumber die Build-Number.
*/
public ReleaseInfo(final int major, final int minor, final int patchLevel,
final int buildNumber) {
public ReleaseInfo(final int major, final int minor, final int patchLevel, final int buildNumber) {
this.major = major;
this.minor = minor;
this.patchLevel = patchLevel;
Expand All @@ -112,8 +101,7 @@ public ReleaseInfo(final int major, final int minor, final int patchLevel,
/**
* Erzeugt eine Versionsnummer.
*
* @param release
* ein String, der die Versionsnummer enthält.
* @param release ein String, der die Versionsnummer enthält.
*/
public ReleaseInfo(final String release) {
if (Pattern.matches(PATTERN, release)) {
Expand Down Expand Up @@ -156,8 +144,7 @@ public ReleaseInfo(final String release) {
}
buildNumber = Integer.valueOf(release.substring(start));
} else {
throw new IllegalArgumentException(
"Release muss dem Muster 1[.4[.2[-15]]] entsprechen.");
throw new IllegalArgumentException("Release muss dem Muster 1[.4[.2[-15]]] entsprechen.");
}
}

Expand Down Expand Up @@ -198,9 +185,9 @@ public Integer getPatchLevel() {
}

/**
* Gibt das Release für den Menschen lesbar zurück. Teile die nicht
* angegeben sind, werden nicht ausgegeben. Fehlt z.&nbsp;B. die Build
* Number wird diese auch nicht berücksichtigt.
* Gibt das Release für den Menschen lesbar zurück. Teile die nicht angegeben
* sind, werden nicht ausgegeben. Fehlt z.&nbsp;B. die Build Number wird diese
* auch nicht berücksichtigt.
*
* @return ein Text nach dem Muster 1[.4[.2[-15]]].
*/
Expand Down
Loading