Skip to content

Commit

Permalink
Merge pull request #3 from codecentric/codecentric-refactoring
Browse files Browse the repository at this point in the history
prepared release 2.1.0-beta3
  • Loading branch information
danielkocot committed Apr 23, 2021
2 parents 59f2f73 + 882b4ee commit cebd6e4
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 158 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
server-id: github
server-username: GITHUB_USER_REF
server-password: GITHUB_TOKEN_REF

- name: Build with Maven
run: mvn -B install --no-transfer-progress --file pom.xml
env:
GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }}
GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
21 changes: 21 additions & 0 deletions .github/workflows/publish_to_github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish packages to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: github
server-username: GITHUB_USER_REF
server-password: GITHUB_TOKEN_REF
- name: Publish package
run: mvn --batch-mode deploy -DskipTests
env:
GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }}
GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
56 changes: 0 additions & 56 deletions .github/workflows/release-to-maven-central.yml

This file was deleted.

129 changes: 27 additions & 102 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>de.codecentric.reedelk</groupId>
<artifactId>module-parent</artifactId>
<version>2.0.0</version>
<version>2.1.0-beta3</version>
</parent>

<packaging>bundle</packaging>
<version>2.0.0</version>
<version>2.1.0-beta3</version>
<artifactId>module-mail</artifactId>

<properties>
Expand All @@ -23,15 +23,32 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.5.2</junit.version>
<jacoco.version>0.8.2</jacoco.version>
<!-- Maven Central Release tools -->
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
</properties>

<pluginRepositories>
<pluginRepository>
<id>github</id>
<name>Reedelk Runtime Packages</name>
<url>https://maven.pkg.github.com/codecentric/reedelk-runtime</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>github</id>
<name>Reedelk Runtime Packages</name>
<url>https://maven.pkg.github.com/codecentric/reedelk-runtime</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/codecentric/reedelk-module-mail</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -133,96 +150,4 @@
</plugin>
</plugins>
</build>
<profiles>
<!-- plugins needed to deploy to Maven Central -->
<profile>
<id>central-deploy</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- This is necessary for gpg to not try to use the pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-maven-plugin.version}</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>oss.sonatype.org</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<description>${project.version}</description>
</configuration>
<executions>
<execution>
<id>deploy-to-sonatype</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
<goal>release</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit cebd6e4

Please sign in to comment.