[SCM] UNNAMED PROJECT branch, master, updated. debian/1.8.3-5-g231a951
Emmanuel Bourg
ebourg at apache.org
Tue Jun 18 11:56:38 UTC 2013
The following commit has been merged in the master branch:
commit 231a9518df2b628f833f0282781efffd4d34d438
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Tue Jun 18 13:56:28 2013 +0200
Fixed a regression in the pom parser (Closes: #712658)
diff --git a/debian/changelog b/debian/changelog
index 3dea5d3..9c2443d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+maven-repo-helper (1.8.4) UNRELEASED; urgency=low
+
+ * Fixed a regression in the pom parser (Closes: #712658)
+ * The name of the pom is now displayed when a parsing error occurs
+
+ -- Emmanuel Bourg <ebourg at apache.org> Tue, 18 Jun 2013 13:52:45 +0200
+
maven-repo-helper (1.8.3) unstable; urgency=low
* Fixed the usage of the debhelper functions in jh_maven_repo_helper.pm.
diff --git a/src/main/java/org/debian/maven/repo/POMReader.java b/src/main/java/org/debian/maven/repo/POMReader.java
index cc2f4ce..47b2408 100644
--- a/src/main/java/org/debian/maven/repo/POMReader.java
+++ b/src/main/java/org/debian/maven/repo/POMReader.java
@@ -103,7 +103,7 @@ public class POMReader {
}
case XMLStreamConstants.END_ELEMENT: {
- String value = buffer != null ? buffer.toString() : null;
+ String value = buffer != null ? buffer.toString().trim() : null;
if (inIgnoredElement > 0 || path.contains("exclusions")) {
// ignore
} else if (path.contains("dependency") || path.contains("plugin") || path.contains("extension")) {
diff --git a/src/test/java/org/debian/maven/repo/POMReaderTest.java b/src/test/java/org/debian/maven/repo/POMReaderTest.java
index d30a2e2..fd25324 100644
--- a/src/test/java/org/debian/maven/repo/POMReaderTest.java
+++ b/src/test/java/org/debian/maven/repo/POMReaderTest.java
@@ -368,6 +368,16 @@ public class POMReaderTest {
}
@Test
+ public void testReadBndPom() throws Exception {
+ POMReader instance = new POMReader();
+ POMInfo info = instance.readPom(tmpDir.usePom("bndlib.pom"));
+ assertNotNull("null pom", info.getThisPom());
+ assertEquals("groupId", "biz.aQute", info.getThisPom().getGroupId());
+ assertEquals("artifactId", "bndlib", info.getThisPom().getArtifactId());
+ assertEquals("version", "1.43.0", info.getThisPom().getVersion());
+ }
+
+ @Test
public void testTreePathMatches() {
TreePath<String> path = new TreePath<String>();
path.add("a");
diff --git a/src/test/resources/bndlib.pom b/src/test/resources/bndlib.pom
new file mode 100644
index 0000000..54bb181
--- /dev/null
+++ b/src/test/resources/bndlib.pom
@@ -0,0 +1,73 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>
+ 4.0.0
+ </modelVersion>
+ <groupId>
+ biz.aQute
+ </groupId>
+ <artifactId>
+ bndlib
+ </artifactId>
+ <version>
+ 1.43.0
+ </version>
+ <description>
+ A library for manipulating and generating bundles
+ </description>
+ <name>
+ aQute Bundle Tool Library
+ </name>
+ <url>
+ http://www.aQute.biz/Code/Bnd
+ </url>
+ <scm>
+ <url>
+ git://github.com/bnd/bnd.git
+ </url>
+ <connection>
+ git://github.com/bnd/bnd.git
+ </connection>
+ <developerConnection>
+ git://github.com/bnd/bnd.git
+ </developerConnection>
+ </scm>
+ <organization>
+ <name>
+ aQute SARL
+ </name>
+ <url>
+ http://www.aQute.biz
+ </url>
+ </organization>
+ <developers>
+ <developer>
+ <id>
+ Peter.Kriens at aQute.biz
+ </id>
+ <name>
+ Peter.Kriens
+ </name>
+ <email>
+ Peter.Kriens at aQute.biz
+ </email>
+ <organization>
+ aQute
+ </organization>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>
+ All files contained in this JAR are licensed under the Apache
+ 2.0 license, unless noted differently in their source (see
+ swing2swt).
+ </name>
+ <url>
+ http://www.opensource.org/licenses/apache2.0.php
+ </url>
+ <distribution>
+ repo
+ </distribution>
+ </license>
+ </licenses>
+</project>
\ No newline at end of file
--
UNNAMED PROJECT
More information about the pkg-java-commits
mailing list