* upgrade dom4j * compile issue * Update XMLReader.java * Update XMLReader.java * Update Maven2RepositoryMetadataResolverTest.javatags/archiva-2.2.9
@@ -51,7 +51,7 @@ | |||
<artifactId>org.eclipse.sisu.plexus</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<scope>test</scope> | |||
</dependency> |
@@ -34,9 +34,9 @@ | |||
<artifactId>archiva-common</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>jaxen</groupId> |
@@ -42,7 +42,7 @@ | |||
<artifactId>commons-io</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
</dependency> | |||
<dependency> |
@@ -40,6 +40,7 @@ import java.nio.charset.Charset; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
import java.util.Iterator; | |||
import java.util.LinkedHashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -201,22 +202,25 @@ public class XMLReader | |||
{ | |||
elem.setQName( QName.get( elem.getName(), Namespace.NO_NAMESPACE, elem.getQualifiedName() ) ); | |||
Node n; | |||
Element e; | |||
Iterator<Element> elementIterator = elem.elementIterator(); | |||
while ( elementIterator.hasNext() ) | |||
{ | |||
e = elementIterator.next(); | |||
removeNamespaces(e); | |||
} | |||
Iterator<Node> it = elem.elementIterator(); | |||
while ( it.hasNext() ) | |||
Attribute attribute; | |||
Iterator<Attribute> attributeIterator = elem.attributeIterator(); | |||
LinkedHashMap<String, String> newAttributes = new LinkedHashMap<>(); | |||
while ( attributeIterator.hasNext() ) | |||
{ | |||
n = it.next(); | |||
switch ( n.getNodeType() ) | |||
{ | |||
case Node.ATTRIBUTE_NODE: | |||
( (Attribute) n ).setNamespace( Namespace.NO_NAMESPACE ); | |||
break; | |||
case Node.ELEMENT_NODE: | |||
removeNamespaces( (Element) n ); | |||
break; | |||
} | |||
attribute = attributeIterator.next(); | |||
newAttributes.put(attribute.getName(), attribute.getValue()); | |||
} | |||
elem.setAttributes(new ArrayList<Attribute>()); | |||
for (Map.Entry<String, String> entry : newAttributes.entrySet()) { | |||
elem.addAttribute(entry.getKey(), entry.getValue()); | |||
} | |||
} | |||
@@ -39,7 +39,7 @@ | |||
<commons-httpclient.bundle.version>3.1_6</commons-httpclient.bundle.version> | |||
<commons-jxpath.bundle.version>1.2_5</commons-jxpath.bundle.version> | |||
<commons-validator.bundle.version>1.3.1_1-SNAPSHOT</commons-validator.bundle.version> | |||
<dom4j.bundle.version>1.6.1_4</dom4j.bundle.version> | |||
<dom4j.bundle.version>2.1.3_1</dom4j.bundle.version> | |||
<ehcache.bundle.version>2.4.3_1</ehcache.bundle.version> | |||
<freemarker.bundle.version>2.3.18_1</freemarker.bundle.version> | |||
<javassist.bundle.version>3.12.1.ga_1</javassist.bundle.version> |
@@ -61,9 +61,9 @@ | |||
<version>2.7.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
</dependencies> |
@@ -501,9 +501,9 @@ | |||
<version>10.1.3.1</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>hsqldb</groupId> |
@@ -501,9 +501,9 @@ | |||
<version>10.1.3.1</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>hsqldb</groupId> |
@@ -57,9 +57,9 @@ | |||
<version>1.0-alpha-22</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.opensymphony</groupId> |
@@ -211,7 +211,7 @@ public class Maven2RepositoryMetadataResolverTest | |||
assertDependency( dependencies.get( 3 ), "org.codehaus.plexus", "plexus-component-api", "1.0-alpha-22" ); | |||
assertDependency( dependencies.get( 4 ), "org.codehaus.plexus", "plexus-spring", "1.2", "test" ); | |||
assertDependency( dependencies.get( 5 ), "xalan", "xalan", "2.7.0" ); | |||
assertDependency( dependencies.get( 6 ), "dom4j", "dom4j", "1.6.1", "test" ); | |||
assertDependency( dependencies.get( 6 ), "org.dom4j", "dom4j", "${dom4j.version}", "test" ); | |||
assertDependency( dependencies.get( 7 ), "junit", "junit", "3.8.1", "test" ); | |||
assertDependency( dependencies.get( 8 ), "easymock", "easymock", "1.2_Java1.3", "test" ); | |||
assertDependency( dependencies.get( 9 ), "easymock", "easymockclassextension", "1.2", "test" ); | |||
@@ -668,8 +668,8 @@ public class Maven2RepositoryMetadataResolverTest | |||
assertArtifact( artifacts.get( 0 ), "plexus-spring-1.2-sources.jar", 0, EMPTY_SHA1, EMPTY_MD5 ); | |||
assertArtifact( artifacts.get( 1 ), "plexus-spring-1.2.jar", 0, EMPTY_SHA1, EMPTY_MD5 ); | |||
assertArtifact( artifacts.get( 2 ), "plexus-spring-1.2.pom", 7407, "96b14cf880e384b2d15e8193c57b65c5420ca4c5", | |||
"f83aa25f016212a551a4b2249985effc" ); | |||
assertArtifact( artifacts.get( 2 ), "plexus-spring-1.2.pom", 7422, "28e86d3e2723e4894587e4b758231f76febce942", | |||
"9f663d8e7adf6adff4133653b59d1e28" ); | |||
} | |||
@Test |
@@ -34,9 +34,9 @@ | |||
<artifactId>archiva-common</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>jaxen</groupId> |
@@ -501,9 +501,9 @@ | |||
<version>10.1.3.1</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>hsqldb</groupId> |
@@ -44,7 +44,7 @@ | |||
<dependency> | |||
<groupId>qdox</groupId> | |||
<artifactId>qdox</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
<scope>provided</scope> | |||
</dependency> | |||
<dependency> |
@@ -57,6 +57,7 @@ | |||
<commons-fileupload.version>1.4</commons-fileupload.version> | |||
<commons-io.version>2.11.0</commons-io.version> | |||
<commons-lang.version>2.6</commons-lang.version> | |||
<dom4j.version>2.1.3</dom4j.version> | |||
<maven3x.version>3.0.5</maven3x.version> | |||
<maven.version>2.0.8</maven.version> | |||
@@ -706,9 +707,9 @@ | |||
<version>${derbyVersion}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>dom4j</groupId> | |||
<groupId>org.dom4j</groupId> | |||
<artifactId>dom4j</artifactId> | |||
<version>1.6.1</version> | |||
<version>${dom4j.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.hsqldb</groupId> |