Skip to content

Commit a982903

Browse files
committed
Use profiles to limit modules in deploy stage
1 parent d9c6821 commit a982903

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

.github/workflows/build_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
5252
- name: Publish package
5353
run: |
54-
./mvnw -B verify nexus-staging:deploy -P deploy && \
55-
./mvnw -B nexus-staging:release -P deploy
54+
./mvnw -B verify nexus-staging:deploy -P deploy,!allmodules,mainmodule -DskipTests && \
55+
./mvnw -B nexus-staging:release -P deploy,!allmodules,mainmodule
5656
env:
5757
OPENSOURCE_PROJECTS_KS_PW: ${{ secrets.KEYSTORE_PASSWORD }}
5858
OPENSOURCE_PROJECTS_KEY_PW: ${{ secrets.KEYSTORE_KEY_PASSWORD }}

pom.xml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,32 @@
2020
<name>bcrypt-parent</name>
2121
<description>Parent Maven project for Bcrypt</description>
2222

23-
<modules>
24-
<module>modules/bcrypt</module>
25-
<module>modules/bcrypt-cli</module>
26-
<module>modules/benchmark-jmh</module>
27-
</modules>
23+
<!-- this is a workaround to be able to only deploy the main module used in deploy phase, nexus stage plugin is buggy -->
24+
<profiles>
25+
<profile>
26+
<id>allmodules</id>
27+
<activation>
28+
<activeByDefault>true</activeByDefault>
29+
</activation>
30+
<modules>
31+
<module>modules/bcrypt</module>
32+
<module>modules/bcrypt-cli</module>
33+
<module>modules/benchmark-jmh</module>
34+
</modules>
35+
</profile>
36+
<profile>
37+
<id>mainmodule</id>
38+
<modules>
39+
<module>modules/bcrypt</module>
40+
</modules>
41+
</profile>
42+
</profiles>
2843

2944
<properties>
3045
<project.jbcryptVersion>0.4</project.jbcryptVersion>
3146
<project.bcVersion>1.70</project.bcVersion>
3247
<!-- set this to true if fail because of missing credentials -->
33-
<commonConfig.jarSign.skip>false</commonConfig.jarSign.skip>
48+
<commonConfig.jarSign.skip>true</commonConfig.jarSign.skip>
3449
</properties>
3550

3651
<build>

0 commit comments

Comments
 (0)