mirror of https://github.com/apache/archiva.git
[MRM-1152]
o merge -r756559 from trunk (fix for MRM-1136) git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.1.x@760853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f5ba79dd88
commit
6b47cf58de
|
@ -51,6 +51,8 @@ public class RepositoryMetadataReader
|
|||
try
|
||||
{
|
||||
XMLReader xml = new XMLReader( "metadata", metadataFile );
|
||||
// invoke this to remove namespaces, see MRM-1136
|
||||
xml.removeNamespaces();
|
||||
|
||||
ArchivaRepositoryMetadata metadata = new ArchivaRepositoryMetadata();
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata xsi:schemaLocation="http://maven.apache.org/METADATA/1.0.0 http://maven.apache.org/xsd/metadata-1.0.0.xsd" xmlns="http://maven.apache.org/METADATA/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>idlj-maven-plugin</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<timestamp>20090312.163710</timestamp>
|
||||
<buildNumber>16</buildNumber>
|
||||
</snapshot>
|
||||
<lastUpdated>20090312163712</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
|
@ -93,4 +93,17 @@ public class XMLReaderTest
|
|||
assertElementTexts( names, new String[] { TRYGVIS, INFINITE_ARCHIVA } );
|
||||
}
|
||||
|
||||
// MRM-1136 or MRM-1152
|
||||
public void testProxiedMetadataRead()
|
||||
throws XMLException
|
||||
{
|
||||
File xmlFile = getExampleXml( "maven-metadata-codehaus-snapshots.xml" );
|
||||
XMLReader reader = new XMLReader( "metadata", xmlFile );
|
||||
reader.removeNamespaces();
|
||||
|
||||
Element groupId = reader.getElement( "//metadata/groupId" );
|
||||
assertNotNull( groupId );
|
||||
assertEquals( "org.codehaus.mojo", groupId.getTextTrim() );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue