forked from mojohaus/versions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves mojohaus#973: NPE if actual version is null for a dependency
- Loading branch information
Showing
6 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...aven-plugin/src/it/it-display-dependency-updates-issue-973-versionless/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates | ||
invoker.mavenOpts = -Dversions.outputFile=./output.txt -DoutputEncoding=UTF-8 |
37 changes: 37 additions & 0 deletions
37
versions-maven-plugin/src/it/it-display-dependency-updates-issue-973-versionless/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-display-dependency-updates-002</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
<name>display-dependency-updates-from-plugins</name> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-maven-plugin</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> |
6 changes: 6 additions & 0 deletions
6
...ons-maven-plugin/src/it/it-display-dependency-updates-issue-973-versionless/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import java.util.regex.Matcher | ||
|
||
def output = new File(basedir, "output.txt").text | ||
def matcher = output =~ /\Qlocalhost:dummy-api\E.*->\s+\Q3.0\E\b/ | ||
assert matcher instanceof Matcher | ||
assert matcher.results().count() == 1 |