-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o Added implementation to report the plugin dependencies as well. o Added IT...not verifing yet..
- Loading branch information
1 parent
55f519e
commit 43e933d
Showing
4 changed files
with
224 additions
and
24 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/it/it-display-dependency-updates-007-issue-34/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 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates |
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,69 @@ | ||
<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-004</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
<name>display-dependency-updates-004</name> | ||
<url>http://localhost/</url> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
<version>2.0</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-maven-plugin</artifactId> | ||
<version>1.0</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>2.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.3</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>2.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>2.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>2.1</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
<properties> | ||
<processDependencyManagement>false</processDependencyManagement> | ||
</properties> | ||
</project> |
32 changes: 32 additions & 0 deletions
32
src/it/it-display-dependency-updates-007-issue-34/verify.bsh
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,32 @@ | ||
import java.io.*; | ||
import org.codehaus.plexus.util.FileUtils; | ||
import java.util.regex.*; | ||
|
||
try | ||
{ | ||
System.out.println("Running verification..."); | ||
File file = new File( basedir, "build.log" ); | ||
String buf = FileUtils.fileRead( file ); | ||
|
||
[INFO] The following dependencies in Dependencies have newer versions: | ||
[INFO] localhost:dummy-api ....................................... 2.0 -> 3.0 | ||
[INFO] | ||
|
||
[INFO] The following dependencies in pluginManagement of plugins have newer versions: | ||
[INFO] localhost:dummy-api ....................................... 1.0 -> 3.0 | ||
|
||
Pattern p = Pattern.compile( "localhost:dummy-api .* 1.1" ); | ||
Matcher m = p.matcher( buf.toString() ); | ||
if ( m.find() ) | ||
{ | ||
System.out.println( "localhost:dummy-api 1.1 was processed (but should not have been)" ); | ||
return false; | ||
} | ||
} | ||
catch( Throwable t ) | ||
{ | ||
t.printStackTrace(); | ||
return false; | ||
} | ||
|
||
return true; |
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