Maven Shade-Plugin strange behavior

2013-08-30 Thread David Gay
Hi all,

I would like to know if this behavior is normal while using the 
maven-shade-plugin.

Take this sample pom as input:
project
modelVersion4.0.0/modelVersion
groupIdsample/groupId
artifactIdshade-effect/artifactId
packagingjar/packaging
version1.0.0-SNAPSHOT/version
build
   plugins
   plugin
   
groupIdorg.apache.maven.plugins/groupId
   
artifactIdmaven-shade-plugin/artifactId
   
version2.1/version
   executions
  
execution

  phasepackage/phase

  goals

  goalshade/goal

  /goals

  configuration

  
createDependencyReducedPomtrue/createDependencyReducedPom

  /configuration
  
/execution
   /executions
   /plugin

   /plugins
/build
dependencies
   dependency
   groupIdcommons-io/groupId
   
artifactIdcommons-io/artifactId
   version2.4/version
   /dependency
   dependency
   groupIdorg.mockito/groupId
   
artifactIdmockito-core/artifactId
   version1.9.5/version
   scopetest/scope
   /dependency
/dependencies
/project

And do a mvn clean install.
The real pom that is deployed in the repository is the one that has been 
transformed by the shade plugin (ie: dependency-reduced-pom.xml)
If I look at this pom, the compile dependencies are removed as expected. Good.
But, if you look at the dependencies with scope test, they is a super strange 
behavior:

project
  modelVersion4.0.0/modelVersion
  groupIdsample/groupId
  artifactIdshade-effect/artifactId
  version1.0.0-SNAPSHOT/version
  build
plugins
  plugin
artifactIdmaven-shade-plugin/artifactId
version2.1/version
executions
  execution
phasepackage/phase
goals
  goalshade/goal
/goals
configuration
  createDependencyReducedPomtrue/createDependencyReducedPom
/configuration
  /execution
/executions
  /plugin
/plugins
  /build
  dependencies
dependency
  groupIdorg.mockito/groupId
  artifactIdmockito-core/artifactId
  version1.9.5/version
  scopetest/scope
  exclusions
exclusion
  artifactIdhamcrest-core/artifactId
  groupIdorg.hamcrest/groupId
/exclusion
exclusion
  artifactIdobjenesis/artifactId
  groupIdorg.objenesis/groupId
/exclusion
  /exclusions
/dependency
  /dependencies
/project

Why are all the transitive dependencies of the test artifacts being excluded 

It surprise me a lot (and made some of my jobs fails in specific situations, 
for example when using Sonar, but that's another story/problem)

BTW: I use Maven 3.0.5

Thanks for your help.
WBR // David



Re: Maven Shade-Plugin strange behavior

2013-08-30 Thread Michael-O

Am 2013-08-30 17:47, schrieb David Gay:

[...]
Why are all the transitive dependencies of the test artifacts being excluded 

It surprise me a lot (and made some of my jobs fails in specific situations, 
for example when using Sonar, but that's another story/problem)


Please suffer with me: https://jira.codehaus.org/browse/MSHADE-95

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org