[javapackages] [test] expect wrapped expection in pom.py
by Michael Šimáček
commit e4d3ebab306091cc01236858309fe16a62d7c90c
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Wed Jan 29 11:12:33 2014 +0100
[test] expect wrapped expection in pom.py
python/test/pom_test.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/python/test/pom_test.py b/python/test/pom_test.py
index c98decd..e81240a 100644
--- a/python/test/pom_test.py
+++ b/python/test/pom_test.py
@@ -17,7 +17,7 @@ def pomfile(fname):
class TestPOM(unittest.TestCase):
- @exception_expected(IOError)
+ @exception_expected(PomLoadingException)
@pomfile("NULL_FILE.pom.xml")
def test_nonexisting_pom(self, p):
self.assertTrue(False, "IOError was expected!")
10 years, 4 months
[javapackages] [pom.py] wrap IOError
by Michael Šimáček
commit 86b7c5a11c7c89111fd8ad5d10d753a0f4b0958d
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Wed Jan 29 10:49:33 2014 +0100
[pom.py] wrap IOError
python/javapackages/pom.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/pom.py b/python/javapackages/pom.py
index b6e2448..22ff5b3 100644
--- a/python/javapackages/pom.py
+++ b/python/javapackages/pom.py
@@ -43,7 +43,10 @@ class POM(object):
et = ElementTree ()
parser = XMLParser(remove_comments=True,
strip_cdata=True)
- self.__doc = et.parse(path, parser=parser)
+ try:
+ self.__doc = et.parse(path, parser=parser)
+ except IOError:
+ raise PomLoadingException("Cannot read file {0}".format(path))
if self.__doc is None:
raise PomLoadingException("Failed to load pom.xml. You have a problem")
10 years, 4 months
[javapackages] [pom_editor] fix regression - replacing non-element nodes
by Michael Šimáček
commit 5eb4ce06d058d7eb62eee71f2ff219beaa11ac74
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Wed Jan 29 10:28:37 2014 +0100
[pom_editor] fix regression - replacing non-element nodes
java-utils/pom_editor.py | 16 +++--
test/data/pom_macros/pom_xpath_remove_generic.xml | 68 ++++++++++++++++++++
.../pom_macros/pom_xpath_remove_generic.xml-want | 30 +++++++++
test/pom_macros_test.py | 7 ++
4 files changed, 115 insertions(+), 6 deletions(-)
---
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index 5b715f4..ac2443a 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -142,12 +142,16 @@ class Pom(object):
def replace_xml(self, replaced, content):
content = self.subtree_from_string(content)
parent = replaced.getparent()
- idx = parent.index(replaced)
- items = len(content)
- del parent[idx]
- for i, element in enumerate(content):
- parent.insert(idx + i, element)
- self.reformat(parent, parent[idx: idx + items])
+ parent.text = content.text
+ if not isinstance(replaced, etree._Element):
+ parent.extend(content)
+ else:
+ idx = parent.index(replaced)
+ items = len(content)
+ del parent[idx]
+ for i, element in enumerate(content):
+ parent.insert(idx + i, element)
+ self.reformat(parent, parent[idx: idx + items])
def replace_xml_content(self, parent, content):
content = self.subtree_from_string(content)
diff --git a/test/data/pom_macros/pom_xpath_remove_generic.xml b/test/data/pom_macros/pom_xpath_remove_generic.xml
new file mode 100644
index 0000000..48a1ef0
--- /dev/null
+++ b/test/data/pom_macros/pom_xpath_remove_generic.xml
@@ -0,0 +1,68 @@
+<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>org.eclipse.jetty</groupId>
+ <artifactId>jetty-parent</artifactId>
+ <version>2.6</version>
+ <name>Commons Lang</name>
+
+ <prerequisities>
+ <maven>3.0</maven>
+ <maven-old>2.0</maven-old>
+ </prerequisities>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <module>jetty-util</module>
+ <module>jetty-jmx</module>
+ <module>jetty-io</module>
+ <module>jetty-http</module>
+ <module>jetty-websocket</module>
+ <module>jetty-continuation</module>
+ <module>jetty-server</module>
+ <module>jetty-client</module>
+ <module>jetty-xml</module>
+ <module>jetty-security</module>
+ <module>jetty-jaspi</module>
+ <module>jetty-servlet</module>
+ <module>jetty-webapp</module>
+ <module>jetty-servlets</module>
+ <module>jetty-deploy</module>
+ <module>jetty-ajp</module>
+ <module>jetty-jndi</module>
+ <module>jetty-annotations</module>
+ <module>jetty-plus</module>
+ <module>jetty-rewrite</module>
+ <module>jetty-policy</module>
+ <module>jetty-monitor</module>
+ <module>jetty-start</module>
+ <module>jetty-nested</module>
+ <module>jetty-overlay-deployer</module>
+ <module>jetty-osgi</module>
+ <module>jetty-nosql</module>
+ <module>jetty-http-spi</module>
+ <module>jetty-jsp</module>
+ <module>jetty-distribution</module>
+ <module>test-continuation</module>
+ <!--module>test-continuation-jetty6</module-->
+ <module>test-jetty-servlet</module>
+ <module>test-jetty-webapp</module>
+ <module>test-jetty-nested</module>
+ <module>example-jetty-embedded</module>
+ <module>example-async-rest</module>
+ <module>tests</module>
+ </modules>
+
+</project>
diff --git a/test/data/pom_macros/pom_xpath_remove_generic.xml-want b/test/data/pom_macros/pom_xpath_remove_generic.xml-want
new file mode 100644
index 0000000..47f637d
--- /dev/null
+++ b/test/data/pom_macros/pom_xpath_remove_generic.xml-want
@@ -0,0 +1,30 @@
+<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>org.eclipse.jetty</groupId>
+ <artifactId>jetty-parent</artifactId>
+ <version>2.6</version>
+ <name>Commons Lang</name>
+
+ <prerequisities>
+ <maven>3.0</maven>
+ <maven-old>2.0</maven-old>
+ </prerequisities>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ </modules>
+
+</project>
diff --git a/test/pom_macros_test.py b/test/pom_macros_test.py
index 8b44f09..8b1d8ea 100644
--- a/test/pom_macros_test.py
+++ b/test/pom_macros_test.py
@@ -321,6 +321,13 @@ class PomMacrosTest(unittest.TestCase):
report, res = check_result(pom_path)
self.assertEqual(res, True, report)
+ @exec_macro("pom_xpath_remove 'pom:modules/node()'", "pom_xpath_remove_generic.xml")
+ def test_xpath_remove_generic(self, stdin, stderr, returncode, pom_path):
+ self.assertEqual(returncode, 0, stderr)
+
+ report, res = check_result(pom_path)
+ self.assertEqual(res, True, report)
+
@exec_macro("pom_xpath_remove \
\"pom:dependency[pom:artifactId[text()='m-m']]\"",
"pom_xpath_remove2.xml")
10 years, 4 months
[Bug 1055428] New: eclipselink doesn't provide org.eclipse.persistence:org.eclipse.persistence.jpa
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1055428
Bug ID: 1055428
Summary: eclipselink doesn't provide
org.eclipse.persistence:org.eclipse.persistence.jpa
Product: Fedora
Version: rawhide
Component: eclipselink
Assignee: puntogil(a)libero.it
Reporter: msrb(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
puntogil(a)libero.it
Description of problem:
eclipselink should provide org.eclipse.persistence:org.eclipse.persistence.jpa
artifact (corresponding JAR is installed), but it doesn't.
Version-Release number of selected component (if applicable):
eclipselink-2.4.2-3.fc21
How reproducible:
always
Steps to Reproduce:
1. rpm -q --provides eclipselink
Actual results:
eclipselink = 2.4.2-3.fc21
mvn(org.eclipse.persistence:eclipselink) = 2.4.2
mvn(org.eclipse.persistence:org.eclipse.persistence.core) = 2.4.2
Expected results:
eclipselink = 2.4.2-4.fc21
mvn(org.eclipse.persistence:eclipselink) = 2.4.2
mvn(org.eclipse.persistence:org.eclipse.persistence.core) = 2.4.2
mvn(org.eclipse.persistence:org.eclipse.persistence.jpa) = 2.4.2
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=6RPiEyg6gh&a=cc_unsubscribe
10 years, 4 months
[Bug 990588] New: Package the tomcat shell scripts
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=990588
Bug ID: 990588
Summary: Package the tomcat shell scripts
Product: Fedora
Version: rawhide
Component: tomcat
Assignee: ivan.afonichev(a)gmail.com
Reporter: rrati(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: akurtako(a)redhat.com, ivan.afonichev(a)gmail.com,
java-sig-commits(a)lists.fedoraproject.org,
kdaniel(a)redhat.com
Description of problem:
Apache Hadoop has a component called httpfs which uses the catalina.sh and
other shell scripts from the tomcat source. It does not appear the shell
scripts from the source are included in any of the tomcat rpms.
Is there a reason not to have these scripts packaged? Can a subpackage be
updated/created that includes these shell scripts?
Version-Release number of selected component (if applicable):
7.0.42
How reproducible:
100%
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=eiQFrSJBHX&a=cc_unsubscribe
10 years, 4 months