Re: exclusions from a typetest-jar/type dependency in maven 3

2011-05-19 Thread Garrett Wu
Thanks.  I've filed http://jira.codehaus.org/browse/MNG-5096.

On Wed, May 18, 2011 at 12:19 PM, Anders Hammar and...@hammar.net wrote:

 I the exact same project shows a difference between Maven 2.2.1 and Maven
 3.0.3, you should create a jira ticket about a regression.

 /Anders

 On Wed, May 18, 2011 at 03:01, Garrett Wu wugarr...@gmail.com wrote:

  When upgrading to maven 3.0.3, I noticed that exclusions are not really
  excluded from dependencies with typetest-jar/type.  Is this intended
  behavior?  If so, I how should I achieve the same effect as maven2?
 
  I have a project maven-test-jar that has a compile scope dependency on
  org.apache.hadoop:avro:1.3.1.
 
   groupIdcom.foocorp.maven/groupId
   artifactIdmaven-test-jar/artifactId
   !-- ... --
   dependencies
 dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdavro/artifactId
   version1.3.1/version
   scopecompile/scope
 /dependency
   /dependencies
 
  I have another project that depends on maven-test-jar's tests, and I
 would
  like to use org.apache.avro:avro:1.4.1 instead of
  org.apache.hadoop:avro:1.3.1.
 
   !-- ... --
   dependencies
 dependency
   groupIdcom.foocorp.maven/groupId
   artifactIdmaven-test-jar/artifactId
   version1.0-SNAPSHOT/version
   scopetest/scope
   typetest-jar/type
   exclusions
 exclusion
   groupIdorg.apache.hadoop/groupId
   artifactIdavro/artifactId
 /exclusion
   /exclusions
 /dependency
 dependency
   groupIdorg.apache.avro/groupId
   artifactIdavro/artifactId
   version1.4.1/version
   scopecompile/scope
 /dependency
   /dependencies
 
  However, a dependency:list shows that it still uses
  org.apache.hadoop:avro:1.3.1 for the test scope:
 
  $ mvn dependency:list
  ...
  [INFO]org.apache.avro:avro:jar:1.4.1:compile
  [INFO]org.apache.hadoop:avro:jar:1.3.1:test
  ...
 
  In maven 2, org.apache.hadoop:avro:jar:1.3.1:test is omitted as I would
  expect.
 
  Thanks,
  Garrett
 



Re: exclusions from a typetest-jar/type dependency in maven 3

2011-05-18 Thread Anders Hammar
I the exact same project shows a difference between Maven 2.2.1 and Maven
3.0.3, you should create a jira ticket about a regression.

/Anders

On Wed, May 18, 2011 at 03:01, Garrett Wu wugarr...@gmail.com wrote:

 When upgrading to maven 3.0.3, I noticed that exclusions are not really
 excluded from dependencies with typetest-jar/type.  Is this intended
 behavior?  If so, I how should I achieve the same effect as maven2?

 I have a project maven-test-jar that has a compile scope dependency on
 org.apache.hadoop:avro:1.3.1.

  groupIdcom.foocorp.maven/groupId
  artifactIdmaven-test-jar/artifactId
  !-- ... --
  dependencies
dependency
  groupIdorg.apache.hadoop/groupId
  artifactIdavro/artifactId
  version1.3.1/version
  scopecompile/scope
/dependency
  /dependencies

 I have another project that depends on maven-test-jar's tests, and I would
 like to use org.apache.avro:avro:1.4.1 instead of
 org.apache.hadoop:avro:1.3.1.

  !-- ... --
  dependencies
dependency
  groupIdcom.foocorp.maven/groupId
  artifactIdmaven-test-jar/artifactId
  version1.0-SNAPSHOT/version
  scopetest/scope
  typetest-jar/type
  exclusions
exclusion
  groupIdorg.apache.hadoop/groupId
  artifactIdavro/artifactId
/exclusion
  /exclusions
/dependency
dependency
  groupIdorg.apache.avro/groupId
  artifactIdavro/artifactId
  version1.4.1/version
  scopecompile/scope
/dependency
  /dependencies

 However, a dependency:list shows that it still uses
 org.apache.hadoop:avro:1.3.1 for the test scope:

 $ mvn dependency:list
 ...
 [INFO]org.apache.avro:avro:jar:1.4.1:compile
 [INFO]org.apache.hadoop:avro:jar:1.3.1:test
 ...

 In maven 2, org.apache.hadoop:avro:jar:1.3.1:test is omitted as I would
 expect.

 Thanks,
 Garrett