Skip to content

Commit

Permalink
#1110 Set up staging from root module, remove redundant 'all' profile
Browse files Browse the repository at this point in the history
  • Loading branch information
GuusLieben committed Aug 1, 2024
1 parent 157d47d commit 5cf1072
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
java-version: 21
distribution: temurin
- name: "Build (source JDK)"
run: mvn clean install -DskipTests -P ci,all
run: mvn clean install -DskipTests -P ci
2 changes: 1 addition & 1 deletion .github/workflows/check.codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
java-version: 21
distribution: temurin
- name: Check code style
run: mvn clean install -DskipTests -P ci,all -Dcheckstyle.skip=false
run: mvn clean install -DskipTests -P ci -Dcheckstyle.skip=false
4 changes: 2 additions & 2 deletions .github/workflows/check.dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
java-version: 21
distribution: temurin
- name: Prepare for dependency check
run: mvn clean install -DskipTests -P ci,all
run: mvn clean install -DskipTests -P ci
- name: Analyze dependencies
run: mvn dependency-check:check -Dowasp.skip=false -DnvdApiKey=${{ secrets.NVD_API_KEY }} -P ci,all
run: mvn dependency-check:check -Dowasp.skip=false -DnvdApiKey=${{ secrets.NVD_API_KEY }} -P ci
- name: Archive dependency reports
uses: actions/upload-artifact@v2
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
java-version: 21
distribution: temurin
- name: Check license headers
run: mvn license:check -P ci,all
run: mvn license:check -P ci
4 changes: 2 additions & 2 deletions .github/workflows/test.coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
distribution: temurin
- name: Run tests
id: test
run: "mvn clean verify -P ci,all -Djacoco.haltOnFailure=true"
run: "mvn clean verify -P ci -Djacoco.haltOnFailure=true"
testSourceCompat:
needs: [coverage]
strategy:
Expand All @@ -32,5 +32,5 @@ jobs:
java-version: 21
distribution: temurin
- name: "Unit testing (OS: ${{ matrix.os }}, source JDK)"
run: "mvn clean verify -P ci,all -Djacoco.haltOnFailure=true"
run: "mvn clean verify -P ci -Djacoco.haltOnFailure=true"
shell: bash
4 changes: 2 additions & 2 deletions hartshorn-assembly/parent/pom.parent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

<parent>
<groupId>org.dockbox.hartshorn</groupId>
<artifactId>hartshorn-staging</artifactId>
<artifactId>hartshorn</artifactId>
<version>${revision}</version>
<relativePath>../pom.staging.xml</relativePath>
<relativePath>../../pom.xml</relativePath>
</parent>

<name>Hartshorn parent</name>
Expand Down
86 changes: 0 additions & 86 deletions hartshorn-assembly/pom.staging.xml

This file was deleted.

4 changes: 2 additions & 2 deletions hartshorn-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

<parent>
<groupId>org.dockbox.hartshorn</groupId>
<artifactId>hartshorn-staging</artifactId>
<artifactId>hartshorn</artifactId>
<version>${revision}</version>
<relativePath>../hartshorn-assembly/pom.staging.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>

<name>Hartshorn common BOM</name>
Expand Down
98 changes: 68 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<properties>
<!-- Project version, inherited by all submodules -->
<revision>0.6.0</revision>
<revision>0.6.1</revision>
<hartshorn.version>${revision}</hartshorn.version>

<!-- Project properties, inherited by all submodules -->
Expand Down Expand Up @@ -90,32 +90,25 @@
<plugin.staging.version>1.7.0</plugin.staging.version>
</properties>

<profiles>
<profile>
<id>all</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>hartshorn-bom</module>
<module>hartshorn-assembly/parent/pom.parent.xml</module>
<module>hartshorn-util</module>
<module>hartshorn-spi</module>
<module>hartshorn-proxy</module>
<module>hartshorn-proxy-javassist</module>
<module>hartshorn-introspect</module>
<module>hartshorn-introspect-reflection</module>
<module>hartshorn-core</module>
<module>hartshorn-reporting</module>
<module>hartshorn-hsl</module>
<module>hartshorn-config</module>
<module>hartshorn-config-jackson</module>
<module>hartshorn-i18n</module>
<module>hartshorn-assembly/pom.assembly.xml</module>
</modules>

<modules>
<module>hartshorn-assembly/pom.staging.xml</module>
<module>hartshorn-bom</module>
<module>hartshorn-assembly/parent/pom.parent.xml</module>
<module>hartshorn-util</module>
<module>hartshorn-spi</module>
<module>hartshorn-proxy</module>
<module>hartshorn-proxy-javassist</module>
<module>hartshorn-introspect</module>
<module>hartshorn-introspect-reflection</module>
<module>hartshorn-core</module>
<module>hartshorn-reporting</module>
<module>hartshorn-hsl</module>
<module>hartshorn-config</module>
<module>hartshorn-config-jackson</module>
<module>hartshorn-i18n</module>
<module>hartshorn-assembly/pom.assembly.xml</module>
</modules>
</profile>
<profiles>
<profile>
<!-- CI profile, so we can opt-in to goals, instead of having to opt-out -->
<id>ci</id>
Expand All @@ -129,9 +122,58 @@
</profile>
<profile>
<id>staging</id>
<activation>
<property>
<name>staging</name>
<value>true</value>
</property>
</activation>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>OSSRH Staging</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<layout>default</layout>
<uniqueVersion>false</uniqueVersion>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<!-- Distribution staging -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand Down Expand Up @@ -377,10 +419,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<!-- Skip root pom, re-enabled in hartshorn-assembly/pom.staging.xml -->
<skip>true</skip>
</configuration>
</plugin>

<!-- Dependency version upgrades -->
Expand Down

0 comments on commit 5cf1072

Please sign in to comment.