[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17115541#comment-17115541 ] Pavel Bekkerman commented on MSHADE-291: # I already figured out the reason for META-INF/spring.handlers to appear during the debug: when inheriting from # # > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17115398#comment-17115398 ] Pavel Bekkerman commented on MSHADE-291: I have been using 3.1.1 version of the plugin, until ran in that issue. Unfortunately, I have to report, the FIX is still NON-functional. Moreover, ServicesResourceTransformer seems to be broken completely in 3.2.2+(!) I tried 3.2.2, 3.2.3, and 3.3.0-SNAPSHOT built from the latest `master`. Whatever I do, I'm getting the following error message: {code:java} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.3.0-SNAPSHOT:shade (default) on project XXX: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.3.0-SNAPSHOT:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer -> [Help 1]{code} Here's the stack trace: {code:java} org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.2:shade (default) on project XXX: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.2.2:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformerorg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.2:shade (default) on project : Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.2.2:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.2.2:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:662) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:594) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 moreCaused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer at org.eclipse.sisu.plexus.CompositeBeanHelper.setProperty(CompositeBeanHelper.java:252) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:101) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:57) at org.codehaus.plexus.component.configurator.converters.composite.AbstractCollectionConverter.fromChildren(AbstractCollectionConverter.java:54) at org.codehaus.plexus.com
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17050645#comment-17050645 ] Jan Luehe commented on MSHADE-291: -- Confirmed the fix in the just-released 3.2.2. Thanks guys! > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17030095#comment-17030095 ] Robert Scholte commented on MSHADE-291: --- Plans are that for Java 14 we need to update ASM. This will happen within about 1.5 months, so we'd prefer to wait for that first. But yes, we are aware that we should do a release soon. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17030088#comment-17030088 ] Jan Luehe commented on MSHADE-291: -- Is there any update on the 3.2.2 release? > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16784684#comment-16784684 ] Robert Scholte commented on MSHADE-291: --- [~larmitage] even though [releasing|https://maven.apache.org/developers/release/maven-project-release-procedure.html] isn't that hard, the [voting|https://www.apache.org/foundation/voting.html] process will always claim time from several Maven PMC members. For that reason I prefer not to do releases for a single issue. However, if you manage to provide PRs for open issues of this plugin you increase the chance of a release. (in other words, I don't have an ETA for you) I expect using shadedPattern that doesn't contain the pattern is the workaround. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16784326#comment-16784326 ] Lyndon Armitage commented on MSHADE-291: What's the ETA on a release [~rfscholte]? And in the meantime what is the workaround? I have spent a few days struggling with some shading issues including this one and don't see why a patch level release hasn't been made yet. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693781#comment-16693781 ] Jan Luehe commented on MSHADE-291: -- Got it! Thank you for the explanation, [~rfscholte] > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693640#comment-16693640 ] Robert Scholte commented on MSHADE-291: --- [~jluehe] even though [releasing|https://maven.apache.org/developers/release/maven-project-release-procedure.html] isn't that hard, the [voting|https://www.apache.org/foundation/voting.html] process will always claim time from several Maven PMC members. For that reason I prefer not to do releases for a single issue. However, if you manage to provide PRs for open issues of this plugin you increase the chance of a release. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693601#comment-16693601 ] Jan Luehe commented on MSHADE-291: -- [~fabcipriano] and [~rfscholte], thank you for the fix! Would it be possible to make version 3.2.2 available at https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin? > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1, 3.2.0, 3.2.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.2 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683171#comment-16683171 ] Hudson commented on MSHADE-291: --- Build succeeded in Jenkins: Maven TLP » maven-shade-plugin » master #55 See https://builds.apache.org/job/maven-box/job/maven-shade-plugin/job/master/55/ > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Assignee: Robert Scholte >Priority: Major > Labels: up-for-grabs > Fix For: 3.2.1 > > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682822#comment-16682822 ] ASF GitHub Bot commented on MSHADE-291: --- rfscholte closed pull request #9: [MSHADE-291] - Fixes bug in ServicesResourceTransformer URL: https://github.com/apache/maven-shade-plugin/pull/9 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pom.xml b/pom.xml index 8fca8d3..cb10a84 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,9 @@ Anthony Dahanne + + Fabiano Cipriano de Oliveira + diff --git a/src/main/java/org/apache/maven/plugins/shade/resource/ServicesResourceTransformer.java b/src/main/java/org/apache/maven/plugins/shade/resource/ServicesResourceTransformer.java index f1cb9d6..d087522 100644 --- a/src/main/java/org/apache/maven/plugins/shade/resource/ServicesResourceTransformer.java +++ b/src/main/java/org/apache/maven/plugins/shade/resource/ServicesResourceTransformer.java @@ -138,20 +138,6 @@ public void modifyOutputStream( JarOutputStream jos ) while ( ( className = reader.readLine() ) != null ) { - -if ( relocators != null ) -{ -for ( Relocator relocator : relocators ) -{ -//if the class can be relocated then relocate it -if ( relocator.canRelocateClass( className ) ) -{ -className = relocator.applyToSourceContent( className ); -break; -} -} -} - writer.println( className ); writer.flush(); } diff --git a/src/test/java/org/apache/maven/plugins/shade/resource/ServiceResourceTransformerTest.java b/src/test/java/org/apache/maven/plugins/shade/resource/ServiceResourceTransformerTest.java index a9f78db..18dab2f 100644 --- a/src/test/java/org/apache/maven/plugins/shade/resource/ServiceResourceTransformerTest.java +++ b/src/test/java/org/apache/maven/plugins/shade/resource/ServiceResourceTransformerTest.java @@ -89,6 +89,50 @@ public void relocatedClasses() throws Exception { tempJar.delete(); } } + +@Test +public void concatanationAppliedMultipleTimes() throws Exception { +SimpleRelocator relocator = +new SimpleRelocator( "org.eclipse", "org.eclipse1234", null, null ); +List relocators = Lists.newArrayList( relocator ); + +String content = "org.eclipse.osgi.launch.EquinoxFactory\n"; +byte[] contentBytes = content.getBytes( "UTF-8" ); +InputStream contentStream = new ByteArrayInputStream( contentBytes ); +String contentResource = "META-INF/services/org.osgi.framework.launch.FrameworkFactory"; + +ServicesResourceTransformer xformer = new ServicesResourceTransformer(); +xformer.processResource( contentResource, contentStream, relocators ); +contentStream.close(); + +File tempJar = File.createTempFile("shade.", ".jar"); +tempJar.deleteOnExit(); +FileOutputStream fos = new FileOutputStream( tempJar ); +JarOutputStream jos = new JarOutputStream( fos ); +try { +xformer.modifyOutputStream( jos ); +jos.close(); +jos = null; +JarFile jarFile = new JarFile( tempJar ); +JarEntry jarEntry = jarFile.getJarEntry( contentResource ); +assertNotNull( jarEntry ); +InputStream entryStream = jarFile.getInputStream( jarEntry ); +try { +String xformedContent = IOUtils.toString(entryStream, "utf-8"); +assertEquals( "org.eclipse1234.osgi.launch.EquinoxFactory" + System.getProperty( "line.separator" ), xformedContent ); + +} finally { +IOUtils.closeQuietly( entryStream ); +jarFile.close(); +} +} finally { +if (jos != null) +{ +IOUtils.closeQuietly( jos ); +} +tempJar.delete(); +} +} @Test public void concatenation() throws Exception { This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > shadedPattern applied multiples times when relocating the contents of > META-INF/services files
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682616#comment-16682616 ] Fabiano Cipriano de Oliveira commented on MSHADE-291: - Done > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682407#comment-16682407 ] ASF GitHub Bot commented on MSHADE-291: --- rfscholte commented on issue #9: [MSHADE-291] - Fixes bug in SimpleRelocator URL: https://github.com/apache/maven-shade-plugin/pull/9#issuecomment-437584613 This PR looks good, see https://builds.apache.org/view/M-R/view/Maven/job/maven-box/job/maven-shade-plugin/job/MSHADE-291/ If you add yourself as contributor in the pom and squash the commits, I'll merge them into master. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682406#comment-16682406 ] Hudson commented on MSHADE-291: --- Build succeeded in Jenkins: Maven TLP » maven-shade-plugin » MSHADE-291 #2 See https://builds.apache.org/job/maven-box/job/maven-shade-plugin/job/MSHADE-291/2/ > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682353#comment-16682353 ] Fabiano Cipriano de Oliveira commented on MSHADE-291: - If I undertand right {{ServicesResourceTransformer}} was applying source content 2 times. I made a fix and revert SimpleRelocator modifications. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682310#comment-16682310 ] Fabiano Cipriano de Oliveira commented on MSHADE-291: - I see I will look at it. Thanks > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682279#comment-16682279 ] Robert Scholte commented on MSHADE-291: --- I would expect the issue to be in the {{ServicesResourceTransformer}}, the {{canRelocatePath()}}-method should not take the shadedPattern into account. > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682193#comment-16682193 ] Fabiano Cipriano de Oliveira commented on MSHADE-291: - Hi I create a pull request for this [https://github.com/apache/maven-shade-plugin/pull/9] Let me know if you need some more information. Thanks > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHADE-291) shadedPattern applied multiples times when relocating the contents of META-INF/services files
[ https://issues.apache.org/jira/browse/MSHADE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682192#comment-16682192 ] ASF GitHub Bot commented on MSHADE-291: --- fabcipriano opened a new pull request #9: [MSHADE-291] - Fixes bug in SimpleRelocator URL: https://github.com/apache/maven-shade-plugin/pull/9 I write a unit test to fix this bug. The fix is in SimpleRelocator Following this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MSHADE) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[MSHADE-XXX] - Fixes bug in ApproximateQuantiles`, where you replace `MSHADE-XXX` with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] You have run the integration tests successfully (`mvn -Prun-its clean verify`). If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > shadedPattern applied multiples times when relocating the contents of > META-INF/services files > - > > Key: MSHADE-291 > URL: https://issues.apache.org/jira/browse/MSHADE-291 > Project: Maven Shade Plugin > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Jan Luehe >Priority: Major > Labels: up-for-grabs > > Steps to reproduce: > 1. Modified the test case for > https://issues.apache.org/jira/browse/MSHADE-190, as follows: > {code:java} > diff --git a/pom.xml b/pom.xml > index 746b700..aea9abb 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -68,12 +68,12 @@ > > org.apache.maven.plugins > maven-shade-plugin > -2.4 > +3.1.1 > > > > -org.eclipse.* > -borg.eclipse.* > +org.eclipse > +org.eclipse1234 > > > > {code} > 2. mvn package > 3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services > 4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory > The shaded service implementation class looks as follows: > {code:java} > org.eclipse12341234.osgi.launch.EquinoxFactory > {code} > It appears that shadedPattern was applied twice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)