[jira] [Commented] (MSHADE-203) "shadeTestJar" option not working?

2023-04-05 Thread Aaron Curley (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17709102#comment-17709102
 ] 

Aaron Curley commented on MSHADE-203:
-

Probably this should be closed?  I still think there might be problems with the 
behavior of  but as of more recent maven-shade-plugin versions 
it's certainly not a no-op anymore which is what this ticket was reporting.

> "shadeTestJar" option not working?
> --
>
> Key: MSHADE-203
> URL: https://issues.apache.org/jira/browse/MSHADE-203
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.4.1
>Reporter: Aaron Curley
>Priority: Minor
>
> So, I'm pretty new to using the maven-shade-plugin and I'm not really that 
> familiar with the maven-shade-plugin's design/code; however, it appears that 
> the  option in the maven-shade-plugin configuration does not 
> work correctly.  
> __Symtoms__
> While running "mvn package" in my project (which has  set to 
> true), maven-shade-plugin appears to perform the "test jar shading" step 
> (after performing the regular jar's shade), but the "shaded" test JAR doesn't 
> actually include any shaded dependency files (it just includes the "original" 
> test jar's contents, which is essentially a "no-op").
> __Possible Diagnosis__
> I took a quick look at the release code base for v2.4.1, in particularly, the 
> mojo/ShadeMojo.java file.  In the execute() method, at line 437, there is 
> method call:
> processArtifactSelectors( artifacts, artifactIds, sourceArtifacts, 
> artifactSelector );
> This method call appears to populate the "artifacts" and "sourceArtifacts" 
> sets created earlier in execute() but the code noticeably does not populate 
> the similar "testArtifacts" set.  My guess is that this is causing the 
> "shade" operation to skip processing any artifacts for the test jar shade 
> operation (since only the project-level artifact is populated in the 
> "testArtifacts" set at line 432).
> __Possible Solution__
> (Obviously) Add an additional parameter to processArtifactSelectors() that 
> accepts the additional "testArtifacts" set.  Then, processArtifactSelectors 
> could populate that set (much like it does for the "sourceArtifacts" set at 
> line 623).  A more extensible design might be to populate a list of Set's and 
> supply that to processArtifactSelectors(), but there are some other 
> difficulties with that (under the current design).
> Best wishes.  Like I said, I'm pretty new to this plugin, so the above may be 
> incorrect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHADE-203) "shadeTestJar" option not working?

2019-12-18 Thread Elliotte Rusty Harold (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16999097#comment-16999097
 ] 

Elliotte Rusty Harold commented on MSHADE-203:
--

Can anyone say of this is WAI?

> "shadeTestJar" option not working?
> --
>
> Key: MSHADE-203
> URL: https://issues.apache.org/jira/browse/MSHADE-203
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.4.1
>Reporter: Aaron Curley
>Priority: Minor
>
> So, I'm pretty new to using the maven-shade-plugin and I'm not really that 
> familiar with the maven-shade-plugin's design/code; however, it appears that 
> the  option in the maven-shade-plugin configuration does not 
> work correctly.  
> __Symtoms__
> While running "mvn package" in my project (which has  set to 
> true), maven-shade-plugin appears to perform the "test jar shading" step 
> (after performing the regular jar's shade), but the "shaded" test JAR doesn't 
> actually include any shaded dependency files (it just includes the "original" 
> test jar's contents, which is essentially a "no-op").
> __Possible Diagnosis__
> I took a quick look at the release code base for v2.4.1, in particularly, the 
> mojo/ShadeMojo.java file.  In the execute() method, at line 437, there is 
> method call:
> processArtifactSelectors( artifacts, artifactIds, sourceArtifacts, 
> artifactSelector );
> This method call appears to populate the "artifacts" and "sourceArtifacts" 
> sets created earlier in execute() but the code noticeably does not populate 
> the similar "testArtifacts" set.  My guess is that this is causing the 
> "shade" operation to skip processing any artifacts for the test jar shade 
> operation (since only the project-level artifact is populated in the 
> "testArtifacts" set at line 432).
> __Possible Solution__
> (Obviously) Add an additional parameter to processArtifactSelectors() that 
> accepts the additional "testArtifacts" set.  Then, processArtifactSelectors 
> could populate that set (much like it does for the "sourceArtifacts" set at 
> line 623).  A more extensible design might be to populate a list of Set's and 
> supply that to processArtifactSelectors(), but there are some other 
> difficulties with that (under the current design).
> Best wishes.  Like I said, I'm pretty new to this plugin, so the above may be 
> incorrect.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHADE-203) "shadeTestJar" option not working?

2016-08-17 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MSHADE-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425548#comment-15425548
 ] 

Stéphane Landelle commented on MSHADE-203:
--

Building on top of William's explanations, I went with a different solution and 
recreated the whole project dependency graph with Aether (injected 
ProjectDependenciesResolver) to I could get the test dependencies back.
If there's some interest for it, I could provide a gist.


> "shadeTestJar" option not working?
> --
>
> Key: MSHADE-203
> URL: https://issues.apache.org/jira/browse/MSHADE-203
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.4.1
>Reporter: Aaron Curley
>Priority: Minor
>
> So, I'm pretty new to using the maven-shade-plugin and I'm not really that 
> familiar with the maven-shade-plugin's design/code; however, it appears that 
> the  option in the maven-shade-plugin configuration does not 
> work correctly.  
> __Symtoms__
> While running "mvn package" in my project (which has  set to 
> true), maven-shade-plugin appears to perform the "test jar shading" step 
> (after performing the regular jar's shade), but the "shaded" test JAR doesn't 
> actually include any shaded dependency files (it just includes the "original" 
> test jar's contents, which is essentially a "no-op").
> __Possible Diagnosis__
> I took a quick look at the release code base for v2.4.1, in particularly, the 
> mojo/ShadeMojo.java file.  In the execute() method, at line 437, there is 
> method call:
> processArtifactSelectors( artifacts, artifactIds, sourceArtifacts, 
> artifactSelector );
> This method call appears to populate the "artifacts" and "sourceArtifacts" 
> sets created earlier in execute() but the code noticeably does not populate 
> the similar "testArtifacts" set.  My guess is that this is causing the 
> "shade" operation to skip processing any artifacts for the test jar shade 
> operation (since only the project-level artifact is populated in the 
> "testArtifacts" set at line 432).
> __Possible Solution__
> (Obviously) Add an additional parameter to processArtifactSelectors() that 
> accepts the additional "testArtifacts" set.  Then, processArtifactSelectors 
> could populate that set (much like it does for the "sourceArtifacts" set at 
> line 623).  A more extensible design might be to populate a list of Set's and 
> supply that to processArtifactSelectors(), but there are some other 
> difficulties with that (under the current design).
> Best wishes.  Like I said, I'm pretty new to this plugin, so the above may be 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MSHADE-203) "shadeTestJar" option not working?

2016-08-01 Thread William Bakker (JIRA)

[ 
https://issues.apache.org/jira/browse/MSHADE-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402056#comment-15402056
 ] 

William Bakker commented on MSHADE-203:
---

We encountered the same issue. As the shade plugin only sees runtime 
dependencies, you need to add an compile scope dependency on the test-jar of 
the module that is to be shaded. This dependency can now be used by the 
maven-shade-plugin to generate not only a tests.jar, but also a 
test-sources.jar (the latter was also not yet available).

*Gist*

A patch (based on fork org.immutables.tools:maven-shade-plugin) has been logged 
at https://gist.github.com/wjbakker/1233dd050bf7f8e52f34fdc3ffbfc3ec

> "shadeTestJar" option not working?
> --
>
> Key: MSHADE-203
> URL: https://issues.apache.org/jira/browse/MSHADE-203
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.4.1
>Reporter: Aaron Curley
>Priority: Minor
>
> So, I'm pretty new to using the maven-shade-plugin and I'm not really that 
> familiar with the maven-shade-plugin's design/code; however, it appears that 
> the  option in the maven-shade-plugin configuration does not 
> work correctly.  
> __Symtoms__
> While running "mvn package" in my project (which has  set to 
> true), maven-shade-plugin appears to perform the "test jar shading" step 
> (after performing the regular jar's shade), but the "shaded" test JAR doesn't 
> actually include any shaded dependency files (it just includes the "original" 
> test jar's contents, which is essentially a "no-op").
> __Possible Diagnosis__
> I took a quick look at the release code base for v2.4.1, in particularly, the 
> mojo/ShadeMojo.java file.  In the execute() method, at line 437, there is 
> method call:
> processArtifactSelectors( artifacts, artifactIds, sourceArtifacts, 
> artifactSelector );
> This method call appears to populate the "artifacts" and "sourceArtifacts" 
> sets created earlier in execute() but the code noticeably does not populate 
> the similar "testArtifacts" set.  My guess is that this is causing the 
> "shade" operation to skip processing any artifacts for the test jar shade 
> operation (since only the project-level artifact is populated in the 
> "testArtifacts" set at line 432).
> __Possible Solution__
> (Obviously) Add an additional parameter to processArtifactSelectors() that 
> accepts the additional "testArtifacts" set.  Then, processArtifactSelectors 
> could populate that set (much like it does for the "sourceArtifacts" set at 
> line 623).  A more extensible design might be to populate a list of Set's and 
> supply that to processArtifactSelectors(), but there are some other 
> difficulties with that (under the current design).
> Best wishes.  Like I said, I'm pretty new to this plugin, so the above may be 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)