Skip to content

Commit

Permalink
Fix for issue #648: de-shadowing the localRepository property
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmoniuk authored and slawekjaranowski committed Aug 25, 2022
1 parent 751ace7 commit 214995e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/it/it-abstract-versions-report-001/invoker.properties
@@ -0,0 +1,3 @@
invoker.goals.1=${project.groupId}:${project.artifactId}:${project.version}:dependency-updates-report

invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:plugin-updates-report
33 changes: 33 additions & 0 deletions src/it/it-abstract-versions-report-001/pom.xml
@@ -0,0 +1,33 @@
<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-abstract-versions-report-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>abstract-versions-report</name>
<url>http://localhost/</url>

<description>
Testing command line invocation of dependency- and plugin-updates-report
</description>

<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>localhost</groupId>
<artifactId>dummy-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</build>

</project>
15 changes: 15 additions & 0 deletions src/it/it-abstract-versions-report-001/verify.groovy
@@ -0,0 +1,15 @@
dependencyUpdatesReport = new File( basedir, "target/site/dependency-updates-report.html" )

assert dependencyUpdatesReport.exists( )

// some basic (=not comprehensive) checks on the contents of the dependency report
assert dependencyUpdatesReport.text =~ /\b1\.1\.0-2\b/ // current version of the dependency
assert dependencyUpdatesReport.text =~ /\b3\.0\b/ // latest major available version

pluginUpdatesReport = new File( basedir, "target/site/plugin-updates-report.html" )

assert pluginUpdatesReport.exists( )

// some basic (=not comprehensive) checks on the contents of the plugin report
assert pluginUpdatesReport.text =~ /\b1\.0\b/ // current version of the plugin
assert pluginUpdatesReport.text =~ /\b3\.1\b/ // latest major available version
Expand Up @@ -102,12 +102,6 @@ public abstract class AbstractVersionsReport
@Parameter( defaultValue = "${project.pluginArtifactRepositories}", readonly = true )
protected List<ArtifactRepository> remotePluginRepositories;

/**
* @since 1.0-alpha-1
*/
@Parameter( defaultValue = "${localRepository}", readonly = true )
protected ArtifactRepository localRepository;

/**
* @since 1.0-alpha-3
*/
Expand Down

0 comments on commit 214995e

Please sign in to comment.