Skip to content

Commit

Permalink
Fix for issue #648: de-shadowing the localRepository property + it test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejj0 committed Aug 25, 2022
2 parents a7d82e1 + 6c6688b commit da82039
Show file tree
Hide file tree
Showing 9 changed files with 371 additions and 12 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
<filterProperties>
<repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
</filterProperties>
<invokerTest>it-abstract-versions-report-001</invokerTest>
<mavenOpts>-Xmx256m</mavenOpts>
</configuration>
</plugin>
Expand Down
3 changes: 3 additions & 0 deletions src/it/it-abstract-versions-report-001/invoker.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
14 changes: 2 additions & 12 deletions src/it/it-property-updates-report-001/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,15 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1</version>
<version>@maven-site-plugin.version@</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet/>
</reportSets>
</plugin>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/it/it-property-updates-report-002-slow/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
invoker.goals=site
invoker.timeoutInSeconds=30
117 changes: 117 additions & 0 deletions src/it/it-property-updates-report-002-slow/maven-version-rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<ruleset xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<rules>
<rule groupId="commons-collections">
<ignoreVersions>
<ignoreVersion type="regex">200[34].*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.fasterxml.jackson">
<ignoreVersions>
<ignoreVersion type="regex">.*[.-](rc|pr)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations">
<ignoreVersions>
<ignoreVersion type="regex">2\.9\.\d+</ignoreVersion>
<ignoreVersion type="regex">.*[.-](rc|pr)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.fasterxml.jackson.jaxrs">
<ignoreVersions>
<ignoreVersion type="regex">.*[.-](rc|pr)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.hazelcast">
<ignoreVersions>
<ignoreVersion type="regex">.*-RC\d+</ignoreVersion>
<ignoreVersion type="regex">.*-EA\d*</ignoreVersion>
<ignoreVersion type="regex">.*-BETA-\d*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="javax.validation">
<ignoreVersions>
<ignoreVersion type="regex">.*\.(Alpha|Beta|CR)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.camunda.bpm.dmn">
<ignoreVersions>
<ignoreVersion type="regex">.*-alpha\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.codehaus.groovy">
<ignoreVersions>
<ignoreVersion type="regex">.*-(alpha|beta|rc)-\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.hibernate">
<ignoreVersions>
<ignoreVersion type="regex">.*\.(Alpha|Beta|CR)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.javassist">
<ignoreVersions>
<ignoreVersion type="regex">.*-CR\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.jvnet.jaxb2_commons">
<ignoreVersions>
<ignoreVersion>1.11.1</ignoreVersion>
<ignoreVersion>1.11.1-PUBLISHED-BY-MISTAKE</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.mariadb.jdbc">
<ignoreVersions>
<ignoreVersion type="regex">.*-(beta-|RC)\d*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.postgresql">
<ignoreVersions>
<ignoreVersion type="regex">.*\.jre[67]</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.slf4j">
<ignoreVersions>
<ignoreVersion type="regex">.*-alpha\d+</ignoreVersion>
<ignoreVersion type="regex">.*-beta\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="log4j">
<ignoreVersions>
<ignoreVersion type="regex">.*-atlassian-.*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.mockito">
<ignoreVersions>
<ignoreVersion type="regex">.*-beta(\.\d+)?</ignoreVersion>
<ignoreVersion type="regex">.*-RC\.\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.thymeleaf">
<ignoreVersions>
<ignoreVersion type="regex">.*\.(ALPHA|BETA)\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.powermock">
<ignoreVersions>
<ignoreVersion type="regex">.*RC\d+</ignoreVersion>
<ignoreVersion type="regex">.*-beta\.\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.sun.xml.bind">
<ignoreVersions>
<ignoreVersion type="regex">.*-b\d+\.\d+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.glassfish.jaxb">
<ignoreVersions>
<ignoreVersion type="regex">.*-b[\d.]+</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="junit">
<ignoreVersions>
<ignoreVersion type="regex">.*-beta-\d+</ignoreVersion>
<ignoreVersion type="regex">.*-rc-\d+</ignoreVersion>
</ignoreVersions>
</rule>
</rules>
</ruleset>
183 changes: 183 additions & 0 deletions src/it/it-property-updates-report-002-slow/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<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-property-updates-report-002-slow</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>property-updates-report</name>
<description>Validate performance of property-updates-report</description>

<properties>
<spring.version>3.2.17.RELEASE</spring.version>
<hibernate-validator.version>4.3.2.Final</hibernate-validator.version>
<slf4j.version>1.7.10</slf4j.version>
<jaxb.version>2.2.11</jaxb.version>
<jaxb2-basics.version>0.11.1</jaxb2-basics.version>
<poi.version>3.17</poi.version>
<httpclient.version>4.5.2</httpclient.version>
<jackson.version>2.6.7.3</jackson.version>
<mariadb-client.version>2.4.3</mariadb-client.version>
<postgresql-client.version>42.2.6</postgresql-client.version>
<groovy.version>2.0.0</groovy.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql-client.version}</version>
</dependency>

<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb-client.version}</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpclient.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
<exclusions>
<exclusion>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-bom</artifactId>
<version>${jaxb.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>${jaxb2-basics.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-testing</artifactId>
<version>${jaxb2-basics.version}</version>
</dependency>

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>@maven-site-plugin.version@</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
<configuration>
<rulesUri>file:${project.basedir}/maven-version-rules.xml</rulesUri>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
Loading

0 comments on commit da82039

Please sign in to comment.