[maven-shade-plugin] branch master updated: [MSHADE-327] improved integration test coverage for relocation and minification (#27)

2019-09-11 Thread olamy
This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git


The following commit(s) were added to refs/heads/master by this push:
 new b68b24c  [MSHADE-327] improved integration test coverage for 
relocation and minification (#27)
b68b24c is described below

commit b68b24c10ed0e57ce32c19248cfb38bd6c52d174
Author: Torsten Curdt 
AuthorDate: Wed Sep 11 23:19:26 2019 +0200

[MSHADE-327] improved integration test coverage for relocation and 
minification (#27)

* adds an integration test that verifies relocation and minifying work 
together

* reference the jira issue

* upgraded to latest jdependency version 2.3.0,
added me to the list of contributors

* removed me as author
---
 pom.xml|  5 +-
 src/it/reloc-and-mini/invoker.properties   | 18 +
 src/it/reloc-and-mini/pom.xml  | 77 ++
 .../org/apache/maven/plugins/shade/its/App.java| 31 +
 src/it/reloc-and-mini/verify.bsh   | 50 ++
 .../maven/plugins/shade/filter/MinijarFilter.java  |  2 -
 6 files changed, 180 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index a01019b..d387e07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,6 +84,9 @@
 
   Markus Karg
 
+
+  Torsten Curdt
+
   
 
   
@@ -156,7 +159,7 @@
 
   org.vafer
   jdependency
-  2.1.1
+  2.3.0
 
 
   org.codehaus.plexus
diff --git a/src/it/reloc-and-mini/invoker.properties 
b/src/it/reloc-and-mini/invoker.properties
new file mode 100644
index 000..dd70de3
--- /dev/null
+++ b/src/it/reloc-and-mini/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.java.version = 1.8+
diff --git a/src/it/reloc-and-mini/pom.xml b/src/it/reloc-and-mini/pom.xml
new file mode 100644
index 000..2227b80
--- /dev/null
+++ b/src/it/reloc-and-mini/pom.xml
@@ -0,0 +1,77 @@
+
+
+
+
+  4.0.0
+
+  
+org.apache.maven.plugins.shade.its
+shade-parent
+1.0
+../setup-parent
+  
+
+  org.apache.maven.its.shade.mini
+  test
+  1.0
+  jar
+
+  MSHADE-327
+  
+Test handling of relocations and minification.
+  
+
+  
+
+  junit
+  junit
+  3.8.2
+
+  
+
+  
+
+  
+org.apache.maven.plugins
+maven-shade-plugin
+@project.version@
+
+  
+attach-shade
+package
+
+  shade
+
+
+  true
+  false
+  
+
+  junit.framework
+  a.junit.framework
+
+  
+
+  
+
+  
+
+  
+
diff --git 
a/src/it/reloc-and-mini/src/main/java/org/apache/maven/plugins/shade/its/App.java
 
b/src/it/reloc-and-mini/src/main/java/org/apache/maven/plugins/shade/its/App.java
new file mode 100644
index 000..7ff0233
--- /dev/null
+++ 
b/src/it/reloc-and-mini/src/main/java/org/apache/maven/plugins/shade/its/App.java
@@ -0,0 +1,31 @@
+package org.apache.maven.plugins.shade.its;
+
+/*
+ * 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 junit.framework.TestResult;
+
+public class App
+{
+public static void main( String[] args )
+{
+TestResult result = 

[maven-dependency-plugin] branch MDEP-204 created (now 9eb1987)

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MDEP-204
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


  at 9eb1987  Replace CapturingLog class with Mockito usage

No new revisions were added by this update.



[maven-dependency-plugin] branch master updated (79939b5 -> 9eb1987)

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


from 79939b5  [MDEP-655] - The unpack integration test fails intermittent.
 new 28e4e02  Add integration test that verifies the bug is fixed
 new b0ee420  Ensure integration test uses latest plugin version
 new 3e39ea4  Rewrite go-offline so it resembles resolve-plugins
 new b489c8a  Add unit test for the ExcludeReactorProjectsArtifactFilter
 new 0b34f0a  Move license block the correct place
 new 01decd0  Perform transformation to artifact keys just once
 new 7b6dbfd  Don't replace original author
 new 9eb1987  Replace CapturingLog class with Mockito usage

The 8 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|   9 ++
 .../invoker.properties |   0
 .../module-1/pom.xml}  |  22 ++-
 .../module-2/pom.xml}  |  22 ++-
 .../pom.xml|  29 ++--
 .../dependency/resolvers/AbstractResolveMojo.java  |  41 ++---
 .../ExcludeReactorProjectsArtifactFilter.java  |  94 
 .../dependency/resolvers/GoOfflineMojo.java| 100 +++--
 .../dependency/resolvers/ResolvePluginsMojo.java   |   2 +-
 .../apache/maven/plugins/dependency/TestSkip.java  | 166 ++---
 .../ExcludeReactorProjectsArtifactFilterTest.java  | 101 +
 11 files changed, 367 insertions(+), 219 deletions(-)
 copy src/it/projects/{go-offline => 
mdep-204-go-offline-resolve-intermodule}/invoker.properties (100%)
 copy src/it/{mrm/repository/ResourceArtifact-1.0.pom => 
projects/mdep-204-go-offline-resolve-intermodule/module-1/pom.xml} (69%)
 copy src/it/{mrm/repository/ResourceArtifact-1.0.pom => 
projects/mdep-204-go-offline-resolve-intermodule/module-2/pom.xml} (69%)
 copy src/it/projects/{copy-from-reactor/child-a => 
mdep-204-go-offline-resolve-intermodule}/pom.xml (71%)
 create mode 100644 
src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
 create mode 100644 
src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilterTest.java



[maven-dependency-plugin] 05/08: Move license block the correct place

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 0b34f0ac3ec7243146d3ca1889fd2d1531157431
Author: Maarten Mulders 
AuthorDate: Fri Sep 6 15:31:34 2019 +0200

Move license block the correct place
---
 .../maven/plugins/dependency/CapturingLog.java | 10 
 .../ExcludeReactorProjectsArtifactFilterTest.java  | 28 +++---
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git 
a/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java 
b/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
index 089fa69..4506823 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
@@ -1,10 +1,5 @@
 package org.apache.maven.plugins.dependency;
 
-import org.apache.maven.plugin.logging.Log;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,6 +19,11 @@ import java.io.StringWriter;
  * under the License.
  */
 
+import org.apache.maven.plugin.logging.Log;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
 /** Helper to do assertions on what is being logged. */
 public class CapturingLog
 implements Log
diff --git 
a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilterTest.java
 
b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilterTest.java
index 65b35f6..8d83f55 100644
--- 
a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilterTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilterTest.java
@@ -1,19 +1,5 @@
 package org.apache.maven.plugins.dependency.resolvers;
 
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.testing.stubs.ArtifactStub;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-import org.apache.maven.plugins.dependency.AbstractDependencyMojoTestCase;
-import org.apache.maven.plugins.dependency.CapturingLog;
-import org.apache.maven.project.MavenProject;
-import 
org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import static java.util.Collections.singleton;
-import static java.util.Collections.singletonList;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -33,6 +19,20 @@ import static java.util.Collections.singletonList;
  * under the License.
  */
 
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.testing.stubs.ArtifactStub;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.plugins.dependency.AbstractDependencyMojoTestCase;
+import org.apache.maven.plugins.dependency.CapturingLog;
+import org.apache.maven.project.MavenProject;
+import 
org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import static java.util.Collections.singleton;
+import static java.util.Collections.singletonList;
+
 public class ExcludeReactorProjectsArtifactFilterTest
 extends AbstractDependencyMojoTestCase
 {



[maven-dependency-plugin] 03/08: Rewrite go-offline so it resembles resolve-plugins

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 3e39ea46f8caf8b94006dda703bce87d84de03bf
Author: Maarten Mulders 
AuthorDate: Sun Sep 1 22:07:27 2019 +0200

Rewrite go-offline so it resembles resolve-plugins
---
 .../dependency/resolvers/AbstractResolveMojo.java  | 41 +++--
 .../ExcludeReactorProjectsArtifactFilter.java  | 95 +
 .../dependency/resolvers/GoOfflineMojo.java| 99 +++---
 .../dependency/resolvers/ResolvePluginsMojo.java   |  2 +-
 4 files changed, 195 insertions(+), 42 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
index 6947b59..e63db81 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
@@ -27,12 +27,12 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugins.annotations.Parameter;
 import 
org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo;
 import org.apache.maven.plugins.dependency.utils.DependencyUtil;
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.shared.artifact.filter.collection.ArtifactIdFilter;
 import org.apache.maven.shared.artifact.filter.collection.ClassifierFilter;
 import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
 import org.apache.maven.shared.artifact.filter.collection.GroupIdFilter;
+import org.apache.maven.shared.artifact.filter.collection.ScopeFilter;
 import org.apache.maven.shared.artifact.filter.collection.TypeFilter;
 import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
 import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
@@ -72,7 +72,7 @@ public abstract class AbstractResolveMojo
 protected boolean appendOutput;
 
 /**
- * Don't resolve plugins that are in the current reactor. Only works for 
plugins at the moment.
+ * Don't resolve plugins that are in the current reactor.
  *
  * @since 2.7
  */
@@ -94,40 +94,19 @@ public abstract class AbstractResolveMojo
 /**
  * @return {@link FilterArtifacts}
  */
-protected FilterArtifacts getPluginArtifactsFilter()
+protected FilterArtifacts getArtifactsFilter()
 {
+final FilterArtifacts filter = new FilterArtifacts();
+
 if ( excludeReactor )
 {
-final StringBuilder exAids = new StringBuilder();
-if ( this.excludeArtifactIds != null )
-{
-exAids.append( this.excludeArtifactIds );
-}
-
-for ( final MavenProject rp : reactorProjects )
-{
-if ( !"maven-plugin".equals( rp.getPackaging() ) )
-{
-continue;
-}
-
-if ( exAids.length() > 0 )
-{
-exAids.append( "," );
-}
-
-exAids.append( rp.getArtifactId() );
-}
-
-this.excludeArtifactIds = exAids.toString();
-}
 
-final FilterArtifacts filter = new FilterArtifacts();
+filter.addFilter( new ExcludeReactorProjectsArtifactFilter( 
reactorProjects, getLog() ) );
+
+}
 
-//CHECKSTYLE_OFF: LineLength
-filter.addFilter( new 
org.apache.maven.shared.artifact.filter.collection.ScopeFilter( 
DependencyUtil.cleanToBeTokenizedString( this.includeScope ),
-   
   DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );
-//CHECKSTYLE_ON: LineLength
+filter.addFilter( new ScopeFilter( 
DependencyUtil.cleanToBeTokenizedString( this.includeScope ),
+   
DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );
 
 filter.addFilter( new TypeFilter( 
DependencyUtil.cleanToBeTokenizedString( this.includeTypes ),
   
DependencyUtil.cleanToBeTokenizedString( this.excludeTypes ) ) );
diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
new file mode 100644
index 000..fbeda30
--- /dev/null
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
@@ -0,0 +1,95 @@
+package org.apache.maven.plugins.dependency.resolvers;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor 

[maven-dependency-plugin] 01/08: Add integration test that verifies the bug is fixed

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 28e4e02058558324b64616e443572a621da80578
Author: Maarten Mulders 
AuthorDate: Thu Aug 22 08:38:58 2019 +0200

Add integration test that verifies the bug is fixed
---
 pom.xml|  3 ++
 .../invoker.properties | 18 
 .../module-1/pom.xml   | 42 +++
 .../module-2/pom.xml   | 42 +++
 .../pom.xml| 48 ++
 5 files changed, 153 insertions(+)

diff --git a/pom.xml b/pom.xml
index 40d9a53..c6e5fca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,6 +83,9 @@ under the License.
 
   Markus Karg
 
+
+  Maarten Mulders
+
   
 
   
diff --git 
a/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties 
b/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties
new file mode 100644
index 000..bba350b
--- /dev/null
+++ b/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = dependency:go-offline
diff --git 
a/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-1/pom.xml 
b/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-1/pom.xml
new file mode 100644
index 000..94f4dea
--- /dev/null
+++ b/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-1/pom.xml
@@ -0,0 +1,42 @@
+
+
+
+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;>
+4.0.0
+
+
+org.apache.maven.its.dependency
+test-mdep-204
+1.0-SNAPSHOT
+
+test-sub-1
+MDEP-204 / Sub-module 1
+
+
+
+org.apache.maven
+maven-project
+2.2.1
+
+
+
+
diff --git 
a/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-2/pom.xml 
b/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-2/pom.xml
new file mode 100644
index 000..7fa4c20
--- /dev/null
+++ b/src/it/projects/mdep-204-go-offline-resolve-intermodule/module-2/pom.xml
@@ -0,0 +1,42 @@
+
+
+
+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;>
+4.0.0
+
+
+org.apache.maven.its.dependency
+test-mdep-204
+1.0-SNAPSHOT
+
+test-sub-2
+MDEP-204 / Sub-module 2
+
+
+
+org.apache.maven.its.dependency
+test-sub-1
+1.0-SNAPSHOT
+
+
+
+
diff --git a/src/it/projects/mdep-204-go-offline-resolve-intermodule/pom.xml 
b/src/it/projects/mdep-204-go-offline-resolve-intermodule/pom.xml
new file mode 100644
index 000..fc70f99
--- /dev/null
+++ b/src/it/projects/mdep-204-go-offline-resolve-intermodule/pom.xml
@@ -0,0 +1,48 @@
+
+
+
+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;>
+4.0.0
+
+org.apache.maven.its.dependency
+test-mdep-204
+1.0-SNAPSHOT
+pom
+
+MDEP-204
+
+Test dependency:go-offline for multi-module projects
+
+
+
+module-1
+module-2
+
+
+
+UTF-8
+
+
+
+
+
+



[maven-dependency-plugin] 04/08: Add unit test for the ExcludeReactorProjectsArtifactFilter

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit b489c8a4ba121ecc72a78eec9afcbfea6c0ba882
Author: Maarten Mulders 
AuthorDate: Mon Sep 2 21:26:38 2019 +0200

Add unit test for the ExcludeReactorProjectsArtifactFilter
---
 .../maven/plugins/dependency/CapturingLog.java | 179 +
 .../apache/maven/plugins/dependency/TestSkip.java  | 156 --
 .../ExcludeReactorProjectsArtifactFilterTest.java  |  88 ++
 3 files changed, 267 insertions(+), 156 deletions(-)

diff --git 
a/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java 
b/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
new file mode 100644
index 000..089fa69
--- /dev/null
+++ b/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
@@ -0,0 +1,179 @@
+package org.apache.maven.plugins.dependency;
+
+import org.apache.maven.plugin.logging.Log;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/*
+ * 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.
+ */
+
+/** Helper to do assertions on what is being logged. */
+public class CapturingLog
+implements Log
+{
+StringBuilder sb = new StringBuilder();
+
+/** {@inheritDoc} */
+public void debug( CharSequence content )
+{
+print( "debug", content );
+}
+
+/** {@inheritDoc} */
+public void debug( CharSequence content, Throwable error )
+{
+print( "debug", content, error );
+}
+
+/** {@inheritDoc} */
+public void debug( Throwable error )
+{
+print( "debug", error );
+}
+
+/** {@inheritDoc} */
+public void info( CharSequence content )
+{
+print( "info", content );
+}
+
+/** {@inheritDoc} */
+public void info( CharSequence content, Throwable error )
+{
+print( "info", content, error );
+}
+
+/** {@inheritDoc} */
+public void info( Throwable error )
+{
+print( "info", error );
+}
+
+/** {@inheritDoc} */
+public void warn( CharSequence content )
+{
+print( "warn", content );
+}
+
+/** {@inheritDoc} */
+public void warn( CharSequence content, Throwable error )
+{
+print( "warn", content, error );
+}
+
+/** {@inheritDoc} */
+public void warn( Throwable error )
+{
+print( "warn", error );
+}
+
+/** {@inheritDoc} */
+public void error( CharSequence content )
+{
+System.err.println( "[error] " + content.toString() );
+}
+
+/** {@inheritDoc} */
+public void error( CharSequence content, Throwable error )
+{
+StringWriter sWriter = new StringWriter();
+PrintWriter pWriter = new PrintWriter( sWriter );
+
+error.printStackTrace( pWriter );
+
+System.err.println( "[error] " + content.toString() + 
System.lineSeparator() + System.lineSeparator() + sWriter.toString() );
+}
+
+/**
+ * @see Log#error(Throwable)
+ */
+public void error( Throwable error )
+{
+StringWriter sWriter = new StringWriter();
+PrintWriter pWriter = new PrintWriter( sWriter );
+
+error.printStackTrace( pWriter );
+
+System.err.println( "[error] " + sWriter.toString() );
+}
+
+/**
+ * @see Log#isDebugEnabled()
+ */
+public boolean isDebugEnabled()
+{
+// TODO: Not sure how best to set these for this implementation...
+return true;
+}
+
+/**
+ * @see Log#isInfoEnabled()
+ */
+public boolean isInfoEnabled()
+{
+return true;
+}
+
+/**
+ * @see Log#isWarnEnabled()
+ */
+public boolean isWarnEnabled()
+{
+return true;
+}
+
+/**
+ * @see Log#isErrorEnabled()
+ */
+public boolean isErrorEnabled()
+{
+return true;
+}
+
+private void print( String prefix, CharSequence content )
+{
+sb.append( "[" ).append( prefix ).append( "] " ).append( 
content.toString() ).append( System.lineSeparator() );
+}
+
+private void print( String prefix, Throwable error )
+{
+

[maven-dependency-plugin] 02/08: Ensure integration test uses latest plugin version

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit b0ee4207a8516dec5eaedac7b1969b0d7ff59d68
Author: Maarten Mulders 
AuthorDate: Sun Sep 1 22:01:44 2019 +0200

Ensure integration test uses latest plugin version
---
 .../projects/mdep-204-go-offline-resolve-intermodule/invoker.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties 
b/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties
index bba350b..e596121 100644
--- a/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties
+++ b/src/it/projects/mdep-204-go-offline-resolve-intermodule/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-invoker.goals = dependency:go-offline
+invoker.goals = 
${project.groupId}:${project.artifactId}:${project.version}:go-offline



[maven-dependency-plugin] 08/08: Replace CapturingLog class with Mockito usage

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 9eb19876491c3f9c069b8acacabdad4a49a0f940
Author: Maarten Mulders 
AuthorDate: Mon Sep 9 07:29:57 2019 +0200

Replace CapturingLog class with Mockito usage
---
 pom.xml|   6 +
 .../maven/plugins/dependency/CapturingLog.java | 179 -
 .../apache/maven/plugins/dependency/TestSkip.java  |  12 +-
 .../ExcludeReactorProjectsArtifactFilterTest.java  |  21 ++-
 4 files changed, 33 insertions(+), 185 deletions(-)

diff --git a/pom.xml b/pom.xml
index c6e5fca..35c1ac5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -282,6 +282,12 @@ under the License.
   ${pluginTestingVersion}
   test
 
+
+  org.mockito
+  mockito-core
+  2.28.2
+  test
+
 

   org.codehaus.plexus
diff --git 
a/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java 
b/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
deleted file mode 100644
index 4506823..000
--- a/src/test/java/org/apache/maven/plugins/dependency/CapturingLog.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.apache.maven.plugins.dependency;
-
-/*
- * 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.plugin.logging.Log;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/** Helper to do assertions on what is being logged. */
-public class CapturingLog
-implements Log
-{
-StringBuilder sb = new StringBuilder();
-
-/** {@inheritDoc} */
-public void debug( CharSequence content )
-{
-print( "debug", content );
-}
-
-/** {@inheritDoc} */
-public void debug( CharSequence content, Throwable error )
-{
-print( "debug", content, error );
-}
-
-/** {@inheritDoc} */
-public void debug( Throwable error )
-{
-print( "debug", error );
-}
-
-/** {@inheritDoc} */
-public void info( CharSequence content )
-{
-print( "info", content );
-}
-
-/** {@inheritDoc} */
-public void info( CharSequence content, Throwable error )
-{
-print( "info", content, error );
-}
-
-/** {@inheritDoc} */
-public void info( Throwable error )
-{
-print( "info", error );
-}
-
-/** {@inheritDoc} */
-public void warn( CharSequence content )
-{
-print( "warn", content );
-}
-
-/** {@inheritDoc} */
-public void warn( CharSequence content, Throwable error )
-{
-print( "warn", content, error );
-}
-
-/** {@inheritDoc} */
-public void warn( Throwable error )
-{
-print( "warn", error );
-}
-
-/** {@inheritDoc} */
-public void error( CharSequence content )
-{
-System.err.println( "[error] " + content.toString() );
-}
-
-/** {@inheritDoc} */
-public void error( CharSequence content, Throwable error )
-{
-StringWriter sWriter = new StringWriter();
-PrintWriter pWriter = new PrintWriter( sWriter );
-
-error.printStackTrace( pWriter );
-
-System.err.println( "[error] " + content.toString() + 
System.lineSeparator() + System.lineSeparator() + sWriter.toString() );
-}
-
-/**
- * @see Log#error(Throwable)
- */
-public void error( Throwable error )
-{
-StringWriter sWriter = new StringWriter();
-PrintWriter pWriter = new PrintWriter( sWriter );
-
-error.printStackTrace( pWriter );
-
-System.err.println( "[error] " + sWriter.toString() );
-}
-
-/**
- * @see Log#isDebugEnabled()
- */
-public boolean isDebugEnabled()
-{
-// TODO: Not sure how best to set these for this implementation...
-return true;
-}
-
-/**
- * @see Log#isInfoEnabled()
- */
-public boolean isInfoEnabled()
-{
-return true;
-}
-
-/**
- * @see Log#isWarnEnabled()
- */
-public boolean isWarnEnabled()
-{
-return true;
-}
-
-/**
- * @see Log#isErrorEnabled()
- */
-public boolean 

[maven-dependency-plugin] 06/08: Perform transformation to artifact keys just once

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 01decd08e7f067592e25570f8f480dd2af1dc782
Author: Maarten Mulders 
AuthorDate: Fri Sep 6 15:32:11 2019 +0200

Perform transformation to artifact keys just once
---
 .../resolvers/ExcludeReactorProjectsArtifactFilter.java  | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
index fbeda30..4c57ca5 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
@@ -40,15 +40,15 @@ import java.util.Set;
 public class ExcludeReactorProjectsArtifactFilter extends 
AbstractArtifactsFilter
 {
 private final Log log;
-private final Set reactorArtifacts;
+private final Set reactorArtifactKeys;
 
 public ExcludeReactorProjectsArtifactFilter( final List 
reactorProjects, final Log log )
 {
 this.log = log;
-this.reactorArtifacts = new HashSet<>( reactorProjects.size() );
+this.reactorArtifactKeys = new HashSet<>( reactorProjects.size() );
 for ( final MavenProject project : reactorProjects )
 {
-this.reactorArtifacts.add( project.getArtifact() );
+this.reactorArtifactKeys.add( ArtifactUtils.key( 
project.getArtifact() ) );
 }
 }
 
@@ -79,9 +79,8 @@ public class ExcludeReactorProjectsArtifactFilter extends 
AbstractArtifactsFilte
 
 private boolean isArtifactInReactor( final Artifact artifact )
 {
-for ( final Artifact reactorArtifact : reactorArtifacts )
+for ( final String reactorArtifactKey : this.reactorArtifactKeys )
 {
-final String reactorArtifactKey = ArtifactUtils.key( 
reactorArtifact );
 final String artifactKey = ArtifactUtils.key( artifact );
 
 // This check only includes GAV. Should we take a look at the 
types, too?



[maven-dependency-plugin] 07/08: Don't replace original author

2019-09-11 Thread rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 7b6dbfd646945ef46412391c357bc3b4eb6f3978
Author: Maarten Mulders 
AuthorDate: Fri Sep 6 15:32:26 2019 +0200

Don't replace original author
---
 .../org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
index 408f9ab..9309801 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
@@ -36,6 +36,7 @@ import java.util.Set;
 /**
  * Goal that resolves all project dependencies, including plugins and reports 
and their dependencies.
  *
+ * mailto:bri...@apache.org;>Brian Fox
  * @author Maarten Mulders
  * @since 2.0
  */



[maven-surefire] branch master updated: typo-fix

2019-09-11 Thread tibordigana
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 f39ab02  typo-fix
f39ab02 is described below

commit f39ab021a100eb046042c1676009462c9f1673fb
Author: josephpeacock <51184065+josephpeac...@users.noreply.github.com>
AuthorDate: Wed Sep 11 10:10:48 2019 -0700

typo-fix

Spotted a minor typo in docs, changing lover -> lower
---
 maven-surefire-plugin/src/site/apt/examples/skip-after-failure.apt.vm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/maven-surefire-plugin/src/site/apt/examples/skip-after-failure.apt.vm 
b/maven-surefire-plugin/src/site/apt/examples/skip-after-failure.apt.vm
index 06ed150..258f88b 100644
--- a/maven-surefire-plugin/src/site/apt/examples/skip-after-failure.apt.vm
+++ b/maven-surefire-plugin/src/site/apt/examples/skip-after-failure.apt.vm
@@ -44,7 +44,7 @@ Prerequisite
  Use ${project.artifactId} 2.19 or higher, JUnit 4.0 or higher, or 
  TestNG 5.10 or higher.
  
- If version of TestNG is lover than 5.10 while the parameter 
+ If version of TestNG is lower than 5.10 while the parameter 
  <<>> is set, the plugin fails with error:
  
  <<<[ERROR] Failed to execute goal ...: Parameter "skipAfterFailureCount"
@@ -53,7 +53,7 @@ Prerequisite
 
  
  
- If version of JUnit is lover than 4.0 while the parameter 
+ If version of JUnit is lower than 4.0 while the parameter 
  <<>> is set, the plugin fails with error:
  
  <<<[ERROR] Failed to execute goal ...: Parameter "skipAfterFailureCount"