-
Notifications
You must be signed in to change notification settings - Fork 267
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
org.codehaus.mojo:versions-maven-plugin:2.16.0:display-dependency-updates failed: Cannot invoke "Object.toString()" because "otherVersion" is null #973
Comments
It can be connected with: #951 and https://issues.apache.org/jira/browse/MNG-7780 |
I'll check. |
So this is about a versionless dependency of the spotbugs plugin: <dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
</dependency> Anyway, I see that something's not right even in 2.14.2 since we're trying to retrieve updates for com.github.spotbugs:spotbugs:jar:[,0]... which will be satisfied by any possible version. But I think that is a separate issue which is probably present in more places. To be investigated. |
@freedom1b2830 can you prepare simple project with one plugin and try also to execute plugin with such configuration ... for me it will not working |
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>issue973</groupId>
<artifactId>issue973</artifactId>
<version>issue973</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>4.7.3</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.4</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<!-- NPE -->
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project> |
What result will be if you execute for such project:
|
Error if given pom.xml is called (If I call spotbugs:check on a project that is a child of this pom.xml, then the check succeeds) proj1 this pom call spotbugs:check ERROR The problem is initially with maven versions and does not apply to the call to spotbugs:check (the version to call is determined successfully from dependencyManagement)I hope the fix is successful (#974)
|
The project for which the plugin was called: https://github.com/publicLibs/RollingMavenHeader/commit/0a93dbce4c6657f816362971654d862d9798d510
command
mvn versions:display-dependency-updates -X > FULL_ERROR_X.txt
FULL_ERROR_X.txt
The text was updated successfully, but these errors were encountered: