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

Self-reference in Maven POM #786

Open
cpuzicha opened this issue Feb 29, 2024 · 1 comment
Open

Self-reference in Maven POM #786

cpuzicha opened this issue Feb 29, 2024 · 1 comment
Labels
bug Create a report to help us improve

Comments

@cpuzicha
Copy link

Describe the bug
Maven POM contains a self reference:

<groupId>org.jfrog.buildinfo</groupId>
<artifactId>build-info-extractor</artifactId>
<version>2.41.14</version>
<name>build-info-extractor</name>
...
<dependency>
  <groupId>org.jfrog.buildinfo</groupId>
  <artifactId>build-info-extractor</artifactId>
  <version>2.41.14</version>
  <scope>compile</scope>
  <optional>true</optional>
</dependency>

Test in IntelliJ IDEA with this as a dependency show the following error message (though there seems to be no actual problem)

Errors occurred while building effective model from /home/cp/.gradle/caches/modules-2/files-2.1/org.jfrog.buildinfo/build-info-extractor/2.41.12/d5ae695415585a1481144ab3d7a59b41af869883/build-info-extractor-2.41.12.pom:
'dependencies.dependency[org.jfrog.buildinfo:build-info-extractor:2.41.12]' for org.jfrog.buildinfo:build-info-extractor:2.41.12 is referencing itself. in org.jfrog.buildinfo:build-info-extractor:2.41.12

To Reproduce
Look at https://repo1.maven.org/maven2/org/jfrog/buildinfo/build-info-extractor/2.41.14/build-info-extractor-2.41.14.pom

Expected behavior
No self reference.

Additional context
We have seen this behavior when using the Gradle Plugin 'test-fixtures'
gradle/gradle#14936

@cpuzicha cpuzicha added the bug Create a report to help us improve label Feb 29, 2024
@Sirmyself
Copy link

Sirmyself commented May 15, 2024

I had a similar issue and I was able to avoid the error by removing the dependency

<dependency>
    <groupId>org.jfrog.buildinfo</groupId>
    <artifactId>build-info-extractor</artifactId>
    <version>2.41.12</version>
    <scope>compile</scope>
    <optional>true</optional>
</dependency>

for the file mentioned in the error (in your case, /home/cp/.gradle/caches/modules-2/files-2.1/org.jfrog.buildinfo/build-info-extractor/2.41.12/d5ae695415585a1481144ab3d7a59b41af869883/build-info-extractor-2.41.12.pom)

I'm not sure it's the right solution, but my app seems to be running fine right now and I don't see the error anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

2 participants