license-maven-plugin icon indicating copy to clipboard operation
license-maven-plugin copied to clipboard

The plugin performs artifact resolution first and then includedScopes.

Open Tibor17 opened this issue 6 years ago • 6 comments

We have includedScopes=compile, runtime. Nevertheless the plugin resolves test dependencies and should not.

Tibor17 avatar Jan 29 '19 12:01 Tibor17

Please add steps to reproduce, ideally in from of an integration test under https://github.com/mojohaus/license-maven-plugin/tree/master/src/it

Which mojo(s) does this relate to?

ppalaga avatar Feb 01 '19 10:02 ppalaga

@Tibor17 do you want to add the missing details? Otherwise, I'd close this as non-reproducible.

ppalaga avatar Feb 13 '19 10:02 ppalaga

It's in our commercial project. This is performance issue. Behavior is ok. It may to do with an algorithm of the Maven Core 2.2.1. While plugin resolves dependencies, all are being downloaded and includedScopes is done afterwards which is bad because this takes too long and some dependencies fail to download.

Tibor17 avatar Feb 13 '19 18:02 Tibor17

It may to do with an algorithm of the Maven Core 2.2.1.

The maven-core dependency has <scope>provided</scope> https://github.com/mojohaus/license-maven-plugin/blob/master/pom.xml#L172-L176 so you should get the version delivered by your current maven runtime. In other words upgrading the dep version in our pom would not help per se.

Or you mean that newer maven-core offers an API to "filter before" download?

ppalaga avatar Feb 13 '19 21:02 ppalaga

@ppalaga I mean newer version - mavenVersion. I tried to upgrade the project to 3.0 but it's not only about mavenVersion. I can do it later, not today.

Tibor17 avatar Feb 13 '19 22:02 Tibor17

@Tibor17, could you please check if the current issue was solved by https://github.com/mojohaus/license-maven-plugin/pull/325 ?

ppalaga avatar Jun 22 '19 14:06 ppalaga