Skip to content

Commit

Permalink
fix: build issue with single publish (#79)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <toddbaert@gmail.com>

Signed-off-by: Todd Baert <toddbaert@gmail.com>
  • Loading branch information
toddbaert authored Aug 30, 2022
1 parent ad1940d commit 9f9f897
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,18 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}

# Release Please has already incremented versions and published tags, so we just need to publish.
# Our maven config will only publish versions that do not already exist.
- name: Maven Verify Deploy
if: ${{ steps.release.outputs.releases_created }}
# The nexus-staging-maven-plugin doesn't follow maven conventions. It stages all the projects with the last submodule: https://help.sonatype.com/repomanager2/staging-releases/configuring-your-project-for-deployment
# This means there's no way to skip publishing of a particular module in a multi-module build, so we iterate over each module and publish them individually,
# letting exists-maven-plugin skip the nexus-staging-maven-plugin's entire deploy goal if the artifact exists.
run: |
mvn --batch-mode --settings release/m2-settings.xml verify deploy
mvn verify
modules=($(mvn help:evaluate -Dexpression=project.modules | grep -v "^\[" | grep -v "<\/*strings>" | sed 's/<\/*string>//g' | sed 's/[[:space:]]//'))
for module in "${modules[@]}"
do
mvn --batch-mode --projects $module --settings release/m2-settings.xml clean deploy
done
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
5 changes: 0 additions & 5 deletions hooks/open-telemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
</developer>
</developers>

<properties>
<!-- override no-deploy rule from parent -->
<maven.deploy.skip>false</maven.deploy.skip>
</properties>

<dependencies>
<!-- we inherent dev.openfeature.javasdk and the test dependencies from the parent pom -->
</dependencies>
Expand Down
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
</scm>

<properties>
<!-- skip deploy in parent (need to override this in submodules) -->
<maven.deploy.skip>true</maven.deploy.skip>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<junit.jupiter.version>5.8.1</junit.jupiter.version>
Expand Down Expand Up @@ -250,7 +248,7 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<phase>deploy</phase>
<goals>
<goal>sign</goal>
</goals>
Expand Down
5 changes: 0 additions & 5 deletions providers/flagd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
</developer>
</developers>

<properties>
<!-- override no-deploy rule from parent -->
<maven.deploy.skip>false</maven.deploy.skip>
</properties>

<dependencies>
<!-- we inherent dev.openfeature.javasdk and the test dependencies from the parent pom -->
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public FlagdProvider() {
}

/**
* A test method...
* A test method.
*
* @return {boolean}
*/
Expand Down

0 comments on commit 9f9f897

Please sign in to comment.