Author: maartenc
Date: Thu Apr 16 21:52:30 2009
New Revision: 765780
URL: http://svn.apache.org/viewvc?rev=765780&view=rev
Log:
FIX: Ivy doesn't handle maven dependencies with type 'test-jar' correctly
(IVY-1066)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=765780&r1=765779&r2=765780&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 16 21:52:30 2009
@@ -88,7 +88,8 @@
trunk
=====================================
- FIX: Wrong BuildException messages (findmodules) (IVY-1056)
-- FIX: PomModuleDescriptorBuilder does not resolve ejb type dependencies to
jar extension (IVY-1058) (thanks to Andrey Lomakin)
+- FIX: PomModuleDescriptorBuilder does not resolve ejb type dependencies to
jar extension (IVY-1058) (thanks to Andrey Lomakin)
+- FIX: Ivy doesn't handle maven dependencies with type 'test-jar' correctly
(IVY-1066)
2.1.0-rc1
=====================================
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=765780&r1=765779&r2=765780&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Thu Apr 16 21:52:30 2009
@@ -293,9 +293,16 @@
type = dep.getType();
}
String ext = type;
- if (JAR_PACKAGINGS.contains(type)) {
+
+ // if type is 'test-jar', the extension is 'jar' and the
classifier is 'tests'
+ // Cfr.
http://maven.apache.org/guides/mini/guide-attached-tests.html
+ if ("test-jar".equals(type)) {
ext = "jar";
- }
+ extraAtt.put("m:classifier", "tests");
+ } else if (JAR_PACKAGINGS.contains(type)) {
+ ext = "jar";
+ }
+
// we deal with classifiers by setting an extra attribute and
forcing the
// dependency to assume such an artifact is published
if (dep.getClassifier() != null) {