This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MSHADE-313 in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git
commit c22949b0cd54148e894ba9f64676a77fe4f05dc1 Author: Markus KARG <mar...@headcrashing.eu> AuthorDate: Mon Apr 1 19:45:13 2019 +0200 Keeping services always --- src/it/MSHADE-313/pom.xml | 1 - .../apache/maven/plugins/shade/filter/MinijarFilter.java | 11 +++-------- .../java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java | 13 +------------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/it/MSHADE-313/pom.xml b/src/it/MSHADE-313/pom.xml index ac8310a..4772be8 100644 --- a/src/it/MSHADE-313/pom.xml +++ b/src/it/MSHADE-313/pom.xml @@ -67,7 +67,6 @@ under the License. <configuration> <shadedArtifactAttached>false</shadedArtifactAttached> <minimizeJar>true</minimizeJar> - <keepServices>true</keepServices> </configuration> </execution> </executions> diff --git a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java index 0029a34..cab8861 100644 --- a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java +++ b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java @@ -79,18 +79,17 @@ public class MinijarFilter public MinijarFilter( MavenProject project, Log log ) throws IOException { - this( project, log, Collections.<SimpleFilter>emptyList(), false ); + this( project, log, Collections.<SimpleFilter>emptyList() ); } /** * @param project {@link MavenProject} * @param log {@link Log} * @param simpleFilters {@link SimpleFilter} - * @param keepServices don't eliminate classes needed by {@code META-INF/services} * @throws IOException in case of errors. * @since 1.6 */ - public MinijarFilter( MavenProject project, Log log, List<SimpleFilter> simpleFilters, final boolean keepServices ) + public MinijarFilter( MavenProject project, Log log, List<SimpleFilter> simpleFilters ) throws IOException { this.log = log; @@ -118,11 +117,7 @@ public class MinijarFilter removable.removeAll( artifactUnit.getTransitiveDependencies() ); removeSpecificallyIncludedClasses( project, simpleFilters == null ? Collections.<SimpleFilter>emptyList() : simpleFilters ); - - if ( keepServices ) - { - removeServices( project, cp ); - } + removeServices( project, cp ); } } diff --git a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java index 48a4874..c99ed42 100644 --- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java +++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java @@ -332,17 +332,6 @@ public class ShadeMojo private boolean minimizeJar; /** - * When {@code true}, classes will be safe from getting stripped down by {@code minimizeJar} if they are - * services (i. e. referenced by a text file contained in {@code META-INF/services}. - * - * @see #minimizeJar - * - * @since 3.2.2 - */ - @Parameter - private boolean keepServices; - - /** * The path to the output file for the shaded artifact. When this parameter is set, the created archive will neither * replace the project's main artifact nor will it be attached. Hence, this parameter causes the parameters * {@link #finalName}, {@link #shadedArtifactAttached}, {@link #shadedClassifierName} and @@ -832,7 +821,7 @@ public class ShadeMojo try { - filters.add( new MinijarFilter( project, getLog(), simpleFilters, keepServices ) ); + filters.add( new MinijarFilter( project, getLog(), simpleFilters ) ); } catch ( IOException e ) {