build(release): attach sources, javadoc and signatures to the release build - #21
Merged
Conversation
… build
The 2.4.11 deployment was rejected by the Central Portal:
Sources must be provided but not found in entries
Javadocs must be provided but not found in entries
Missing signature for file: yuicompressor-2.4.11.pom
Missing signature for file: yuicompressor-2.4.11.jar
Only the jar and the POM were uploaded, for two independent reasons.
Signing moved into the `release` profile in #17, but nothing activates that
profile: release:perform runs its forked deploy build without it, because the
POM never configured <releaseProfiles>.
The POM has also never declared maven-source-plugin, and maven-javadoc-plugin
carries no `jar` execution. Those artifacts used to come from the super POM's
implicit release-profile, which is activated by performRelease=true;
maven-release-plugin 3.x defaults useReleaseProfile to false, so that property
is no longer passed and the profile no longer applies.
maven-release-plugin is now pinned at 3.3.1 with
<releaseProfiles>release</releaseProfiles>, and the release profile declares
maven-source-plugin and the attach-javadocs execution alongside the GPG
signing, so `mvn deploy -P release` and `mvn release:perform` both produce the
signed jar, sources, javadoc and POM.
Verified:
- `mvn clean verify -Prelease -DskipTests -Dgpg.skip=true` builds the jar, the
sources jar and the javadoc jar
- `help:effective-pom -Prelease` places source, javadoc and gpg in the active
build; without the profile all three stay inside the inactive profile, so
`mvn install` still succeeds unsigned, which is the behaviour #17 restored
- GPG signing itself was not exercised here: it was skipped to avoid a
passphrase prompt, so run `mvn clean verify -Prelease` once before releasing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 2.4.11 release failed at the publish step. Querying the Central Portal for the deployment returned:
Only the jar and the POM were uploaded. Two independent gaps in the POM caused it.
Signing never ran. #17 moved
maven-gpg-plugininto thereleaseprofile, but nothing activates that profile during a release:release:performruns its forked deploy build without it, because the POM never configured<releaseProfiles>.Sources and javadoc were never built. The POM has never declared
maven-source-plugin, andmaven-javadoc-plugincarries nojarexecution. Both used to be supplied by the super POM's implicitrelease-profile, which activates onperformRelease=true— andmaven-release-plugin3.x defaultsuseReleaseProfiletofalse, so that property is no longer passed.Changes Made
maven-release-pluginat 3.3.1 and configured<releaseProfiles>release</releaseProfiles>, sorelease:performpasses-Preleaseto the deploy build it forksmaven-source-plugin3.4.0 (attach-sources/jar-no-fork) to thereleaseprofileattach-javadocsexecution to thereleaseprofile; the plugin configuration itself still comes from the declaration in<build>CHANGELOG.mdTesting
mvn clean verify -Prelease -DskipTests -Dgpg.skip=true→ BUILD SUCCESS, producing the jar,-sources.jarand-javadoc.jarhelp:effective-pom -Preleaseputs source, javadoc and gpg in the active<build>help:effective-pomwithout the profile leaves all three inside the inactive profile, somvn installstill succeeds unsigned — the behaviour Sign artifacts only in the release profile #17 restoredmvn clean verify -Preleaseon a machine with the key before cutting the releaseBreaking Changes
None.
Additional Notes
mainhas been rolled back to the pre-release state with theyuicompressor-2.4.11tag removed, so the version can be reused as-is once this landsdocs/BUILDING.mdalready documentsmvn clean package -P releaseas producing "sources, javadoc, and signed JARs"; that statement is only now actually trueorg.codelibs.maven:yuicompressor-maven-pluginhas the sources half of the same problem and is fixed separately