[
https://jira.codehaus.org/browse/MSHADE-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=321720#comment-321720
]
Michael Osipov edited comment on MSHADE-95 at 3/10/13 4:33 PM:
---------------------------------------------------------------
Bang, just hit this one with Maven 3.0.5. Cannot release because all deps are
removed from test artifacts. See MRELEASE-140 and MNG-2045.
This nasty bug took almost a day to track down.
It completely breaks the release process. The dependency reduced pom removes
all transitive dependencies from my test deps. Surefire is called by the site
plugin which uses the DRP. testCompile tries compile but dependencies where
removed => Unknown symbols. Release failed.
I have inspected the ShadeMojo and found this method: updateExcludesInDeps
I do not fully understand its purpose but since it is called here:
{code}
MavenProject p2 = mavenProjectBuilder.build( f, localRepository, null );
modified = updateExcludesInDeps( p2, dependencies, transitiveDeps );
{code}
It fucks up the POM. I turned that code quick and dirty to {{modified =
false}}, installed and was able to push my release. The produced POM looks now
as expected. In my opinion, this plugin seems to be unusable.
was (Author: michael-o):
Bang, just hit this one with Maven 3.0.5. Cannot release because all deps
are removed from test artifacts. See MRELEASE-140 and MNG-2045.
This nasty bug took almost a day to track down.
> test-scoped artifact excluded, even if it is also a transitive dep
> ------------------------------------------------------------------
>
> Key: MSHADE-95
> URL: https://jira.codehaus.org/browse/MSHADE-95
> Project: Maven 2.x Shade Plugin
> Issue Type: Bug
> Affects Versions: 1.3.2, 1.4
> Environment: (cygwin)
> Apache Maven 3.0.1 (r1038046; 2010-11-23 05:58:32-0500)
> Java version: 1.6.0_23
> Java home: C:\Program Files\Java\jdk1.6.0_23\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
> Reporter: Alan D. Salewski
> Labels: moreinfo
>
> A test-scoped artifact is excluded from the final jar, even if that artifact
> is also a transitive dependency of some other (non-test-scoped) dep.
> {noformat}
> MY_POM
> |
> |
> +-- dep A (scope: test)
> |
> |
> +-- dep B (scope: compile)
> |
> |
> +-- dep A (scope: compile)
> {noformat}
> In the above scenario, I would expect '{{dep A}}' to be included in the final
> jar, even though it's in the '{{test}}' scope in my POM. The rationale is
> that it is required for '{{dep B}}' to run; its absence will result in a
> {{java.lang.ClassNotFoundException}} at runtime.
> Behavior observed with maven-shade-plugin versions 1.3.2 and 1.4; other
> versions not tested.
> I'll put together a test case later tonight when I have more time and attach
> it here.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira