Skip to content

Commit

Permalink
Fixed #34
Browse files Browse the repository at this point in the history
 o Added implementation to report the plugin dependencies as well.
 o Added IT's for reporting updates about dependencies in plugins,
   plugins defined in pluginManagement.
  • Loading branch information
khmarbaise committed Jun 10, 2017
1 parent 55f519e commit fd5bd6a
Show file tree
Hide file tree
Showing 16 changed files with 626 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates
80 changes: 80 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<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-issue-34-1</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>display-dependency-updates-issue-34-1</name>
<description>We should get reporting about dependencies in dependencyManagement, dependencies, dependencies of plugins defined in pluginManagement and
of dependencies given in plugins defined.</description>
<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.2</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>
<plugins>
<plugin>
<groupId>localhost</groupId>
<artifactId>dummy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
18 changes: 18 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-1/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

def buildLog = new File( basedir, "build.log")

assert buildLog.text.contains( '[INFO] The following dependencies in Dependency Management have newer versions:')
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.0 -> 3.0')

assert buildLog.text.contains( '[INFO] The following dependencies in Dependencies have newer versions:' )
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 2.0 -> 3.0' )

assert buildLog.text.contains( '[INFO] The following dependencies in pluginManagement of plugins have newer versions:' )
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.2 -> 3.0' )

assert buildLog.text.contains( '[INFO] The following dependencies in Plugin Dependencies have newer versions:')
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.1 -> 3.0' )

assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )

return true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates -DprocessPluginDependencies=false
82 changes: 82 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<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-issue-34-2</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>display-dependency-updates-issue-34-2</name>
<description>We should get reporting dependencies in dependencyManagement, dependencies and of dependencies of plugins defined in pluginManagement.
Should be reported being updateable.
-DprocessPluginDependencies=false
</description>
<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.2</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>
<plugins>
<plugin>
<groupId>localhost</groupId>
<artifactId>dummy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
18 changes: 18 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-2/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

def buildLog = new File( basedir, "build.log")

assert buildLog.text.contains( '[INFO] The following dependencies in Dependency Management have newer versions:')
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.0 -> 3.0')

assert buildLog.text.contains( '[INFO] The following dependencies in Dependencies have newer versions:' )
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 2.0 -> 3.0' )

assert buildLog.text.contains( '[INFO] The following dependencies in pluginManagement of plugins have newer versions:' )
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.2 -> 3.0' )

assert !buildLog.text.contains( '[INFO] The following dependencies in Plugin Dependencies have newer versions:')
assert !buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.1 -> 3.0' )

assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )

return true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates -DprocessPluginDependencies=false -DprocessPluginDependenciesInPluginManagement=false
81 changes: 81 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<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-issue-34-3</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>display-dependency-updates-issue-34-3</name>
<description>We should get reports about dependencies in dependencyManagement and of dependencies.
-DprocessPluginDependencies=false -DprocessPluginDependenciesInPluginManagement=false
</description>
<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.2</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>
<plugins>
<plugin>
<groupId>localhost</groupId>
<artifactId>dummy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
18 changes: 18 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-3/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

def buildLog = new File( basedir, "build.log")

assert buildLog.text.contains( '[INFO] The following dependencies in Dependency Management have newer versions:')
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.0 -> 3.0')

assert buildLog.text.contains( '[INFO] The following dependencies in Dependencies have newer versions:' )
assert buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 2.0 -> 3.0' )

assert !buildLog.text.contains( '[INFO] The following dependencies in pluginManagement of plugins have newer versions:' )
assert !buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.2 -> 3.0' )

assert !buildLog.text.contains( '[INFO] The following dependencies in Plugin Dependencies have newer versions:')
assert !buildLog.text.contains( '[INFO] localhost:dummy-api ....................................... 1.1 -> 3.0' )

assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )

return true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-dependency-updates -DprocessPluginDependencies=false -DprocessPluginDependenciesInPluginManagement=false -DprocessDependencies=false
81 changes: 81 additions & 0 deletions src/it/it-display-dependency-updates-issue-34-4/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<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-issue-34-4</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>display-dependency-updates-issue-34-4</name>
<description>We should get only update report of dependencies in dependencyManagement.
-DprocessPluginDependencies=false -DprocessPluginDependenciesInPluginManagement=false -DprocessDependencies=false
</description>
<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.2</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>
<plugins>
<plugin>
<groupId>localhost</groupId>
<artifactId>dummy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit fd5bd6a

Please sign in to comment.