Closed hboutemy closed 3 years ago
Thank you Hervé for this PR.
I tried to deploy a QuickPerf snapshot version with these modifications.
To do this, I executed mvn clean deploy -Prelease
.
The Maven plugins used for the release are contained in a release profile.
I got this error during deployment: ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project quick-perf-sql-memory-test: The project artifact has not been assembled yet. Please do not invoke this goal before the lifecycle phase "package".-> [Help 1]
The reactor summary:
[INFO] Reactor Summary for quick-perf 1.0-SNAPSHOT:
[INFO]
[INFO] quick-perf ......................................... SUCCESS [ 25.627 s]
[INFO] quick-perf-core .................................... SUCCESS [ 11.538 s]
[INFO] quick-perf-jvm-parent .............................. SUCCESS [ 0.387 s]
[INFO] quick-perf-jvm-core ................................ SUCCESS [ 7.169 s]
[INFO] quick-perf-jvm-annotations ......................... SUCCESS [ 12.604 s]
[INFO] quick-perf-jfr-annotations ......................... SUCCESS [ 11.052 s]
[INFO] quick-perf-sql-parent .............................. SUCCESS [ 0.356 s]
[INFO] quick-perf-sql-annotations ......................... SUCCESS [ 9.610 s]
[INFO] quick-perf-sql-memory-test-util .................... SUCCESS [ 0.950 s]
[INFO] quick-perf-sql-hibernate-test-util ................. SUCCESS [ 1.712 s]
[INFO] quick-perf-junit4-parent ........................... SUCCESS [ 0.286 s]
[INFO] quick-perf-junit4 .................................. SUCCESS [ 7.851 s]
[INFO] quick-perf-sql-memory-test ......................... FAILURE [ 17.271 s]
[INFO] quick-perf-junit4-5-jvm-test ....................... SKIPPED
[INFO] quick-perf-junit4-12-jvm-test ...................... SKIPPED
[INFO] quick-perf-junit4-13-jvm-test ...................... SKIPPED
[INFO] quick-perf-junit4-13-1-jvm-test .................... SKIPPED
[INFO] quick-perf-junit4-sql-test ......................... SKIPPED
[INFO] quick-perf-junit5-parent ........................... SKIPPED
[INFO] quick-perf-junit5-test-util ........................ SKIPPED
[INFO] quick-perf-junit5 .................................. SKIPPED
[INFO] quick-perf-junit5-jvm-test ......................... SKIPPED
[INFO] quick-perf-junit5-sql-test ......................... SKIPPED
[INFO] quick-perf-testng-parent ........................... SKIPPED
[INFO] quick-perf-testng-test-util ........................ SKIPPED
[INFO] quick-perf-testng .................................. SKIPPED
[INFO] quick-perf-testng-sql-test ......................... SKIPPED
[INFO] quick-perf-testng-jvm-test ......................... SKIPPED
[INFO] quick-perf-spring .................................. SKIPPED
[INFO] quick-perf-sql-spring4 ............................. SKIPPED
[INFO] quick-perf-sql-spring5 ............................. SKIPPED
[INFO] quick-perf-junit4-spring-base-tests ................ SKIPPED
[INFO] quick-perf-junit4-spring3 .......................... SKIPPED
[INFO] quick-perf-junit4-spring4 .......................... SKIPPED
[INFO] quick-perf-junit4-spring5 .......................... SKIPPED
[INFO] quick-perf-springboot1-starter ..................... SKIPPED
[INFO] quick-perf-springboot2-starter ..................... SKIPPED
[INFO] quick-perf-junit4-spring-boot-test ................. SKIPPED
[INFO] quick-perf-bom ..................................... SKIPPED
Ideally, the plugins needed for the release should only be executed for the artifacts to deploy.
Do you have an idea how to simply do this (without disabling one by one these plugins in the modules that have not to be deployed)?
ok I see: your way to manage test Maven modules, that do not create any main artifact but only tests.jar
causes many issues.
It already costs you one workaround in each Maven module, either in the form of
<jar.skipIfEmpty>true</jar.skipIfEmpty>
or
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
This whole structure should be reworked: but not now, given you're near 1.0 release
I added a commit to simply skip gpg:
<gpg.skip>true</gpg.skip>
This brings the build one step further, but now, it's org.sonatype.plugins:nexus-staging-maven-plugin
that gets confused...
I'll need to dive a little bit deeper into this plugin to configure equivalent skip
ok, with the last skip of Nexus staging, I got mvn clean deploy -Prelease
working (of course without really staging at the end, because I don't have permissions)
Many thanks Hervé! 🙏
this will avoid build failures of release because pom version has not been updated and is still at 1.0-SNAPSHOT, while still avoiding deploying artifacts