[maven-surefire] branch master updated: improved JUnit47ConcurrencyIT
This is an automated email from the ASF dual-hosted git repository. tibordigana pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-surefire.git The following commit(s) were added to refs/heads/master by this push: new 8d9a5cd improved JUnit47ConcurrencyIT 8d9a5cd is described below commit 8d9a5cd21445e5fcb1c29cc3e8fc735922933924 Author: tibordigana AuthorDate: Fri Mar 6 01:55:11 2020 +0100 improved JUnit47ConcurrencyIT --- .../java/org/apache/maven/surefire/its/JUnit47ConcurrencyIT.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47ConcurrencyIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47ConcurrencyIT.java index c7ccdad..b07f456 100644 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47ConcurrencyIT.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47ConcurrencyIT.java @@ -54,7 +54,10 @@ public class JUnit47ConcurrencyIT } } assertNotNull( result ); -assertThat( result, anyOf( containsString( "Time elapsed: 1." ), containsString( "Time elapsed: 0.9" ) ) ); +assertThat( result, anyOf( +containsString( "Time elapsed: 1." ), +containsString( "Time elapsed: 1 s" ), +containsString( "Time elapsed: 0.9" ) ) ); assertThat( result, endsWith( " s - in concurrentjunit47.src.test.java.junit47.BasicTest" ) ); } -} \ No newline at end of file +}
[maven-shared-utils] branch master updated: deps: update JUnit
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git The following commit(s) were added to refs/heads/master by this push: new 2e3bcac deps: update JUnit 2e3bcac is described below commit 2e3bcacb8744acfafa9e52a27adb2a1d61eaed91 Author: Elliotte Rusty Harold AuthorDate: Sun Feb 23 16:14:00 2020 -0500 deps: update JUnit Closes #13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 07c58b9..28c46ba 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ junit junit - 4.11 + 4.13 test
[maven-project-info-reports-plugin] branch MPIR-384 deleted (was 7f414a5)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-384 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. was 7f414a5 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement This change permanently discards the following revisions: discard 7f414a5 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement discard 3eddab3 [MPIR-386] Add pluginRepositories (#13)
[maven-studies] branch maven-buildinfo-plugin updated: added README
This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch maven-buildinfo-plugin in repository https://gitbox.apache.org/repos/asf/maven-studies.git The following commit(s) were added to refs/heads/maven-buildinfo-plugin by this push: new 36e1be5 added README 36e1be5 is described below commit 36e1be5a2f12d4f61b4cd8aecb3afaa073ca28da Author: Hervé Boutemy AuthorDate: Fri Mar 6 00:37:50 2020 +0100 added README --- README.md | 75 +++ 1 file changed, 75 insertions(+) diff --git a/README.md b/README.md new file mode 100644 index 000..a8ef8d9 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ + +Apache Maven Buildinfo Plugin Study +== + +[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license] + +This plugin is a study, written as a Proof Of Concept of [Reproducible Builds](https://reproducible-builds.org/) tooling +to ease reproducing builds: once feedback will be given on Maven developper mailing list, we'll see if this will be moved +to a separate Maven plugin or if its unique goal will be merged to an existing plugin. + +The purpose of this plugin is: + +- to generate a buildinfo file from a build, as specified in [Reproducible Builds for the JVM](https://reproducible-builds.org/docs/jvm/) + that will eventually be deployed to remote repository + +- help rebuilders to check that they local build produces the same Reproducible Build output than the reference build + published to a remote repository + +To use this plugin, you'll need to build and install from source, or use SHAPSHOT from ```https://repository.apache.org/content/repositories/snapshots``` + +Generating buildinfo after a build +-- + +``` +mvn verify buildinfo:save +``` + +Deploy to remote repository +-- + +Configure the plugin with its ```save``` +goal in your ```pom.xml``` + +Check local build against remote reference +-- + +If reference build is available in a remote repository with predefined id, like ```central```: + +``` +mvn verify buildinfo:save -Dreference.repo=central +``` + +If reference build is available in a remote repository without predefined id, use its url instead: + +``` +mvn verify buildinfo:save -Dreference.repo=https://repository.apache.org/content/groups/maven-staging-group/ +``` + +Available Reproducible Releases in Maven Central Repository +-- + +- [org.apache.maven.plugins:maven-shade-plugin:3.2.2](https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/3.2.2/) mono-module, with source-release + +- [org.apache;maven.doxia:doxia:1.9.1](https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia/1.9.1/) multi-module, with source-release + +- [info.guardianproject:jtorctl:0.4](https://repo.maven.apache.org/maven2/info/guardianproject/jtorctl/0.4/) mono-module with provided buildinfo + +- [org.apache.sling:org.apache.sling.installer.core:3.10.2](https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.installer.core/3.10.2/) OSGI, with source-release + +[license]: https://www.apache.org/licenses/LICENSE-2.0
[maven-project-info-reports-plugin] branch master updated: [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git The following commit(s) were added to refs/heads/master by this push: new 38dfe09 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement 38dfe09 is described below commit 38dfe09323cc641e9746bb3d44a4550d64f23a94 Author: Gabriel Belingueres AuthorDate: Mon Jan 14 14:34:58 2019 -0300 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement --- src/it/MPIR-375/pom.xml| 5 -- .../report/projectinfo/PluginManagementReport.java | 62 +- .../plugin-management-plugin-config-MPIR-375.xml | 7 --- 3 files changed, 14 insertions(+), 60 deletions(-) diff --git a/src/it/MPIR-375/pom.xml b/src/it/MPIR-375/pom.xml index 16afb89..acb0755 100644 --- a/src/it/MPIR-375/pom.xml +++ b/src/it/MPIR-375/pom.xml @@ -73,11 +73,6 @@ - -org.apache.maven.plugins -maven-site-plugin -@sitePluginVersion@ - diff --git a/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java index a9f088b..cddd113 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java @@ -34,6 +34,7 @@ import org.apache.maven.project.ProjectBuilder; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.project.ProjectBuildingRequest; import org.apache.maven.repository.RepositorySystem; +import org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter; import org.codehaus.plexus.i18n.I18N; import org.codehaus.plexus.util.StringUtils; @@ -128,7 +129,7 @@ public class PluginManagementReport private final ProjectBuildingRequest buildingRequest; -private final List excludes; +private final PatternExcludesArtifactFilter patternExcludesArtifactFilter; /** * @param log {@link #log} @@ -161,7 +162,7 @@ public class PluginManagementReport this.buildingRequest = buildingRequest; -this.excludes = excludes; +this.patternExcludesArtifactFilter = new PatternExcludesArtifactFilter( excludes ); } @Override @@ -220,14 +221,10 @@ public class PluginManagementReport Artifact pluginArtifact = repositorySystem.createProjectArtifact( plugin.getGroupId(), plugin .getArtifactId(), versionRange.toString() ); - -try + +if ( patternExcludesArtifactFilter.include( pluginArtifact ) ) { -if ( isExcluded( pluginArtifact ) ) -{ -log.debug( "Excluding plugin " + pluginArtifact.getId() + " from report" ); -} -else +try { MavenProject pluginProject = projectBuilder.build( pluginArtifact, buildingRequest ).getProject(); @@ -235,13 +232,17 @@ public class PluginManagementReport tableRow( getPluginRow( pluginProject.getGroupId(), pluginProject.getArtifactId(), pluginProject.getVersion(), pluginProject.getUrl() ) ); } +catch ( ProjectBuildingException e ) +{ +log.info( "Could not build project for: " + plugin.getArtifactId() + ":" + e.getMessage(), e ); +tableRow( getPluginRow( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), +null ) ); +} } -catch ( ProjectBuildingException e ) +else { -log.info( "Could not build project for: " + plugin.getArtifactId() + ":" + e.getMessage(), e ); -tableRow( getPluginRow( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), null ) ); +log.debug( "Excluding plugin " + pluginArtifact.getId() + " from report" ); } - } endTable(); @@ -283,41 +284,6 @@ public class PluginManagementReport } }; } - -private boolean isExcluded( Artifact pluginArtifact ) -{ -if ( excludes == null ) -{ -return false; -} -for ( String pattern : excludes ) -{ -String[] subStrings = pattern.split( ":" ); -
[maven-project-info-reports-plugin] branch MPIR-386 deleted (was 3eddab3)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. was 3eddab3 [MPIR-386] Add pluginRepositories (#13) The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[maven-studies] branch maven-buildinfo-plugin updated: display output comparison results
This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch maven-buildinfo-plugin in repository https://gitbox.apache.org/repos/asf/maven-studies.git The following commit(s) were added to refs/heads/maven-buildinfo-plugin by this push: new ff2ef64 display output comparison results ff2ef64 is described below commit ff2ef649bba19dbe243ab269711237cb51ac5347 Author: Hervé Boutemy AuthorDate: Fri Mar 6 00:11:23 2020 +0100 display output comparison results --- .../apache/maven/plugins/buildinfo/SaveMojo.java | 113 +++-- 1 file changed, 107 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java b/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java index 4a36903..839d082 100644 --- a/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java +++ b/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java @@ -33,7 +33,7 @@ import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.util.FileUtils; - +import org.codehaus.plexus.util.PropertyUtils; import org.eclipse.aether.AbstractForwardingRepositorySystemSession; import org.eclipse.aether.RepositorySystem; import org.eclipse.aether.RepositorySystemSession; @@ -52,6 +52,7 @@ import java.io.PrintWriter; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Properties; /** * Save buildinfo file, as specified in @@ -244,7 +245,7 @@ public class SaveMojo } // generate buildinfo from reference artifacts -referenceBuildinfo = new File( referenceDir, buildinfoFile.getName() ); +referenceBuildinfo = getReference( buildinfoFile ); try ( PrintWriter p = new PrintWriter( new BufferedWriter( new OutputStreamWriter( new FileOutputStream( referenceBuildinfo ), Charsets.ISO_8859_1 ) ) ) ) @@ -255,7 +256,7 @@ public class SaveMojo { Artifact artifact = entry.getKey(); String prefix = entry.getValue(); -bi.printFile( prefix, new File( referenceDir, artifact.getFile().getName() ) ); +bi.printFile( prefix, getReference( artifact.getFile() ) ); } getLog().info( "Minimal buildinfo generated from downloaded artifacts: " + referenceBuildinfo ); @@ -266,7 +267,101 @@ public class SaveMojo } } -// TODO compare reference buildinfo vs actual +// compare outputs from reference buildinfo vs actual +Properties actual = loadOutputProperties( buildinfoFile ); +Properties reference = loadOutputProperties( referenceBuildinfo ); +int ok = 0; +for ( Map.Entry entry : artifacts.entrySet() ) +{ +Artifact artifact = entry.getKey(); +String prefix = entry.getValue(); + +if ( checkArtifact( artifact, prefix, reference, actual ) ) +{ +ok++; +} +} + +int ko = artifacts.size() - ok; +int missing = reference.size() / 3; +if ( ko + missing > 0 ) +{ +getLog().warn( "Reproducible Build output summary: " + ok + " files ok, " + ko + " different, " + missing ++ " missing" ); +} +else +{ +getLog().info( "Reproducible Build output summary: " + ok + " files ok" ); +} +} + +private boolean checkArtifact( Artifact artifact, String prefix, Properties reference, Properties actual ) +{ +String actualFilename = (String) actual.remove( prefix + ".filename" ); +String actualLength = (String) actual.remove( prefix + ".length" ); +String actualSha512 = (String) actual.remove( prefix + ".checksums.sha512" ); + +String referencePrefix = findPrefix( reference, actualFilename ); +String referenceLength = (String) reference.remove( referencePrefix + ".length" ); +String referenceSha512 = (String) reference.remove( referencePrefix + ".checksums.sha512" ); + +if ( !actualLength.equals( referenceLength ) ) +{ +getLog().warn( "size mismatch " + actualFilename + diffoscope( artifact ) ); +return false; +} +else if ( !actualSha512.equals( referenceSha512 ) ) +{ +getLog().warn( "sha512 mismatch " + actualFilename + diffoscope( artifact ) ); +return false; +} +return true; +} + +private String diffoscope( Artifact a ) +{ +File actual = a.getFile(); +File reference = getReference( actual ); +return ", run diffoscope " + relative( reference ) + " " +
[maven-project-info-reports-plugin] branch master updated: [MPIR-386] Corrected version tag to 3.1.0
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git The following commit(s) were added to refs/heads/master by this push: new 44038ad [MPIR-386] Corrected version tag to 3.1.0 44038ad is described below commit 44038ada329372be9dcdfcdd3b4510100a212628 Author: Sylwester Lachiewicz AuthorDate: Fri Mar 6 00:11:14 2020 +0100 [MPIR-386] Corrected version tag to 3.1.0 --- .../org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index 4e0efe8..19f6829 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -135,7 +135,7 @@ public abstract class AbstractProjectInfoReport /** * Plugin repositories used for the project. * - * @since 3.0.2 + * @since 3.1.0 */ @Parameter( property = "project.pluginArtifactRepositories" ) protected List pluginRepositories;
[maven-project-info-reports-plugin] branch master updated: [MPIR-386] Add plugin repositories to project building requests
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git The following commit(s) were added to refs/heads/master by this push: new 03bce34 [MPIR-386] Add plugin repositories to project building requests 03bce34 is described below commit 03bce34f049dc6fceb39b1b32924316477cca062 Author: Eddie Wiegers AuthorDate: Thu Oct 31 09:26:51 2019 -0500 [MPIR-386] Add plugin repositories to project building requests Closes #13 --- .../maven/report/projectinfo/AbstractProjectInfoReport.java | 8 .../org/apache/maven/report/projectinfo/DependenciesReport.java | 1 + .../maven/report/projectinfo/DependencyManagementReport.java | 1 + .../maven/report/projectinfo/AbstractProjectInfoTestCase.java | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index a35cfa5..4e0efe8 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -133,6 +133,14 @@ public abstract class AbstractProjectInfoReport protected List remoteRepositories; /** + * Plugin repositories used for the project. + * + * @since 3.0.2 + */ +@Parameter( property = "project.pluginArtifactRepositories" ) +protected List pluginRepositories; + +/** * The reactor projects. * * @since 2.10 diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java index 02a531a..61c8b2d 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java @@ -142,6 +142,7 @@ public class DependenciesReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java index 9445a63..3b2a88f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java @@ -94,6 +94,7 @@ public class DependencyManagementReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java index cf8d2f3..01f04e5 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java +++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java @@ -187,8 +187,8 @@ public abstract class AbstractProjectInfoTestCase repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) ); setVariableValueToObject( mojo, "session", legacySupport.getSession() ); - setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() ); +setVariableValueToObject( mojo, "pluginRepositories", mojo.getProject().getPluginArtifactRepositories() ); return mojo; }
[maven-project-info-reports-plugin] branch MPIR-390 deleted (was 57463e6)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-390 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. was 57463e6 [MPIR-390] Verify build by Github Action (#14) The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[maven-project-info-reports-plugin] branch master updated (d3efb03 -> 57463e6)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. from d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts add 57463e6 [MPIR-390] Verify build by Github Action (#14) No new revisions were added by this update. Summary of changes: .../workflows/maven.yml| 29 +++--- 1 file changed, 26 insertions(+), 3 deletions(-) copy src/it/multi-module/invoker.properties => .github/workflows/maven.yml (58%)
[maven-project-info-reports-plugin] 01/01: [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-384 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 7f414a5c0e70eb281ec5b7519b7375c46b832f86 Author: Gabriel Belingueres AuthorDate: Mon Jan 14 14:34:58 2019 -0300 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement --- src/it/MPIR-375/pom.xml| 5 -- .../report/projectinfo/PluginManagementReport.java | 62 +- .../plugin-management-plugin-config-MPIR-375.xml | 7 --- 3 files changed, 14 insertions(+), 60 deletions(-) diff --git a/src/it/MPIR-375/pom.xml b/src/it/MPIR-375/pom.xml index 16afb89..acb0755 100644 --- a/src/it/MPIR-375/pom.xml +++ b/src/it/MPIR-375/pom.xml @@ -73,11 +73,6 @@ - -org.apache.maven.plugins -maven-site-plugin -@sitePluginVersion@ - diff --git a/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java index a9f088b..cddd113 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java @@ -34,6 +34,7 @@ import org.apache.maven.project.ProjectBuilder; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.project.ProjectBuildingRequest; import org.apache.maven.repository.RepositorySystem; +import org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter; import org.codehaus.plexus.i18n.I18N; import org.codehaus.plexus.util.StringUtils; @@ -128,7 +129,7 @@ public class PluginManagementReport private final ProjectBuildingRequest buildingRequest; -private final List excludes; +private final PatternExcludesArtifactFilter patternExcludesArtifactFilter; /** * @param log {@link #log} @@ -161,7 +162,7 @@ public class PluginManagementReport this.buildingRequest = buildingRequest; -this.excludes = excludes; +this.patternExcludesArtifactFilter = new PatternExcludesArtifactFilter( excludes ); } @Override @@ -220,14 +221,10 @@ public class PluginManagementReport Artifact pluginArtifact = repositorySystem.createProjectArtifact( plugin.getGroupId(), plugin .getArtifactId(), versionRange.toString() ); - -try + +if ( patternExcludesArtifactFilter.include( pluginArtifact ) ) { -if ( isExcluded( pluginArtifact ) ) -{ -log.debug( "Excluding plugin " + pluginArtifact.getId() + " from report" ); -} -else +try { MavenProject pluginProject = projectBuilder.build( pluginArtifact, buildingRequest ).getProject(); @@ -235,13 +232,17 @@ public class PluginManagementReport tableRow( getPluginRow( pluginProject.getGroupId(), pluginProject.getArtifactId(), pluginProject.getVersion(), pluginProject.getUrl() ) ); } +catch ( ProjectBuildingException e ) +{ +log.info( "Could not build project for: " + plugin.getArtifactId() + ":" + e.getMessage(), e ); +tableRow( getPluginRow( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), +null ) ); +} } -catch ( ProjectBuildingException e ) +else { -log.info( "Could not build project for: " + plugin.getArtifactId() + ":" + e.getMessage(), e ); -tableRow( getPluginRow( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), null ) ); +log.debug( "Excluding plugin " + pluginArtifact.getId() + " from report" ); } - } endTable(); @@ -283,41 +284,6 @@ public class PluginManagementReport } }; } - -private boolean isExcluded( Artifact pluginArtifact ) -{ -if ( excludes == null ) -{ -return false; -} -for ( String pattern : excludes ) -{ -String[] subStrings = pattern.split( ":" ); -subStrings = StringUtils.stripAll( subStrings ); -String resultPattern = StringUtils.join( subStrings, ":" ); - -if ( compareDependency( resultPattern, pluginArtifact ) ) -
[maven-project-info-reports-plugin] branch MPIR-384 updated (715bd92 -> 7f414a5)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-384 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard 715bd92 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement add c7acb57 [MPIR-385] Avoid adding mailto: prefix twice add 0537c1b Bump to 3.1.0-SNAPSHOT add db82c71 Fix checkstyle issues add 65e5224 [MPIR-387] make build Reproducible add eb1606b Corrected failed IT test: update link for Doxia api site to https add df96c2e [MPIR-389] Upgrade Doxia to 1.9.1 add d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts add 57463e6 [MPIR-390] Verify build by Github Action (#14) add 3eddab3 [MPIR-386] Add pluginRepositories (#13) new 7f414a5 [MPIR-384] Use PatternExcludesArtifactFilter to exclude artifacts in PluginManagement This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (715bd92) \ N -- N -- N refs/heads/MPIR-384 (7f414a5) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../workflows/maven.yml| 29 +++--- pom.xml| 10 +--- src/it/full-pom/verify.bsh | 4 +-- .../projectinfo/AbstractProjectInfoReport.java | 8 ++ .../report/projectinfo/DependenciesReport.java | 1 + .../projectinfo/DependencyConvergenceReport.java | 27 .../projectinfo/DependencyManagementReport.java| 1 + .../report/projectinfo/MailingListsReport.java | 3 ++- .../report/projectinfo/ProjectInfoReportUtils.java | 2 -- .../maven/report/projectinfo/TeamReport.java | 3 --- .../renderer/DependenciesRenderer.java | 5 ++-- .../projectinfo/AbstractProjectInfoTestCase.java | 2 +- .../report/projectinfo/MailingListsReportTest.java | 2 +- .../plugin-configs/mailing-lists-plugin-config.xml | 2 +- 14 files changed, 62 insertions(+), 37 deletions(-) copy src/it/multi-module/invoker.properties => .github/workflows/maven.yml (58%)
[maven-project-info-reports-plugin] 01/01: [MPIR-386] Add pluginRepositories (#13)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 3eddab3a6229d7414d229ccc4e4f93e64303f316 Author: Eddie Wiegers AuthorDate: Thu Oct 31 09:26:51 2019 -0500 [MPIR-386] Add pluginRepositories (#13) --- .../maven/report/projectinfo/AbstractProjectInfoReport.java | 8 .../org/apache/maven/report/projectinfo/DependenciesReport.java | 1 + .../maven/report/projectinfo/DependencyManagementReport.java | 1 + .../maven/report/projectinfo/AbstractProjectInfoTestCase.java | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index a35cfa5..4e0efe8 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -133,6 +133,14 @@ public abstract class AbstractProjectInfoReport protected List remoteRepositories; /** + * Plugin repositories used for the project. + * + * @since 3.0.2 + */ +@Parameter( property = "project.pluginArtifactRepositories" ) +protected List pluginRepositories; + +/** * The reactor projects. * * @since 2.10 diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java index 02a531a..61c8b2d 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java @@ -142,6 +142,7 @@ public class DependenciesReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java index 9445a63..3b2a88f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java @@ -94,6 +94,7 @@ public class DependencyManagementReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java index cf8d2f3..01f04e5 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java +++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java @@ -187,8 +187,8 @@ public abstract class AbstractProjectInfoTestCase repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) ); setVariableValueToObject( mojo, "session", legacySupport.getSession() ); - setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() ); +setVariableValueToObject( mojo, "pluginRepositories", mojo.getProject().getPluginArtifactRepositories() ); return mojo; }
[maven-project-info-reports-plugin] branch MPIR-386 updated (c77a399 -> 3eddab3)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard c77a399 [MPIR-386] Add pluginRepositories (#13) add 57463e6 [MPIR-390] Verify build by Github Action (#14) new 3eddab3 [MPIR-386] Add pluginRepositories (#13) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (c77a399) \ N -- N -- N refs/heads/MPIR-386 (3eddab3) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../workflows/maven.yml| 29 +++--- 1 file changed, 26 insertions(+), 3 deletions(-) copy src/it/multi-module/invoker.properties => .github/workflows/maven.yml (58%)
[maven-project-info-reports-plugin] 01/01: [MPIR-390] Verify build by Github Action (#14)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-390 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 57463e6a899d61dcdab38c9b8a2d5dfae1192558 Author: Slawomir Jaranowski AuthorDate: Sat Feb 8 10:46:03 2020 +0100 [MPIR-390] Verify build by Github Action (#14) --- .github/workflows/maven.yml | 42 ++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000..db344ff --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,42 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Java CI + +on: [push, pull_request] + +jobs: + build: + +strategy: + matrix: +os: [ubuntu-latest, windows-latest, macOS-latest] + fail-fast: false + +runs-on: ${{ matrix.os }} + +steps: + - name: Checkout +uses: actions/checkout@v1 + + - name: Set up JDK 1.8 +uses: actions/setup-java@v1 +with: + java-version: 1.8 + + - name: Build with Maven +run: mvn install -e -B -V --no-transfer-progress -P run-its
[maven-project-info-reports-plugin] branch MPIR-390 created (now 57463e6)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-390 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. at 57463e6 [MPIR-390] Verify build by Github Action (#14) This branch includes the following new commits: new 57463e6 [MPIR-390] Verify build by Github Action (#14) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-project-info-reports-plugin] branch MPIR-386 updated (7dcc5b3 -> c77a399)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard 7dcc5b3 [MPIR-386] Add pluginRepositories (#13) add eb1606b Corrected failed IT test: update link for Doxia api site to https add df96c2e [MPIR-389] Upgrade Doxia to 1.9.1 add d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts new c77a399 [MPIR-386] Add pluginRepositories (#13) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (7dcc5b3) \ N -- N -- N refs/heads/MPIR-386 (c77a399) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml| 4 ++-- src/it/full-pom/verify.bsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
[maven-project-info-reports-plugin] branch MPIR-386 updated (c77a399 -> c77a399)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. No new revisions were added by this update. Summary of changes:
[maven-project-info-reports-plugin] branch MPIR-388 deleted (was d3efb03)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. was d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[maven-project-info-reports-plugin] 01/01: [MPIR-386] Add pluginRepositories (#13)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit c77a3993f572a967321acfec5a13165d8d3d Author: Eddie Wiegers AuthorDate: Thu Oct 31 09:26:51 2019 -0500 [MPIR-386] Add pluginRepositories (#13) --- .../maven/report/projectinfo/AbstractProjectInfoReport.java | 8 .../org/apache/maven/report/projectinfo/DependenciesReport.java | 1 + .../maven/report/projectinfo/DependencyManagementReport.java | 1 + .../maven/report/projectinfo/AbstractProjectInfoTestCase.java | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index a35cfa5..4e0efe8 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -133,6 +133,14 @@ public abstract class AbstractProjectInfoReport protected List remoteRepositories; /** + * Plugin repositories used for the project. + * + * @since 3.0.2 + */ +@Parameter( property = "project.pluginArtifactRepositories" ) +protected List pluginRepositories; + +/** * The reactor projects. * * @since 2.10 diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java index 02a531a..61c8b2d 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java @@ -142,6 +142,7 @@ public class DependenciesReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java index 9445a63..3b2a88f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java @@ -94,6 +94,7 @@ public class DependencyManagementReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java index cf8d2f3..01f04e5 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java +++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java @@ -187,8 +187,8 @@ public abstract class AbstractProjectInfoTestCase repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) ); setVariableValueToObject( mojo, "session", legacySupport.getSession() ); - setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() ); +setVariableValueToObject( mojo, "pluginRepositories", mojo.getProject().getPluginArtifactRepositories() ); return mojo; }
[maven-project-info-reports-plugin] branch master updated (df96c2e -> d3efb03)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. from df96c2e [MPIR-389] Upgrade Doxia to 1.9.1 add d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts No new revisions were added by this update. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[maven-project-info-reports-plugin] branch MPIR-388 updated (d3efb03 -> d3efb03)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. No new revisions were added by this update. Summary of changes:
[maven-project-info-reports-plugin] 01/01: [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit d3efb03979868e1400f94858c97ce59de0d350da Author: Sylwester Lachiewicz AuthorDate: Thu Mar 5 23:03:33 2020 +0100 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ddb532e..20d3f2f 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ under the License. 1.9.1 -1.8.1 +1.9.2 3.0 1.10.0 3.7
[maven-project-info-reports-plugin] branch MPIR-388 updated (da677ce -> d3efb03)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard da677ce [MPIR-389] Upgrade Doxia to 1.9.1 discard 07f5f76 Correct failed build: upstate link to https add eb1606b Corrected failed IT test: update link for Doxia api site to https add df96c2e [MPIR-389] Upgrade Doxia to 1.9.1 new d3efb03 [MPIR-388] Doxia Sitetools 1.9.2 to remove dependency on Struts This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (da677ce) \ N -- N -- N refs/heads/MPIR-388 (d3efb03) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[maven-project-info-reports-plugin] branch master updated: [MPIR-389] Upgrade Doxia to 1.9.1
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git The following commit(s) were added to refs/heads/master by this push: new df96c2e [MPIR-389] Upgrade Doxia to 1.9.1 df96c2e is described below commit df96c2ef87f3962ffdeeba7b368deeb88cf2ac61 Author: Sylwester Lachiewicz AuthorDate: Thu Mar 5 22:10:07 2020 +0100 [MPIR-389] Upgrade Doxia to 1.9.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0bb7da7..ddb532e 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ under the License. -1.8 +1.9.1 1.8.1 3.0 1.10.0
[maven-project-info-reports-plugin] branch build-problem deleted (was 07f5f76)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch build-problem in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. was 07f5f76 Correct failed build: upstate link to https The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[maven-project-info-reports-plugin] branch master updated: Corrected failed IT test: update link for Doxia api site to https
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git The following commit(s) were added to refs/heads/master by this push: new eb1606b Corrected failed IT test: update link for Doxia api site to https eb1606b is described below commit eb1606b60bc00a843c7f1cbff317769ff3acec23 Author: Sylwester Lachiewicz AuthorDate: Thu Mar 5 22:17:21 2020 +0100 Corrected failed IT test: update link for Doxia api site to https --- src/it/full-pom/verify.bsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/it/full-pom/verify.bsh b/src/it/full-pom/verify.bsh index ba90103..df74b5a 100644 --- a/src/it/full-pom/verify.bsh +++ b/src/it/full-pom/verify.bsh @@ -102,9 +102,9 @@ try // MPIR-216: dependency with range File dependencyMgmt = new File( siteDir, "dependency-management.html"); content = FileUtils.fileRead( dependencyMgmt, "UTF-8" ); -if ( !content.contains( "http://maven.apache.org/doxia/doxia/doxia-sink-api/; ) ) +if ( !content.contains( "https://maven.apache.org/doxia/doxia/doxia-sink-api/; ) ) { -System.err.println( "MPIR-216: dependency-management doesn't contain doxia-sink-api url http://maven.apache.org/doxia/doxia/doxia-sink-api/; ); +System.err.println( "MPIR-216: dependency-management doesn't contain doxia-sink-api url https://maven.apache.org/doxia/doxia/doxia-sink-api/; ); return false; }
[maven-project-info-reports-plugin] branch master updated (eb1606b -> eb1606b)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. No new revisions were added by this update. Summary of changes:
[maven-project-info-reports-plugin] branch MPIR-388 created (now da677ce)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. at da677ce [MPIR-389] Upgrade Doxia to 1.9.1 This branch includes the following new commits: new da677ce [MPIR-389] Upgrade Doxia to 1.9.1 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-project-info-reports-plugin] 01/01: Correct failed build: upstate link to https
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch build-problem in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 07f5f76f1e1fe8881fe3dbe03c4623beeb635492 Author: Sylwester Lachiewicz AuthorDate: Thu Mar 5 22:17:21 2020 +0100 Correct failed build: upstate link to https --- src/it/full-pom/verify.bsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/it/full-pom/verify.bsh b/src/it/full-pom/verify.bsh index ba90103..df74b5a 100644 --- a/src/it/full-pom/verify.bsh +++ b/src/it/full-pom/verify.bsh @@ -102,9 +102,9 @@ try // MPIR-216: dependency with range File dependencyMgmt = new File( siteDir, "dependency-management.html"); content = FileUtils.fileRead( dependencyMgmt, "UTF-8" ); -if ( !content.contains( "http://maven.apache.org/doxia/doxia/doxia-sink-api/; ) ) +if ( !content.contains( "https://maven.apache.org/doxia/doxia/doxia-sink-api/; ) ) { -System.err.println( "MPIR-216: dependency-management doesn't contain doxia-sink-api url http://maven.apache.org/doxia/doxia/doxia-sink-api/; ); +System.err.println( "MPIR-216: dependency-management doesn't contain doxia-sink-api url https://maven.apache.org/doxia/doxia/doxia-sink-api/; ); return false; }
[maven-project-info-reports-plugin] 01/01: [MPIR-389] Upgrade Doxia to 1.9.1
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-388 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit da677ce24a0dfd185e02671af2351a6b89c2b848 Author: Sylwester Lachiewicz AuthorDate: Thu Mar 5 22:10:07 2020 +0100 [MPIR-389] Upgrade Doxia to 1.9.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0bb7da7..ddb532e 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ under the License. -1.8 +1.9.1 1.8.1 3.0 1.10.0
[maven-project-info-reports-plugin] branch build-problem created (now 07f5f76)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch build-problem in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. at 07f5f76 Correct failed build: upstate link to https This branch includes the following new commits: new 07f5f76 Correct failed build: upstate link to https The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-project-info-reports-plugin] branch MPIR-386 updated (8ad182d -> 7dcc5b3)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard 8ad182d [MPIR-386] Add pluginRepositories new 7dcc5b3 [MPIR-386] Add pluginRepositories (#13) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (8ad182d) \ N -- N -- N refs/heads/MPIR-386 (7dcc5b3) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
[maven-project-info-reports-plugin] 01/01: [MPIR-386] Add pluginRepositories (#13)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 7dcc5b3324fb8870f5b03c165940c04f01f43c5a Author: Eddie Wiegers AuthorDate: Thu Oct 31 09:26:51 2019 -0500 [MPIR-386] Add pluginRepositories (#13) --- .../maven/report/projectinfo/AbstractProjectInfoReport.java | 8 .../org/apache/maven/report/projectinfo/DependenciesReport.java | 1 + .../maven/report/projectinfo/DependencyManagementReport.java | 1 + .../maven/report/projectinfo/AbstractProjectInfoTestCase.java | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index a35cfa5..4e0efe8 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -133,6 +133,14 @@ public abstract class AbstractProjectInfoReport protected List remoteRepositories; /** + * Plugin repositories used for the project. + * + * @since 3.0.2 + */ +@Parameter( property = "project.pluginArtifactRepositories" ) +protected List pluginRepositories; + +/** * The reactor projects. * * @since 2.10 diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java index 02a531a..61c8b2d 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java @@ -142,6 +142,7 @@ public class DependenciesReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java index 9445a63..3b2a88f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java @@ -94,6 +94,7 @@ public class DependencyManagementReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java index cf8d2f3..01f04e5 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java +++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java @@ -187,8 +187,8 @@ public abstract class AbstractProjectInfoTestCase repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) ); setVariableValueToObject( mojo, "session", legacySupport.getSession() ); - setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() ); +setVariableValueToObject( mojo, "pluginRepositories", mojo.getProject().getPluginArtifactRepositories() ); return mojo; }
[maven-project-info-reports-plugin] 01/01: [MPIR-386] Add pluginRepositories
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git commit 8ad182d2252cd9b7ce860cb649d19987f63996e0 Author: Eddie Wiegers AuthorDate: Thu Oct 31 09:26:51 2019 -0500 [MPIR-386] Add pluginRepositories --- .../maven/report/projectinfo/AbstractProjectInfoReport.java | 8 .../org/apache/maven/report/projectinfo/DependenciesReport.java | 1 + .../maven/report/projectinfo/DependencyManagementReport.java | 1 + .../maven/report/projectinfo/AbstractProjectInfoTestCase.java | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java index a35cfa5..4e0efe8 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java @@ -133,6 +133,14 @@ public abstract class AbstractProjectInfoReport protected List remoteRepositories; /** + * Plugin repositories used for the project. + * + * @since 3.0.2 + */ +@Parameter( property = "project.pluginArtifactRepositories" ) +protected List pluginRepositories; + +/** * The reactor projects. * * @since 2.10 diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java index 02a531a..61c8b2d 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java @@ -142,6 +142,7 @@ public class DependenciesReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java index 9445a63..3b2a88f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java @@ -94,6 +94,7 @@ public class DependencyManagementReport new DefaultProjectBuildingRequest( getSession().getProjectBuildingRequest() ); buildingRequest.setLocalRepository( localRepository ); buildingRequest.setRemoteRepositories( remoteRepositories ); +buildingRequest.setPluginArtifactRepositories( pluginRepositories ); RepositoryUtils repoUtils = new RepositoryUtils( getLog(), projectBuilder, repositorySystem, resolver, diff --git a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java index cf8d2f3..01f04e5 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java +++ b/src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java @@ -187,8 +187,8 @@ public abstract class AbstractProjectInfoTestCase repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) ); setVariableValueToObject( mojo, "session", legacySupport.getSession() ); - setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() ); +setVariableValueToObject( mojo, "pluginRepositories", mojo.getProject().getPluginArtifactRepositories() ); return mojo; }
[maven-project-info-reports-plugin] branch MPIR-386 updated (09488ab -> 8ad182d)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MPIR-386 in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git. discard 09488ab [MPIR-386] Add pluginRepositories add c7acb57 [MPIR-385] Avoid adding mailto: prefix twice add 0537c1b Bump to 3.1.0-SNAPSHOT add db82c71 Fix checkstyle issues add 65e5224 [MPIR-387] make build Reproducible new 8ad182d [MPIR-386] Add pluginRepositories This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (09488ab) \ N -- N -- N refs/heads/MPIR-386 (8ad182d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml| 6 +++-- .../projectinfo/DependencyConvergenceReport.java | 27 +- .../report/projectinfo/MailingListsReport.java | 3 ++- .../report/projectinfo/ProjectInfoReportUtils.java | 2 -- .../maven/report/projectinfo/TeamReport.java | 3 --- .../renderer/DependenciesRenderer.java | 5 ++-- .../report/projectinfo/MailingListsReportTest.java | 2 +- .../plugin-configs/mailing-lists-plugin-config.xml | 2 +- 8 files changed, 21 insertions(+), 29 deletions(-)
[maven-artifact-transfer] branch master updated (a2505ed -> 662c7d6)
This is an automated email from the ASF dual-hosted git repository. elharo pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/maven-artifact-transfer.git. from a2505ed Implement Maven dependency collector to wrap Aether functionality. new 8991ad3 Remove unused method new c3bc641 Remove unused private field new 20593dd No need to use FQN for imported types new 5fa6e60 Remove unused formal parameter new 49b6032 Remove unused formal parameter new 842996f Remove unused formal parameter new a6edb03 Remove unused method new 3338744 Remove unused field new 662c7d6 Merge pull request #9 from pzygielo/unused The 201 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../deploy/internal/Maven30ArtifactDeployer.java | 2 +- .../deploy/internal/Maven31ArtifactDeployer.java | 2 +- .../shared/transfer/collection/CollectRequest.java | 2 +- .../internal/DefaultDependencyResolver.java| 10 +++ .../internal/Maven30DependencyResolver.java| 9 +++ .../Maven30DependencyResolverException.java| 3 --- .../internal/Maven31DependencyResolver.java| 9 +++ .../metadata/internal/Maven31MetadataBridge.java | 4 +-- .../deploy/internal/DefaultProjectDeployer.java| 31 -- 9 files changed, 16 insertions(+), 56 deletions(-)
[maven-integration-testing] 01/01: [MNG-6772] Prove Super POM central entry won't override
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch MNG-6772 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git commit 2abc8e5afb676bce68294a39bb2df8e506cdc128 Author: Eddie Wiegers AuthorDate: Thu Oct 3 14:28:11 2019 -0500 [MNG-6772] Prove Super POM central entry won't override --- .../org/apache/maven/it/IntegrationTestSuite.java | 1 + ...mng6772NestedImportScopeRepositoryOverride.java | 95 ++ .../pom-template.xml | 50 .../org/apache/maven/its/mng6772/a/0.1/a-0.1.pom | 41 ++ .../org/apache/maven/its/mng6772/b/0.1/b-0.1.pom | 39 + .../its/mng6772/dependency/0.1/dependency-0.1.pom | 41 ++ .../settings-override.xml | 23 ++ .../mng-6772-override-in-project/pom-template.xml | 53 .../org/apache/maven/its/mng6772/a/0.1/a-0.1.pom | 41 ++ .../org/apache/maven/its/mng6772/b/0.1/b-0.1.pom | 39 + .../settings-override.xml | 23 ++ 11 files changed, 446 insertions(+) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index 87b948e..17506b2 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -107,6 +107,7 @@ public class IntegrationTestSuite // - // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 +suite.addTestSuite( MavenITmng6772NestedImportScopeRepositoryOverride.class ); suite.addTestSuite( MavenITmng5669ReadPomsOnce.class ); suite.addTestSuite( MavenITmng6071GetResourceWithCustomPom.class ); suite.addTestSuite( MavenITmng6759TransitiveDependencyRepositoriesTest.class ); diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java new file mode 100644 index 000..d4c3718 --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java @@ -0,0 +1,95 @@ +package org.apache.maven.it; + +import java.io.File; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.maven.it.util.ResourceExtractor; + +/** + * This is a test set for https://issues.apache.org/jira/browse/MNG-6772;>MNG-6772: + * + * The test POM references an import scope POM, which also has a dependency on an import scope POM. + * + * Both import POMs can only be found in the repository defined in the test POM. + * It has a parent POM that defines the same repository with a different location. + * The test confirms that the dominant repository definition (child) wins while resolving the import POMs. + * + */ +public class MavenITmng6772NestedImportScopeRepositoryOverride +extends AbstractMavenIntegrationTestCase +{ + +public MavenITmng6772NestedImportScopeRepositoryOverride() +{ +super( "(3.6.2,)" ); +} + +// This will test the behavior using ProjectModelResolver +public void testitInProject() +throws Exception +{ +final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6772-override-in-project" ); + +final Verifier verifier = newVerifier( testDir.getAbsolutePath(), null ); +overrideGlobalSettings( testDir, verifier ); +verifier.deleteArtifacts( "org.apache.maven.its.mng6772" ); + +verifier.filterFile( "pom-template.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() ); + +verifier.executeGoal( "validate" ); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +} + +// This will test the behavior using DefaultModelResolver +public void testitInDependency() +throws Exception +{
[maven-integration-testing] branch MNG-6772 created (now 2abc8e5)
This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a change to branch MNG-6772 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git. at 2abc8e5 [MNG-6772] Prove Super POM central entry won't override This branch includes the following new commits: new 2abc8e5 [MNG-6772] Prove Super POM central entry won't override The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-shade-plugin] 01/01: MSHADE-353 adding a generic relocation friendly transformer delegating to other transformers the actual processing
This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a commit to branch rmannibucau/MSHADE-353-ensure-relocations-can-be-applied-to-any-transformer in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git commit 1840449b2cb73de77843fa5277ffec6f4d686b2f Author: Romain Manni-Bucau AuthorDate: Thu Mar 5 14:21:19 2020 +0100 MSHADE-353 adding a generic relocation friendly transformer delegating to other transformers the actual processing --- .../shade/resource/BaseRelocatingTransformer.java | 46 + .../resource/ManifestResourceTransformer.java | 18 +--- .../shade/resource/RelocationTransformer.java | 106 + src/site/apt/examples/resource-transformers.apt.vm | 43 - .../shade/resource/RelocationTransformerTest.java | 75 +++ 5 files changed, 270 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/shade/resource/BaseRelocatingTransformer.java b/src/main/java/org/apache/maven/plugins/shade/resource/BaseRelocatingTransformer.java new file mode 100644 index 000..4e57aee --- /dev/null +++ b/src/main/java/org/apache/maven/plugins/shade/resource/BaseRelocatingTransformer.java @@ -0,0 +1,46 @@ +package org.apache.maven.plugins.shade.resource; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.List; + +import org.apache.maven.plugins.shade.relocation.Relocator; + +/** + * Abstract class providing the needed logic to relocate any content. + */ +public abstract class BaseRelocatingTransformer implements ResourceTransformer +{ +protected String relocate( String originalValue, List relocators ) +{ +String newValue = originalValue; +for ( Relocator relocator : relocators ) +{ +String value; +do +{ +value = newValue; +newValue = relocator.relocateClass( value ); +} +while ( !value.equals( newValue ) ); +} +return newValue; +} +} diff --git a/src/main/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformer.java b/src/main/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformer.java index 688078c..82b98e7 100644 --- a/src/main/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformer.java +++ b/src/main/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformer.java @@ -41,7 +41,7 @@ import org.apache.maven.plugins.shade.relocation.Relocator; * @since 1.2 */ public class ManifestResourceTransformer -implements ResourceTransformer +extends BaseRelocatingTransformer { private final List defaultAttributes = Arrays.asList( "Export-Package", "Import-Package", @@ -163,20 +163,4 @@ public class ManifestResourceTransformer jos.putNextEntry( new JarEntry( JarFile.MANIFEST_NAME ) ); manifest.write( jos ); } - -private String relocate( String originalValue, List relocators ) -{ -String newValue = originalValue; -for ( Relocator relocator : relocators ) -{ -String value; -do -{ -value = newValue; -newValue = relocator.relocateClass( value ); -} -while ( !value.equals( newValue ) ); -} -return newValue; -} } diff --git a/src/main/java/org/apache/maven/plugins/shade/resource/RelocationTransformer.java b/src/main/java/org/apache/maven/plugins/shade/resource/RelocationTransformer.java new file mode 100644 index 000..40acb9d --- /dev/null +++ b/src/main/java/org/apache/maven/plugins/shade/resource/RelocationTransformer.java @@ -0,0 +1,106 @@ +package org.apache.maven.plugins.shade.resource; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use
[maven-shade-plugin] branch rmannibucau/MSHADE-353-ensure-relocations-can-be-applied-to-any-transformer created (now 1840449)
This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a change to branch rmannibucau/MSHADE-353-ensure-relocations-can-be-applied-to-any-transformer in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git. at 1840449 MSHADE-353 adding a generic relocation friendly transformer delegating to other transformers the actual processing This branch includes the following new commits: new 1840449 MSHADE-353 adding a generic relocation friendly transformer delegating to other transformers the actual processing The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.