Open sboschman opened 6 years ago
Hi. Did you manage to find a solution?
The licenses are downloaded/parsed in a similar way in the license-maven-plugin:
The difference being that in license-maven-plugin both setResolveDependencies and setProcessPlugins are set to false:
ProjectBuildingRequest projectBuildingRequest
= new DefaultProjectBuildingRequest( mavenSession.getProjectBuildingRequest() )
.setRemoteRepositories( remoteRepositories )
.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL )
.setResolveDependencies( false )
.setProcessPlugins( false );
If I add these two lines to MainMojo/analyze it works for me with e.g. postgresql dependencies:
buildingRequest.setResolveDependencies(false);
buildingRequest.setProcessPlugins(false);
I would have thought that dependency resolution was important, although I couldn't find a place in the license-maven-plugin code where that can be configured.
UPDATE
Actually, it seems as though setProcessPlugins
is the culprit, as I can set setResolveDependencies
to true
and it still works.
Interesting. Care to work on a pull request about this? Unfortunately I can't work on it at the moment. I will produce a release after merging.
I've just opened pull-request #17.
Was excited to use this plugin as it seems to offer just what I need but ran into this same issue. Looks like this project's been abandoned.
Project is not abandoned at all, had a release 6 months ago. There has been pull request #17 by @adwk67 regarding this issue, but it didn't go forward... yet.
I'm not able to reproduce this bug. Adding the postgresql driver version 42.2.22 to the <dependencies/>
block works for me and I don't observe crashes.
If any one is still encountering this problem, could they please help me reproducing it.
@carlomorelli Hi! I have the same issue with org.xerial.snappy:snappy-java:1.1.10.5
dependency. This is transitive dependency of kafka-clients:3.7.0
[ERROR] Failed to execute goal com.github.carlomorelli:licensescan-maven-plugin:3.2:audit (default-cli) on project feature-store-services: Execution default-cli of goal com.github.carlomorelli:licensescan-maven-plugin:3.2:audit failed: Error while building project . Giving up...: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16: 1 problem was encountered while building the effective model for org.xerial.snappy:snappy-java:1.1.10.5
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
Postgresql jdbc drivers use the maven-bundle-plugin (http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html), which means the packaging is 'bundle'.
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/pom.xml http://central.maven.org/maven2/org/postgresql/postgresql/42.2.2/postgresql-42.2.2.pom
Seems the Maven ProjectBuilder can't handle this: [ERROR] Failed to execute goal com.github.carlomorelli:licensescan-maven-plugin:1.1:audit (default) on project my-project: Error while building project: Some problems were encountered while processing the POMs: [ERROR] [ERROR] Unknown packaging: bundle @ line 11, column 14: 1 problem was encountered while building the effective model for org.postgresql:postgresql:42.2.2 [ERROR] [ERROR] Unknown packaging: bundle @ line 11, column 14