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

Support metadata when dependency is any other dependency type than jar #431

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

AlbGarciam
Copy link
Contributor

The plugin is currently limiting the metadata generation to the scenario where the artifact is a jar. However maven can support different types that support licensing such as zip

@AlbGarciam AlbGarciam changed the title Support metadata when dependency is any other type Support metadata when dependency is any other dependency type Nov 16, 2023
@hboutemy
Copy link
Contributor

hboutemy commented Dec 7, 2023

can you provide a concrete example, please?

@AlbGarciam
Copy link
Contributor Author

@hboutemy We're currently using internal assets so I'm not able to share it with you. But, according to the official doc (https://maven.apache.org/pom.html#licenses), there's no limitation based on the type to declare the license inside of pom.xml.

@hboutemy
Copy link
Contributor

we'll need a test showing the change on test project (and avoid regression in the future)

@hboutemy hboutemy changed the title Support metadata when dependency is any other dependency type Support metadata when dependency is any other dependency type than jar Dec 15, 2023
@AlbGarciam
Copy link
Contributor Author

@hboutemy I've got one public dependency with zip packaging and license
https://central.sonatype.com/artifact/com.ibm.websphere.appserver.features/wlp-nd-license

I don't really know how to add the test and the structure as I'm trying to create a pom within assets but as soon as I add zip it starts failing the install

Do you have any guide on how to contribute to the tests?

@hboutemy
Copy link
Contributor

hboutemy commented Jan 15, 2024

researching when/why this "limit to jar" feature was introduced, I found that it was done as a fix to #9
so not really a wish to limit the scope, but code was at that time failing getting effective pom for some dependency type: the algorithm completely changed since that time
I'll merge this PR and add some non-jar dependencies in a few tests to see that it does not cause any failure

@hboutemy hboutemy merged commit 46837cd into CycloneDX:master Jan 16, 2024
4 checks passed
hboutemy added a commit that referenced this pull request Jan 16, 2024
hboutemy added a commit that referenced this pull request Jan 16, 2024
hboutemy added a commit that referenced this pull request Jan 16, 2024
@AlbGarciam AlbGarciam deleted the patch-1 branch January 17, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants