Skip to content

CAY-2996 Move source and javadoc jar generation to a release profile - #651

Open
m-dzianishchyts wants to merge 2 commits into
apache:masterfrom
m-dzianishchyts:CAY-2996-release-artifacts-fix
Open

CAY-2996 Move source and javadoc jar generation to a release profile#651
m-dzianishchyts wants to merge 2 commits into
apache:masterfrom
m-dzianishchyts:CAY-2996-release-artifacts-fix

Conversation

@m-dzianishchyts

Copy link
Copy Markdown
Contributor

What does this PR do?

Moves source and Javadoc JAR generation into a dedicated release Maven profile.

Normal Maven builds now produce only the main and test artifacts. When the release profile is enabled, Maven also attaches -sources.jar and -javadoc.jar for publication.

Previously, source JAR generation was enabled for every Maven build, while Javadoc JAR generation was not configured as part of the Maven release artifact lifecycle.

After the change, the release guide at https://cayenne.apache.org/dev/release-guide.html should use the release profile:

 cd cayenne
 mvn release:clean
 mvn release:prepare -DpreparationGoals="clean install" -DautoVersionSubmodules=true
-mvn release:perform -P gpg [-Dgpg.keyname=B8AF90BF]
+mvn release:perform -P release,gpg [-Dgpg.keyname=B8AF90BF]

Testing

Verified that:

mvn clean install -DskipTests

does not generate or install source or Javadoc JARs.

Verified that:

mvn clean install -Prelease -DskipTests

generates and installs:

*-sources.jar
*-javadoc.jar

@andrus

andrus commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Since we are introducing a new release profile, perhaps the existing gpg should be merged into it?

@m-dzianishchyts

Copy link
Copy Markdown
Contributor Author

Since we are introducing a new release profile, perhaps the existing gpg should be merged into it?

Good call, merged them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants