Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applyMavenCentralRules does not work for multi module project #1117

Closed
4 tasks done
jagodevreede opened this issue Dec 18, 2022 · 1 comment
Closed
4 tasks done

applyMavenCentralRules does not work for multi module project #1117

jagodevreede opened this issue Dec 18, 2022 · 1 comment
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@jagodevreede
Copy link

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem (link to git repository is ideal)
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. checkout project at https://github.com/jagodevreede/jreleaser-reproducer/tree/applyMavenCentralRules
  2. run mvn -Ppublication deploy -DaltDeploymentRepository=local::file:./target/staging-deploy as per example: https://jreleaser.org/guide/latest/examples/maven/staging-artifacts.html
  3. run jreleaser full-release --dry-run

Expected Behaviour

Deploying to maven-central should succeed, like when the property applyMavenCentralRules is set to false.

Actual Behaviour

Log:

[INFO]  JReleaser 1.3.1
[INFO]  Configuring with jreleaser.yml
[INFO]    - basedir set to /Users/jagodevreede/git/jreleaser-reproducer
[INFO]  Reading configuration
[INFO]  Loading variables from /Users/jagodevreede/.jreleaser/config.properties
[INFO]  Validating configuration
[INFO]  Project version set to 0.0.1
[INFO]  Release is not snapshot
[INFO]  Timestamp is 2022-12-18T20:13:21.775897+01:00
[INFO]  HEAD is at 7ebace2
[INFO]  Platform is osx-x86_64
[INFO]  dry-run set to true
[INFO]  Generating changelog
[INFO]  Storing changelog: out/jreleaser/release/CHANGELOG.md
[INFO]  Calculating checksums
[INFO]    [checksum] No files configured for checksum. Skipping
[INFO]  Signing files
[INFO]    [sign] No files configured for signing. Skipping
[INFO]  Deploying all staged artifacts
[INFO]    [nexus2] Deploying to maven-central
[ERROR]   [nexus2] jreleaser-reproducer-0.0.1-sources.jar is missing
[ERROR]   [nexus2] jreleaser-reproducer-0.0.1-javadoc.jar is missing
[INFO]  Writing output properties to out/jreleaser/output.properties
[ERROR] JReleaser failed after 2,329 s
Rules for publishing to Maven Central were not met

Environment Information

  • Operating System: OSX
  • JReleaser Version: 1.3.1
  • JDK Version: openjdk 17.0.4

Please paste stacktraces from [out|build|target]/jreleaser/trace.log.

org.jreleaser.model.JReleaserException: Rules for publishing to Maven Central were not met
	at org.jreleaser.sdk.commons.AbstractMavenDeployer.collectDeployables(AbstractMavenDeployer.java:116)
	at org.jreleaser.sdk.nexus2.Nexus2MavenDeployer.deploy(Nexus2MavenDeployer.java:54)
	at org.jreleaser.engine.deploy.maven.ProjectMavenDeployer.deploy(ProjectMavenDeployer.java:55)
	at org.jreleaser.engine.deploy.maven.MavenDeployers.deploy(MavenDeployers.java:124)
	at org.jreleaser.engine.deploy.maven.MavenDeployers.deploy(MavenDeployers.java:111)
	at org.jreleaser.workflow.DeployWorkflowItem.doInvoke(DeployWorkflowItem.java:35)
	at org.jreleaser.workflow.AbstractWorkflowItem.lambda$invoke$0(AbstractWorkflowItem.java:43)
	at org.jreleaser.engine.hooks.CommandHookExecutor.execute(CommandHookExecutor.java:52)
	at org.jreleaser.workflow.AbstractWorkflowItem.invoke(AbstractWorkflowItem.java:43)
	at org.jreleaser.workflow.WorkflowImpl.execute(WorkflowImpl.java:102)
	at org.jreleaser.cli.FullRelease.doExecute(FullRelease.java:180)
	at org.jreleaser.cli.AbstractModelCommand.execute(AbstractModelCommand.java:82)
	at org.jreleaser.cli.AbstractCommand.call(AbstractCommand.java:36)
	at org.jreleaser.cli.AbstractModelCommand.call(AbstractModelCommand.java:48)
	at org.jreleaser.cli.AbstractCommand.call(AbstractCommand.java:29)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at org.jreleaser.cli.Main.execute(Main.java:72)
	at org.jreleaser.cli.Main.run(Main.java:57)
	at org.jreleaser.cli.Main.main(Main.java:48)

Maybe this issue is for the pom checker?

@jagodevreede jagodevreede added the bug Something isn't working label Dec 18, 2022
@aalmiray aalmiray self-assigned this Dec 18, 2022
@aalmiray aalmiray added the duplicate This issue or pull request already exists label Dec 18, 2022
@aalmiray
Copy link
Member

Thank you for the report and the reproducer! I was able to verify the fix we applied for #1031 is working as expected.

$ jreleaser deploy --dry-run
[INFO]  JReleaser 1.4.0-SNAPSHOT
[INFO]  Configuring with jreleaser.yml
[INFO]    - basedir set to /private/tmp/jreleaser-reproducer
[INFO]    - outputdir set to /private/tmp/jreleaser-reproducer/out/jreleaser
[INFO]  Reading configuration
[INFO]  git-root-search set to false
[INFO]  Loading variables from /Users/aalmiray/.jreleaser/config.toml
[INFO]  Validating configuration
[INFO]  Strict mode set to false
[INFO]  Project version set to 0.0.1
[INFO]  Release is not snapshot
[INFO]  Timestamp is 2022-12-18T14:56:35.934257-06:00
[INFO]  HEAD is at 7ebace2
[INFO]  Platform is osx-x86_64
[INFO]  dry-run set to true
[INFO]  Deploying all staged artifacts
[INFO]    [nexus2] Deploying to maven-central
[INFO]    [sign] target/staging-deploy/io/github/jagodevreede/module-a/0.0.1/module-a-0.0.1.jar
[INFO]    [sign] target/staging-deploy/io/github/jagodevreede/module-a/0.0.1/module-a-0.0.1-javadoc.jar
[INFO]    [sign] target/staging-deploy/io/github/jagodevreede/jreleaser-reproducer/0.0.1/jreleaser-reproducer-0.0.1.pom
[INFO]    [sign] target/staging-deploy/io/github/jagodevreede/module-a/0.0.1/module-a-0.0.1-sources.jar
[INFO]    [sign] target/staging-deploy/io/github/jagodevreede/module-a/0.0.1/module-a-0.0.1.pom
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom.asc
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom.md5
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom.sha1
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom.sha256
[INFO]    [nexus2]  - jreleaser-reproducer-0.0.1.pom.sha512
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar.asc
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar.md5
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar.sha1
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar.sha256
[INFO]    [nexus2]  - module-a-0.0.1-javadoc.jar.sha512
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar.asc
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar.md5
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar.sha1
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar.sha256
[INFO]    [nexus2]  - module-a-0.0.1-sources.jar.sha512
[INFO]    [nexus2]  - module-a-0.0.1.jar
[INFO]    [nexus2]  - module-a-0.0.1.jar.asc
[INFO]    [nexus2]  - module-a-0.0.1.jar.md5
[INFO]    [nexus2]  - module-a-0.0.1.jar.sha1
[INFO]    [nexus2]  - module-a-0.0.1.jar.sha256
[INFO]    [nexus2]  - module-a-0.0.1.jar.sha512
[INFO]    [nexus2]  - module-a-0.0.1.pom
[INFO]    [nexus2]  - module-a-0.0.1.pom.asc
[INFO]    [nexus2]  - module-a-0.0.1.pom.md5
[INFO]    [nexus2]  - module-a-0.0.1.pom.sha1
[INFO]    [nexus2]  - module-a-0.0.1.pom.sha256
[INFO]    [nexus2]  - module-a-0.0.1.pom.sha512
[INFO]  Writing output properties to out/jreleaser/output.properties
[INFO]  JReleaser succeeded after 4.768 s

Closing as duplicate. The fix will be available in the next release 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants