Payara icon indicating copy to clipboard operation
Payara copied to clipboard

Bug Report: Payara 6.2023.7: For artifact {io.opentracing:opentracing-api:null:jar}: The version cannot be empty. / FISH-7641

Open pioneer2k opened this issue 2 years ago • 4 comments

Brief Summary

We are using the Payara API (payara-bom) and the maven-project-info-reports-plugin in our Maven project. Since Payara version 6.2023.7 the plugin is complaning about the dependency "io.opentracing:opentracing-api" because the version is missing.

When i look at the payara-bom something has changed between 6.2023.6 and 6.2023.7. With 6.2023.6 is looks like this:

<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
<version>${opentracing.version}</version>
<scope>provided</scope>
</dependency>

and with 6.2023.7 it looks like this:

<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
<scope>provided</scope>
</dependency>

Expected Outcome

no error message

Current Outcome

Error message: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project gum: Error generating maven-project-info-reports-plugin:3.4.5:dependency-management report: For artifact {io.opentracing:opentracing-api:null:jar}: The version cannot be empty.

Reproducer

see the hints above regarding the paraya-bom

Operating System

Ubuntu 22.04.2

JDK Version

zulu-openjdk-alpine:17.0.7-jre-headless

Payara Distribution

Payara Micro

pioneer2k avatar Jul 13 '23 13:07 pioneer2k

I bumped into the same thing, found the same clues in the new version of the payara-bom. My wild guess, based on when I've seen this happen before, maybe the version is intended to be defined in a dependencyManagement section which isn't propagated to the bom generation?

I'm not sure the site plugin has an option to disregard unresolvable versions so it looks like we have to disable site generation for now.

phillipross avatar Jul 13 '23 19:07 phillipross

Update: I found the site plugin is happy if I specify the dependency version in the dependency manager section of my project (even though I DO NOT have an explicit dependency defined for the artifact). This workaround works for me since my case is simple, but I realize it's not a universal workaround to actually fixing it in the bom itself.

After reading release notes closer, I realize there are some changes in 5.2023.7 around bom generation, so I imagine this is just an edge case that wasn't tested in that rework effort.

phillipross avatar Jul 13 '23 19:07 phillipross

Thanks for the workaround, which is working for me as well!

pioneer2k avatar Jul 14 '23 06:07 pioneer2k

I'm going to take a guess that this is something I broke 🤔 In the latest release there was some work done with the dependency management and the BOMs: https://github.com/payara/Payara/pull/6320

I must have overlooked that my changes to the flatten plugin config seems to mean that this doesn't get expanded out here...

Pandrex247 avatar Jul 18 '23 16:07 Pandrex247