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

Many warnings for projects from reactor during Maven/Tycho build #199

Open
dhendriks opened this issue Dec 23, 2022 · 10 comments
Open

Many warnings for projects from reactor during Maven/Tycho build #199

dhendriks opened this issue Dec 23, 2022 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@dhendriks
Copy link

dhendriks commented Dec 23, 2022

When running a Maven/Tycho build with the Dash license tool enabled, I get the following output:

[INFO] --- tycho-p2-plugin:2.7.1:p2-metadata (attach-p2-metadata) @ org.eclipse.escet.root ---
[WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
[WARNING] o org.eclipse.escet:org.eclipse.escet.common.emf.ecore.xmi:jar:0.8.0-SNAPSHOT (compile)
[WARNING] Try running the build up to the lifecycle phase "package"
... 1478 similar warning lines omitted ...
[INFO] 
[INFO] --- license-tool-plugin:0.0.1-SNAPSHOT:license-check (default) @ org.eclipse.escet.root ---
[INFO] Querying Eclipse Foundation for license data for 279 items.
[INFO] Found 272 items.
[INFO] Querying ClearlyDefined for license data for 6 items.
[INFO] Found 6 items.
[INFO] Vetted license information was found for all content. No further investigation is required.
[INFO] Summary file was written to: <anonymized-local-path>\git\escet\DEPENDENCIES.generated.txt

The warning lines all concern projects from the reactor. There are 1481 warning lines in total, which is quite a lot, and pollutes the build log. By disabling the Dash license check tool, the warnings disappear.

I don't know how the Dash license tool works internally, but it seems it should handle projects being built in the reactor in a different way from other dependencies?

I tried to remedy this by adding the following to my pom.xml as part of the Dash license check tool configuration:

<excludeGroupIds>org.eclipse.escet</excludeGroupIds>

I would have expected these dependencies to be excluded. They are indeed excluded from checking/reporting, but it seems they are still first queried, and only excluded later on?

@dhendriks
Copy link
Author

@waynebeaton Do you have any idea when this can be looked at?

@waynebeaton
Copy link
Member

The Dash License Tool just uses the standard Maven Reactor.

It looks like these warnings are all coming from Tycho.

It's not an option that is turned on explicitly by the Dash License Tool's mojo, so I don't offhand know how to turn it off.

I will investigate, but don't have a time frame for resolution. What repository are you running this against?

Have you tried playing with the logging levels?

@dhendriks
Copy link
Author

I will investigate, but don't have a time frame for resolution. What repository are you running this against?

I'm running it for Eclipse ESCET. See https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/454. Or https://ci.eclipse.org/escet/job/Eclipse%20ESCET%20dependencies%20license%20check/job/develop/.

Have you tried playing with the logging levels?

I executed the Eclipse ESCET build from the branch of the above merge request, with -e -X, and captured the output, for:

  • Running with the Dash license tool plugin configured.
  • Running with the configuration for the Dash license tool plugin removed from pom.xml.

In both cases, I truncated the resulting command line output after the relevant part of the log has past. I then produced a diff/patch:

with-vs-without-dash-license-plugin.patch

Note how in the 2nd run the Dash license tool output is gone, but so are the many warnings. And the only change is removing the configuration for the Dash license tool plugin from pom.xml. So, clearly the Dash license tool plugin is somehow causing the extra warnings.

@dhendriks
Copy link
Author

@waynebeaton I still think the Dash license check tool plugin is causing the extra warnings, as per my previous comment.

@waynebeaton waynebeaton added the help wanted Extra attention is needed label Mar 12, 2023
@waynebeaton
Copy link
Member

I've done a little reading and a couple of local experiments and it seems that changing from requiresDependencyResolution to requiresDependencyCollection in the Mojo annotation removes the warnings. I want to test it on a few more repositories before I push a change.

@Mojo(name = "license-check", requiresProject = true, aggregator = true, requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)

@dhendriks
Copy link
Author

Hi @waynebeaton. That sounds promising! Did you have time to do the additional testing yet?

@waynebeaton
Copy link
Member

I just pushed the update. It will be included in the next build (sometime later today).

@dhendriks
Copy link
Author

It works. Thanks!

@waynebeaton
Copy link
Member

This change broke some builds (see #232). I've reverted the change and am reopening this.

@waynebeaton waynebeaton reopened this Apr 28, 2023
@dhendriks
Copy link
Author

@waynebeaton Will a new solution become available at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants