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

Gradle Module Metadata for spring-integration-bom 5.4.7 missing from Maven Central #3570

Closed
fpavageau opened this issue May 26, 2021 · 3 comments · Fixed by #3571
Closed

Comments

@fpavageau
Copy link
Contributor

fpavageau commented May 26, 2021

In what version(s) of Spring Integration are you seeing this issue?

5.4.7 (also present in 5.5.0)

Describe the bug

spring-integration-bom-5.4.7.pom was generated with the following comment

<!-- This module was also published with a richer model, Gradle metadata,  -->
<!-- which should be used instead. Do not delete the following line which  -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->

which triggers the download by Gradle of the spring-integration-bom-5.4.7.module artifact, however that artifact was not published to Maven Central. This is probably a consequence of an upgrade to Gradle 6.

This is a problem when using Artifactory as a Maven proxy, because by default Artifactory returns a 403 HTTP status code for missing artifacts, and Gradle only ignores an absent .module when the repository returns a 404 HTTP status code. In my case (and others, probably), that means my build fails when it cannot download spring-integration-bom-5.4.7.module. 😭

See

for similar issues in other projects that have bit me in the past (through spring-boot-dependencies).

Expected behavior

It would be good if either the module file was published on Maven Central, or the Gradle metadata generation was disabled.

@fpavageau fpavageau added status: waiting-for-triage The issue need to be evaluated and its future decided type: bug labels May 26, 2021
@artembilan artembilan added this to the 5.5.1 milestone May 26, 2021
@artembilan artembilan added backport 5.3.x in: build and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels May 26, 2021
@artembilan
Copy link
Member

Well, what I see the .module files are present when I install artifacts locally. For example this is a content for 5.5.0-SNAPSHOT:

{
  "formatVersion": "1.1",
  "component": {
    "group": "org.springframework.integration",
    "module": "spring-integration-bom",
    "version": "5.5.0-SNAPSHOT",
    "attributes": {
      "org.gradle.status": "integration"
    }
  },
  "createdBy": {
    "gradle": {
      "version": "6.8.2",
      "buildId": "64x7ex4b4jh3vomm7mg3j3kjqm"
    }
  },
...

And so on for all the modules we have in the project.
So, this is indeed not a Gradle or Artifactory.
Here is its presence in our, Spring repository: https://repo.spring.io/libs-release-local/org/springframework/integration/spring-integration-bom/5.5.0/spring-integration-bom-5.5.0.module.

The problem comes with Maven Central sync: it just does not allow to upload non-matching artifacts.

As long as we all rely on Maven Central and since all other projects just ignore those artifacts, we are going to disable such a feature the way you suggest.

Let me know if you can contribute the fix: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc

Thank you!

fpavageau added a commit to fpavageau/spring-integration that referenced this issue May 27, 2021
Fixes spring-projects#3570

The module file with the Gradle metadata cannot be published on Maven
Central, which causes issues for some people using a repository manager such
as Artifactory. If it doesn't return a 404 HTTP status, the build fails
instead of ignoring the module.
@fpavageau
Copy link
Contributor Author

There you go: #3571.

Should I create similar pull requests for the 5.4.x and 5.3.x branches?

@artembilan
Copy link
Member

Thanks.

No, you don't need. We will review shortly and just cherry-pick your commit to those supported branches!

artembilan pushed a commit that referenced this issue May 27, 2021
Fixes #3570

The module file with the Gradle metadata cannot be published on Maven
Central, which causes issues for some people using a repository manager such
as Artifactory. If it doesn't return a 404 HTTP status, the build fails
instead of ignoring the module.

**Cherry-pick to `5.4.x` & `5.3.x`**
artembilan pushed a commit that referenced this issue May 27, 2021
Fixes #3570

The module file with the Gradle metadata cannot be published on Maven
Central, which causes issues for some people using a repository manager such
as Artifactory. If it doesn't return a 404 HTTP status, the build fails
instead of ignoring the module.

**Cherry-pick to `5.4.x` & `5.3.x`**
artembilan pushed a commit that referenced this issue May 27, 2021
Fixes #3570

The module file with the Gradle metadata cannot be published on Maven
Central, which causes issues for some people using a repository manager such
as Artifactory. If it doesn't return a 404 HTTP status, the build fails
instead of ignoring the module.

**Cherry-pick to `5.4.x` & `5.3.x`**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants