[javapackages/pom_editor.py] [pom_editor] replacement coments identify what has been removed
by Michael Šimáček
commit 803b54933f44593e2d4147636349b6704b2056af
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Wed Feb 12 13:14:23 2014 +0100
[pom_editor] replacement coments identify what has been removed
java-utils/pom_editor.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index fd43cc8..c4d653c 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -336,7 +336,8 @@ def pom_xpath_replace(where, xml_string, pom=None):
def pom_xpath_remove(where, pom=None):
"""<XPath> [POM location]"""
for element in pom.xpath_query(where):
- pom.replace_xml(element, "<!-- element removed by maintainer -->")
+ pom.replace_xml(element,
+ "<!-- element removed by maintainer: {0} -->".format(where))
@macro()
def pom_xpath_set(where, content, pom=None):
@@ -352,7 +353,8 @@ def pom_remove_dep(dep, pom=None):
xpath = "//pom:dependency[{0}]".format(artifact.get_xpath_condition())
elements = pom.xpath_query(xpath)
for element in elements:
- pom.replace_xml(element, "<!-- dependency removed by maintainer -->")
+ pom.replace_xml(element,
+ "<!-- dependency removed by maintainer: {0} -->".format(dep))
except PomQueryNoMatch:
raise PomQueryNoMatch("Dependency '{0}' not found.".format(dep))
@@ -364,7 +366,8 @@ def pom_remove_plugin(plugin, pom=None):
xpath = "//pom:plugin[{0}]".format(artifact.get_xpath_condition())
elements = pom.xpath_query(xpath)
for element in elements:
- pom.replace_xml(element, "<!-- plugin removed by maintainer -->")
+ pom.replace_xml(element,
+ "<!-- plugin removed by maintainer: {0} -->".format(plugin))
except PomQueryNoMatch:
raise PomQueryNoMatch("Plugin '{0}' not found.".format(plugin))
@@ -375,7 +378,8 @@ def pom_disable_module(module, pom=None):
xpath = "//pom:module[normalize-space(text())='{0}']".format(module)
elements = pom.xpath_query(xpath)
for element in elements:
- pom.replace_xml(element, "<!-- module removed by maintainer -->")
+ pom.replace_xml(element,
+ "<!-- module removed by maintainer: {0} -->".format(module))
except PomQueryNoMatch:
raise PomQueryNoMatch("Module '{0}' not found.".format(module))
10 years
[javapackages/pom_editor.py] [pom_editor] don't follow module nodes where arbitrary content is allowed
by Michael Šimáček
commit e2195a59c6b8b109e53d26cf59624e4c00ceb699
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Thu Feb 6 14:11:32 2014 +0100
[pom_editor] don't follow module nodes where arbitrary content is
allowed
java-utils/pom_editor.py | 4 ++-
.../example_parent_plugin_with_module.xml | 28 ++++++++++++++++++++
test/pom_editor_paths_test.py | 9 ++++++
3 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index 57dd8a7..fd43cc8 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -93,13 +93,15 @@ def find_pom(pompath):
def find_poms_recursive(pomspec):
modules = [find_pom(pomspec)]
found = set(modules)
+ module_xpath = '/pom:project/pom:modules/pom:module |\
+ /pom:project/pom:profile/pom:modules/pom:module'
try:
while modules:
pompath = find_pom(modules.pop())
found.add(pompath)
pom_xml = etree.parse(pompath)
modules += [path.join(path.dirname(pompath), node.text.strip())
- for node in pom_xml.xpath('//pom:modules/pom:module',
+ for node in pom_xml.xpath(module_xpath,
namespaces=Pom.NSMAP)]
return found
diff --git a/test/data/pom_editor/example_parent_plugin_with_module.xml b/test/data/pom_editor/example_parent_plugin_with_module.xml
new file mode 100644
index 0000000..8fd2c0d
--- /dev/null
+++ b/test/data/pom_editor/example_parent_plugin_with_module.xml
@@ -0,0 +1,28 @@
+<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">
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modules>
+ <module>intermediate</module>
+ </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>parent</artifactId>
+ <version>2.6</version>
+ <name>Example parent</name>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>4.0</version>
+ <configuration>
+ <module>common</module>
+ </configuration>
+ </plugin>
+ </plugins>
+
+
+</project>
diff --git a/test/pom_editor_paths_test.py b/test/pom_editor_paths_test.py
index db6188d..e699727 100644
--- a/test/pom_editor_paths_test.py
+++ b/test/pom_editor_paths_test.py
@@ -125,6 +125,15 @@ class TestRecursive(WorkdirTestCase):
self.assertEqual(0, return_value, stderr)
self.assertEqual('', report, report)
+ def test_recursive_plugin_with_module(self):
+ poms_tree = dict(self.example_tree)
+ poms_tree[''] = 'example_parent_plugin_with_module.xml'
+ return_value, stderr, report = exec_pom_macro('%pom_remove_dep -r :junit',
+ poms_tree=poms_tree,
+ want_tree={'intermediate/schemas': 'example_schemas_removed_junit.xml'})
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
def test_default_recursive_profile(self):
poms_tree = dict(self.example_tree)
poms_tree[''] = 'example_parent_profile.xml'
10 years
[javapackages/pom_editor.py] [pom_editor] implement pom_change_dep
by Michael Šimáček
commit 21181987ef60005218ebcf57a865f18c36c4a722
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Tue Feb 4 17:10:01 2014 +0100
[pom_editor] implement pom_change_dep
etc/macros.fjava | 3 ++
java-utils/pom_editor.py | 76 +++++++++++++++++++++++++++++++++++++--------
2 files changed, 65 insertions(+), 14 deletions(-)
---
diff --git a/etc/macros.fjava b/etc/macros.fjava
index 56e5f72..b0918be 100644
--- a/etc/macros.fjava
+++ b/etc/macros.fjava
@@ -337,3 +337,6 @@ sort -u -o ${_filelist} ${_filelist} \
#
%pom_add_plugin() %{expand: %{__pom_call}add_plugin %*
}
+
+%pom_change_dep(rf) %{expand: %{__pom_call}change_dep %**
+}
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index 98b3b38..57dd8a7 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -24,12 +24,27 @@ class PomQueryInvalid(PomException):
def MetaArtifact(specification, **defaults):
parts = specification.split(':')
class Artifact(object):
- def __init__(self, values):
+ def __init__(self, **values):
self.values = dict.fromkeys(parts, '')
self.values.update(defaults)
- for key, value in zip(parts, values.split(':')):
+ self.values.update(values)
+
+ @classmethod
+ def from_mvn_str(cls, string):
+ values = {}
+ for key, value in zip(parts, string.split(':')):
if value:
- self.values[key] = value
+ values[key] = value
+ return cls(**values)
+
+ @classmethod
+ def from_xml(cls, element):
+ values = {}
+ for part in parts:
+ subelement = element.find('{*}' + part)
+ if subelement is not None:
+ values[part] = subelement.text.strip()
+ return cls(**values)
def get_xml(self):
xml = ''
@@ -47,6 +62,22 @@ def MetaArtifact(specification, **defaults):
if value and value != '*':
conditions.append(expr.format(key, value))
return ' and '.join(conditions) if conditions else 'true()'
+
+ def update(self, artifact):
+ for key, value in artifact.values.iteritems():
+ if key not in parts:
+ raise KeyError(key + ' not defined')
+ if value:
+ self[key] = value
+
+ def __getitem__(self, key):
+ return self.values[key]
+
+ def __setitem__(self, key, value):
+ if key not in parts:
+ raise KeyError(key + ' not defined')
+ self.values[key] = value
+
return Artifact
def find_pom(pompath):
@@ -129,7 +160,7 @@ def macro():
if matches == 0 and not options.force:
raise exception
- except Exception as exception:
+ except (PomException, etree.XMLSyntaxError, IOError, TypeError) as exception:
if pompath:
print >> sys.stderr, "Error in processing {0}".format(pompath)
print >> sys.stderr, exception.message
@@ -143,7 +174,7 @@ def macro():
class Pom(object):
NSMAP = {'pom': 'http://maven.apache.org/POM/4.0.0',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
- POM_NS = '{' + NSMAP['pom'] + '}'
+ NS = '{' + NSMAP['pom'] + '}'
XMLNS = ('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 '
@@ -206,7 +237,7 @@ class Pom(object):
if elements:
child = node.find(elements[0], namespaces=self.NSMAP)
if child is None:
- name = re.sub(r'pom:', self.POM_NS, elements[0])
+ name = re.sub(r'pom:', self.NS, elements[0])
child = etree.Element(name)
node.insert(0, child)
node.insert(0, etree.Comment(" section added by maintainer "))
@@ -284,7 +315,8 @@ artifact_spec = 'groupId:artifactId:version'
artifact_spec_scoped = artifact_spec + ':scope'
VersionedArtifact = MetaArtifact(artifact_spec)
DefaultVersionedArtifact = MetaArtifact(artifact_spec, version='any')
-ScopedArtifact = MetaArtifact(artifact_spec_scoped, version='any')
+ScopedArtifact = MetaArtifact(artifact_spec_scoped)
+DefaultScopedArtifact = MetaArtifact(artifact_spec_scoped, version='any')
@macro()
def pom_xpath_inject(where, xml_string, pom=None):
@@ -314,7 +346,7 @@ def pom_xpath_set(where, content, pom=None):
def pom_remove_dep(dep, pom=None):
"""[groupId]:[artifactId] [POM location]"""
try:
- artifact = VersionedArtifact(dep)
+ artifact = VersionedArtifact.from_mvn_str(dep)
xpath = "//pom:dependency[{0}]".format(artifact.get_xpath_condition())
elements = pom.xpath_query(xpath)
for element in elements:
@@ -326,7 +358,7 @@ def pom_remove_dep(dep, pom=None):
def pom_remove_plugin(plugin, pom=None):
"""[groupId]:[artifactId] [POM location]"""
try:
- artifact = VersionedArtifact(plugin)
+ artifact = VersionedArtifact.from_mvn_str(plugin)
xpath = "//pom:plugin[{0}]".format(artifact.get_xpath_condition())
elements = pom.xpath_query(xpath)
for element in elements:
@@ -350,7 +382,7 @@ def pom_add_parent(parent, pom=None):
"""groupId:artifactId[:version] [POM location]"""
if pom.root.find('pom:parent', namespaces=Pom.NSMAP) is not None:
raise PomException("POM already has a parent.")
- artifact = DefaultVersionedArtifact(parent)
+ artifact = DefaultVersionedArtifact.from_mvn_str(parent)
pom.inject_artifact('', 'parent', artifact)
@macro()
@@ -366,7 +398,7 @@ def pom_remove_parent(pom=None):
def pom_set_parent(parent, pom=None):
"""groupId:artifactId[:version] [POM location]"""
try:
- artifact = DefaultVersionedArtifact(parent)
+ artifact = DefaultVersionedArtifact.from_mvn_str(parent)
element = pom.xpath_query_element("/pom:project/pom:parent")
pom.replace_xml_content(element, artifact.get_xml())
except PomQueryNoMatch:
@@ -375,14 +407,14 @@ def pom_set_parent(parent, pom=None):
@macro()
def pom_add_dep(dep, pom=None, xml_string=''):
"""groupId:artifactId[:version[:scope]] [POM location] [extra XML]"""
- artifact = ScopedArtifact(dep)
+ artifact = DefaultScopedArtifact.from_mvn_str(dep)
pom.inject_artifact('pom:dependencies', 'dependency', artifact,
xml_string)
@macro()
def pom_add_dep_mgmt(dep, pom=None, xml_string=''):
"""groupId:artifactId[:version[:scope]] [POM location] [extra XML]"""
- artifact = ScopedArtifact(dep)
+ artifact = DefaultScopedArtifact.from_mvn_str(dep)
pom.inject_artifact('pom:dependencyManagement/pom:dependencies',
'dependency', artifact, xml_string)
@@ -390,10 +422,26 @@ def pom_add_dep_mgmt(dep, pom=None, xml_string=''):
def pom_add_plugin(plugin, pom=None, xml_string=''):
"""groupId:artifactId[:version] [POM location] [extra XML]"""
artifact = MetaArtifact(artifact_spec, version='any',
- groupId='org.apache.maven.plugins')(plugin)
+ groupId='org.apache.maven.plugins').from_mvn_str(plugin)
pom.inject_artifact('pom:build/pom:plugins', 'plugin', artifact,
xml_string)
+@macro()
+def pom_change_dep(old, new, pom=None, xml_string=''):
+ """groupId:artifactId[:version] groupId:artifactId[:version[:scope]]
+ [POM location] [extra XML]"""
+ try:
+ old_artifact = VersionedArtifact.from_mvn_str(old)
+ xpath = "//pom:dependency[{0}]".format(old_artifact.get_xpath_condition())
+ elements = pom.xpath_query(xpath)
+ for element in elements:
+ new_artifact = DefaultScopedArtifact.from_xml(element)
+ new_artifact.update(ScopedArtifact.from_mvn_str(new))
+ new_xml = new_artifact.get_xml() + xml_string
+ pom.replace_xml_content(element, new_xml)
+ except PomQueryNoMatch:
+ raise PomQueryNoMatch("Dependency '{0}' not found.".format(old))
+
if __name__ == '__main__':
if len(sys.argv) <= 1:
print >> sys.stderr, "Usage:\n\t{0} command {{arguments}}"\
10 years
[javapackages/pom_editor.py] [test] tests for pom_change_dep and other artifact macros
by Michael Šimáček
commit 13e94e63a9d96a5822f2af75e448661b0507ab26
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Tue Feb 4 17:08:41 2014 +0100
[test] tests for pom_change_dep and other artifact macros
.../data/pom_editor/want/example_common_apache.xml | 37 ++++++++++
.../pom_editor/want/example_common_commons.xml | 37 ++++++++++
.../data/pom_editor/want/example_common_junit3.xml | 37 ++++++++++
.../want/example_common_removed_all_deps.xml | 16 ++++
test/data/pom_editor/want/minimal_pom_add_ant.xml | 22 ++++++
.../data/pom_editor/want/minimal_pom_add_uimaj.xml | 21 ++++++
test/pom_editor_artifact_test.py | 74 ++++++++++++++++++++
7 files changed, 244 insertions(+), 0 deletions(-)
---
diff --git a/test/data/pom_editor/want/example_common_apache.xml b/test/data/pom_editor/want/example_common_apache.xml
new file mode 100644
index 0000000..e36ab33
--- /dev/null
+++ b/test/data/pom_editor/want/example_common_apache.xml
@@ -0,0 +1,37 @@
+<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">
+ <parent>
+ <groupId>com.example</groupId>
+ <artifactId>parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>common</artifactId>
+ <version>2.6</version>
+ <name>Example common</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-ioX</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/test/data/pom_editor/want/example_common_commons.xml b/test/data/pom_editor/want/example_common_commons.xml
new file mode 100644
index 0000000..4b8cf50
--- /dev/null
+++ b/test/data/pom_editor/want/example_common_commons.xml
@@ -0,0 +1,37 @@
+<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">
+ <parent>
+ <groupId>com.example</groupId>
+ <artifactId>parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>common</artifactId>
+ <version>2.6</version>
+ <name>Example common</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-ioX</groupId>
+ <artifactId>commons</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/test/data/pom_editor/want/example_common_junit3.xml b/test/data/pom_editor/want/example_common_junit3.xml
new file mode 100644
index 0000000..e10d3d5
--- /dev/null
+++ b/test/data/pom_editor/want/example_common_junit3.xml
@@ -0,0 +1,37 @@
+<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">
+ <parent>
+ <groupId>com.example</groupId>
+ <artifactId>parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>common</artifactId>
+ <version>2.6</version>
+ <name>Example common</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit3</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-ioX</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/test/data/pom_editor/want/example_common_removed_all_deps.xml b/test/data/pom_editor/want/example_common_removed_all_deps.xml
new file mode 100644
index 0000000..95c56c9
--- /dev/null
+++ b/test/data/pom_editor/want/example_common_removed_all_deps.xml
@@ -0,0 +1,16 @@
+<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">
+ <parent>
+ <groupId>com.example</groupId>
+ <artifactId>parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>common</artifactId>
+ <version>2.6</version>
+ <name>Example common</name>
+
+ <dependencies>
+ </dependencies>
+
+</project>
diff --git a/test/data/pom_editor/want/minimal_pom_add_ant.xml b/test/data/pom_editor/want/minimal_pom_add_ant.xml
new file mode 100644
index 0000000..b4cd6fc
--- /dev/null
+++ b/test/data/pom_editor/want/minimal_pom_add_ant.xml
@@ -0,0 +1,22 @@
+<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">
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-parent</artifactId>
+ <version>any</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <name>Commons Lang</name>
+
+</project>
diff --git a/test/data/pom_editor/want/minimal_pom_add_uimaj.xml b/test/data/pom_editor/want/minimal_pom_add_uimaj.xml
new file mode 100644
index 0000000..f81f8d7
--- /dev/null
+++ b/test/data/pom_editor/want/minimal_pom_add_uimaj.xml
@@ -0,0 +1,21 @@
+<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">
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.uima</groupId>
+ <artifactId>uimaj</artifactId>
+ <version>2.5.0</version>
+ </dependency>
+ </dependencies>
+
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <name>Commons Lang</name>
+
+</project>
diff --git a/test/pom_editor_artifact_test.py b/test/pom_editor_artifact_test.py
new file mode 100644
index 0000000..c5069d3
--- /dev/null
+++ b/test/pom_editor_artifact_test.py
@@ -0,0 +1,74 @@
+from test_common import exec_pom_macro_simple, WorkdirTestCase
+
+class TestPomArtifact(WorkdirTestCase):
+ def test_gid1(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_remove_dep commons-ioX",
+ 'example_common.xml', 'example_common_removed_commons_iox.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_gid2(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_remove_dep commons-ioX:",
+ 'example_common.xml', 'example_common_removed_commons_iox.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_aid(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_remove_dep :junit",
+ 'example_schemas.xml', 'example_schemas_removed_junit.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_all(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_remove_dep :",
+ 'example_common.xml', 'example_common_removed_all_deps.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_version(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_add_dep org.apache.uima:uimaj:2.5.0",
+ 'minimal_pom.xml', 'minimal_pom_add_uimaj.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_scope(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_add_dep org.apache.ant:ant-parent::test",
+ 'minimal_pom.xml', 'minimal_pom_add_ant.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+class TestPomChange(WorkdirTestCase):
+ def test_change_simple(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_change_dep junit:junit junit:junit3",
+ 'example_common.xml', 'example_common_junit3.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_copy_aid1(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_change_dep commons-io org.apache.commons-io",
+ 'example_common.xml', 'example_common_apache.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_copy_aid2(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_change_dep commons-io: org.apache.commons-io:",
+ 'example_common.xml', 'example_common_apache.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
+ def test_copy_gid(self):
+ return_value, stderr, report = exec_pom_macro_simple(\
+ "%pom_change_dep :commons-io :commons",
+ 'example_common.xml', 'example_common_commons.xml')
+ self.assertEqual(0, return_value, stderr)
+ self.assertEqual('', report, report)
+
10 years
[javapackages/pom_editor.py] [test] refactor tests
by Michael Šimáček
commit ba6355f3c38601d827207df2c9b36dc8533d40f8
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Tue Feb 4 17:06:57 2014 +0100
[test] refactor tests
test/pom_editor_paths_test.py | 40 +-------------------
test/test_common.py | 85 ++++++++++++++++++++++++++++++-----------
test/test_rpmbuild.py | 2 +-
3 files changed, 65 insertions(+), 62 deletions(-)
---
diff --git a/test/pom_editor_paths_test.py b/test/pom_editor_paths_test.py
index f3abd25..db6188d 100644
--- a/test/pom_editor_paths_test.py
+++ b/test/pom_editor_paths_test.py
@@ -1,42 +1,4 @@
-from os import path
-from test_rpmbuild import Package
-from test_common import DIRPATH, WorkdirTestCase
-from xml_compare import compare_xml_files
-
-DATADIR = path.join(DIRPATH, 'data', 'pom_editor')
-
-def exec_pom_macro(line, poms_tree, want_tree=None):
- """
- Parameters:
- line::
- A line of spec code injected to %prep
- poms_tree::
- dictionary that maps subpackage directory paths to input poms
- want_tree::
- dictionary that maps subpackage directory paths to wanted poms
- (in want directory)
- It creates a directory structure corresponding to keys in poms_tree and
- copies pom files into it. Then it executes prep and compares altered poms
- to wanted ones from want_tree (if not specified in want_tree it is assumed
- to remain unchanged and is compared with the original pom). Returns tuple
- of rpmbuild's return value, stderr and report of differences in xml files.
- """
- pack = Package('test')
- pack.append_to_prep(line)
- for destpath, sourcepath in poms_tree.iteritems():
- pack.add_source(path.join(DATADIR, sourcepath), path.join(destpath, 'pom.xml'))
- _, stderr, return_value = pack.run_prep()
- reports = []
- if return_value == 0:
- for filepath, pom in poms_tree.iteritems():
- if want_tree and filepath in want_tree:
- expected_pom = path.join('want', want_tree[filepath])
- else:
- expected_pom = pom
- expected_pom = path.join(DATADIR, expected_pom)
- actual_pom = path.join(pack.buildpath, filepath, 'pom.xml')
- reports.append(compare_xml_files(actual_pom, expected_pom))
- return return_value, stderr, '\n'.join(reports).strip()
+from test_common import exec_pom_macro, WorkdirTestCase
class TestPomPath(WorkdirTestCase):
def test_sanity(self):
diff --git a/test/test_common.py b/test/test_common.py
index c8a8075..4bab110 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -5,8 +5,12 @@ import subprocess
import sys
import unittest
-DIRPATH = os.path.dirname(os.path.realpath(__file__))
-PYTHONPATH = os.path.join(DIRPATH, '../python')
+from os import path
+from test_rpmbuild import Package
+from xml_compare import compare_xml_files
+
+DIRPATH = path.dirname(path.realpath(__file__))
+PYTHONPATH = path.join(DIRPATH, '../python')
sys.path.append(PYTHONPATH)
SCRIPT_ENV = {'PATH':'{mock}:{real}'.format(mock=DIRPATH,
real=os.environ['PATH']),
@@ -15,7 +19,7 @@ SCRIPT_ENV = {'PATH':'{mock}:{real}'.format(mock=DIRPATH,
def call_script(name, args, stdin = None, wrapped = False):
outfile = open("tmpout", 'w')
errfile = open("tmperr", 'w')
- procargs = [sys.executable, os.path.join(DIRPATH, 'wrapper.py'), name]
+ procargs = [sys.executable, path.join(DIRPATH, 'wrapper.py'), name]
proc = subprocess.Popen(procargs + args, shell = False,
stdout = outfile, stderr = errfile, env = SCRIPT_ENV,
stdin = subprocess.PIPE)
@@ -36,7 +40,7 @@ def get_config_file_list():
return []
def get_actual_config(filename):
- return os.path.join('.xmvn', 'config.d', filename)
+ return path.join('.xmvn', 'config.d', filename)
def get_expected_config(filename, scriptname, testname):
fileno = re.findall('[0-9]+', filename)
@@ -44,26 +48,26 @@ def get_expected_config(filename, scriptname, testname):
expfname = '{name}_{idx}.xml'.format(name=testname, idx=fileno[-1])
else:
expfname = filename
- return os.path.join(DIRPATH, 'data', scriptname, expfname)
+ return path.join(DIRPATH, 'data', scriptname, expfname)
def get_actual_args():
return open('.xmvn/out').read()
def get_expected_args(scriptname, testname):
- return open(os.path.join(DIRPATH, 'data', scriptname,
+ return open(path.join(DIRPATH, 'data', scriptname,
"{name}_out".format(name=testname))).read()
def preload_xmvn_config(name, filename, dstname=None, update_index=False):
def test_decorator(fun):
def test_decorated(self):
- src = os.path.join(DIRPATH, 'data', name, filename)
+ src = path.join(DIRPATH, 'data', name, filename)
os.mkdir('.xmvn')
os.mkdir('.xmvn/config.d')
- dst = os.path.join('.xmvn', 'config.d', dstname or filename)
+ dst = path.join('.xmvn', 'config.d', dstname or filename)
shutil.copy(src, dst)
if update_index:
idx = 1
- if os.path.exists('.xmvn/javapackages-rule-index'):
+ if path.exists('.xmvn/javapackages-rule-index'):
with open('.xmvn/javapackages-rule-index', 'r') as index:
idx = int(index.read())
with open('.xmvn/javapackages-rule-index', 'w') as index:
@@ -75,8 +79,8 @@ def preload_xmvn_config(name, filename, dstname=None, update_index=False):
def xmvnconfig(name, fnargs):
def test_decorator(fun):
def test_decorated(self):
- path = os.path.join(DIRPATH, '..', 'java-utils', name + '.py')
- (stdout, stderr, return_value) = call_script(path, fnargs)
+ scriptpath = path.join(DIRPATH, '..', 'java-utils', name + '.py')
+ (stdout, stderr, return_value) = call_script(scriptpath, fnargs)
fun(self, stdout, stderr, return_value)
return test_decorated
return test_decorator
@@ -84,15 +88,15 @@ def xmvnconfig(name, fnargs):
def build_depmap_paths(filelist):
paths = []
for filename in filelist:
- paths.append(os.path.join(DIRPATH, 'depmaps', filename))
+ paths.append(path.join(DIRPATH, 'depmaps', filename))
return '\n'.join(paths)
def mavenprov(filelist):
def test_decorator(fun):
def test_decorated(self):
- path = os.path.join(DIRPATH, '..', 'depgenerators', 'maven.prov')
+ scriptpath = path.join(DIRPATH, '..', 'depgenerators', 'maven.prov')
stdin = build_depmap_paths(filelist)
- (stdout, stderr, return_value) = call_script(path,
+ (stdout, stderr, return_value) = call_script(scriptpath,
[], stdin=stdin, wrapped=True)
fun(self, stdout, stderr, return_value)
return test_decorated
@@ -101,9 +105,9 @@ def mavenprov(filelist):
def mavenreq(filelist):
def test_decorator(fun):
def test_decorated(self):
- path = os.path.join(DIRPATH, '..', 'depgenerators', 'maven.req')
+ scriptpath = path.join(DIRPATH, '..', 'depgenerators', 'maven.req')
stdin = build_depmap_paths(filelist)
- (stdout, stderr, return_value) = call_script(path,
+ (stdout, stderr, return_value) = call_script(scriptpath,
[], stdin=stdin, wrapped=True)
fun(self, stdout, stderr, return_value)
return test_decorated
@@ -113,12 +117,12 @@ def mvn_depmap(pom, jar=None, fnargs=None):
def test_decorator(fun):
def test_decorated(self):
os.chdir(self.workdir)
- path = os.path.join(DIRPATH, '..', 'java-utils', 'maven_depmap.py')
+ scriptpath = path.join(DIRPATH, '..', 'java-utils', 'maven_depmap.py')
args = ['.fragment_data', pom]
if jar:
- args.append(os.path.join(os.getcwd(), jar))
+ args.append(path.join(os.getcwd(), jar))
args.extend(fnargs or [])
- (stdout, stderr, return_value) = call_script(path, args)
+ (stdout, stderr, return_value) = call_script(scriptpath, args)
frag = None
if return_value == 0:
with open('.fragment_data','r') as frag_file:
@@ -132,12 +136,12 @@ def mvn_artifact(pom, jar=None):
def test_decorator(fun):
def test_decorated(self):
os.chdir(self.datadir)
- path = os.path.join(DIRPATH, '..', 'java-utils', 'mvn_artifact.py')
+ scriptpath = path.join(DIRPATH, '..', 'java-utils', 'mvn_artifact.py')
os.chdir(self.workdir)
args = [pom]
if jar:
- args.append(os.path.join(os.getcwd(), jar))
- (stdout, stderr, return_value) = call_script(path, args)
+ args.append(path.join(os.getcwd(), jar))
+ (stdout, stderr, return_value) = call_script(scriptpath, args)
fun(self, stdout, stderr, return_value)
return test_decorated
return test_decorator
@@ -161,3 +165,40 @@ class WorkdirTestCase(unittest.TestCase):
except OSError:
pass
os.chdir(self.olddir)
+
+def exec_pom_macro(line, poms_tree, want_tree=None):
+ """
+ Parameters:
+ line::
+ A line of spec code injected to %prep
+ poms_tree::
+ dictionary that maps subpackage directory paths to input poms
+ want_tree::
+ dictionary that maps subpackage directory paths to wanted poms
+ (in want directory)
+ It creates a directory structure corresponding to keys in poms_tree and
+ copies pom files into it. Then it executes prep and compares altered poms
+ to wanted ones from want_tree (if not specified in want_tree it is assumed
+ to remain unchanged and is compared with the original pom). Returns tuple
+ of rpmbuild's return value, stderr and report of differences in xml files.
+ """
+ DATADIR = path.join(DIRPATH, 'data', 'pom_editor')
+ pack = Package('test')
+ pack.append_to_prep(line)
+ for destpath, sourcepath in poms_tree.iteritems():
+ pack.add_source(path.join(DATADIR, sourcepath), path.join(destpath, 'pom.xml'))
+ _, stderr, return_value = pack.run_prep()
+ reports = []
+ if return_value == 0:
+ for filepath, pom in poms_tree.iteritems():
+ if want_tree and filepath in want_tree:
+ expected_pom = path.join('want', want_tree[filepath])
+ else:
+ expected_pom = pom
+ expected_pom = path.join(DATADIR, expected_pom)
+ actual_pom = path.join(pack.buildpath, filepath, 'pom.xml')
+ reports.append(compare_xml_files(actual_pom, expected_pom))
+ return return_value, stderr, '\n'.join(reports).strip()
+
+def exec_pom_macro_simple(line, pom, want=None):
+ return exec_pom_macro(line, {'': pom}, {'': want} if want else None)
diff --git a/test/test_rpmbuild.py b/test/test_rpmbuild.py
index 14a45e1..4eefc4d 100644
--- a/test/test_rpmbuild.py
+++ b/test/test_rpmbuild.py
@@ -5,7 +5,7 @@ import shutil
from textwrap import dedent
-from test_common import DIRPATH
+DIRPATH = os.path.dirname(os.path.realpath(__file__))
class Package(object):
"""Represents single RPM package that should be built.
10 years
[lucene] Update to 4.7.1 upstream release.
by Alexander Kurtakov
commit ebae18ef252288ccb274b488079f0095763926fe
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Thu Apr 3 14:20:49 2014 +0300
Update to 4.7.1 upstream release.
.gitignore | 2 +
lucene-4.7.0-analysis-OSGi-MANIFEST.MF | 63 --------------------
lucene-4.7.0-core-OSGi-MANIFEST.MF | 23 -------
lucene-4.7.1-analysis-OSGi-MANIFEST.MF | 63 ++++++++++++++++++++
lucene-4.7.1-core-OSGi-MANIFEST.MF | 23 +++++++
...MF => lucene-4.7.1-queryparser-OSGi-MANIFEST.MF | 38 ++++++------
lucene.spec | 11 ++-
sources | 4 +-
8 files changed, 116 insertions(+), 111 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f687fe1..0df66c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ dev-tools.tar.xz
/lucene-4.6.1-src.tgz
/lucene-4.7.0-src.tgz
/dev-tools-4.7.0.tar.xz
+/dev-tools-4.7.1.tar.xz
+/lucene-4.7.1-src.tgz
diff --git a/lucene-4.7.1-analysis-OSGi-MANIFEST.MF b/lucene-4.7.1-analysis-OSGi-MANIFEST.MF
new file mode 100644
index 0000000..19d7e36
--- /dev/null
+++ b/lucene-4.7.1-analysis-OSGi-MANIFEST.MF
@@ -0,0 +1,63 @@
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-SymbolicName: org.apache.lucene.analysis
+Require-Bundle: org.apache.lucene.core;bundle-version="4.7.1"
+Export-Package: org.apache.lucene.analysis.ar;version="4.7.1",
+ org.apache.lucene.analysis.core;version="4.7.1",
+ org.apache.lucene.analysis.bg;version="4.7.1",
+ org.apache.lucene.analysis.br;version="4.7.1",
+ org.apache.lucene.analysis.ca;version="4.7.1",
+ org.apache.lucene.analysis.cjk;version="4.7.1",
+ org.apache.lucene.analysis.cn;version="4.7.1",
+ org.apache.lucene.analysis.compound;version="4.7.1",
+ org.apache.lucene.analysis.compound.hyphenation;version="4.7.1",
+ org.apache.lucene.analysis.cz;version="4.7.1",
+ org.apache.lucene.analysis.da;version="4.7.1",
+ org.apache.lucene.analysis.de;version="4.7.1",
+ org.apache.lucene.analysis.el;version="4.7.1",
+ org.apache.lucene.analysis.en;version="4.7.1",
+ org.apache.lucene.analysis.es;version="4.7.1",
+ org.apache.lucene.analysis.eu;version="4.7.1",
+ org.apache.lucene.analysis.fa;version="4.7.1",
+ org.apache.lucene.analysis.fi;version="4.7.1",
+ org.apache.lucene.analysis.fr;version="4.7.1",
+ org.apache.lucene.analysis.gl;version="4.7.1",
+ org.apache.lucene.analysis.hi;version="4.7.1",
+ org.apache.lucene.analysis.hu;version="4.7.1",
+ org.apache.lucene.analysis.hunspell;version="4.7.1",
+ org.apache.lucene.analysis.hy;version="4.7.1",
+ org.apache.lucene.analysis.id;version="4.7.1",
+ org.apache.lucene.analysis.in;version="4.7.1",
+ org.apache.lucene.analysis.it;version="4.7.1",
+ org.apache.lucene.analysis.lv;version="4.7.1",
+ org.apache.lucene.analysis.miscellaneous;version="4.7.1",
+ org.apache.lucene.analysis.ngram;version="4.7.1",
+ org.apache.lucene.analysis.nl;version="4.7.1",
+ org.apache.lucene.analysis.no;version="4.7.1",
+ org.apache.lucene.analysis.path;version="4.7.1",
+ org.apache.lucene.analysis.payloads;version="4.7.1",
+ org.apache.lucene.analysis.position;version="4.7.1",
+ org.apache.lucene.analysis.pt;version="4.7.1",
+ org.apache.lucene.analysis.query;version="4.7.1",
+ org.apache.lucene.analysis.reverse;version="4.7.1",
+ org.apache.lucene.analysis.ro;version="4.7.1",
+ org.apache.lucene.analysis.ru;version="4.7.1",
+ org.apache.lucene.analysis.shingle;version="4.7.1",
+ org.apache.lucene.analysis.sinks;version="4.7.1",
+ org.apache.lucene.analysis.snowball;version="4.7.1",
+ org.apache.lucene.analysis.standard;version="4.7.1",
+ org.apache.lucene.analysis.sv;version="4.7.1",
+ org.apache.lucene.analysis.synonym;version="4.7.1",
+ org.apache.lucene.analysis.th;version="4.7.1",
+ org.apache.lucene.analysis.tr;version="4.7.1",
+ org.apache.lucene.analysis.util;version="4.7.1",
+ org.apache.lucene.analysis.wikipedia;version="4.7.1",
+ org.apache.lucene.collation;version="4.7.1"
+Bundle-Version: 4.7.1
+Bundle-Vendor: fedoraproject.org
+Bundle-Name: Lucene contributed extensions
+Import-Package: org.xml.sax;resolution:=optional,
+ javax.xml.parsers;resolution:=optional,
+ org.xml.sax.helpers;resolution:=optional
+Bundle-ManifestVersion: 2
+
diff --git a/lucene-4.7.1-core-OSGi-MANIFEST.MF b/lucene-4.7.1-core-OSGi-MANIFEST.MF
new file mode 100644
index 0000000..154d757
--- /dev/null
+++ b/lucene-4.7.1-core-OSGi-MANIFEST.MF
@@ -0,0 +1,23 @@
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-SymbolicName: org.apache.lucene.core
+Import-Package: javax.management
+Export-Package: org.apache.lucene;version="4.7.1",
+ org.apache.lucene.analysis;version="4.7.1",
+ org.apache.lucene.analysis.tokenattributes;version="4.7.1",
+ org.apache.lucene.document;version="4.7.1",
+ org.apache.lucene.index;version="4.7.1",
+ org.apache.lucene.search;version="4.7.1",
+ org.apache.lucene.search.payloads;version="4.7.1",
+ org.apache.lucene.search.spans;version="4.7.1",
+ org.apache.lucene.search.similarities;version="4.7.1",
+ org.apache.lucene.store;version="4.7.1",
+ org.apache.lucene.util;version="4.7.1",
+ org.apache.lucene.util.fst;version="4.7.1",
+ org.apache.lucene.util.packed;version="4.7.1",
+ org.apache.lucene.util.mutable;version="4.7.1",
+ org.apache.lucene.util.automaton;version="4.7.1"
+Bundle-Version: 4.7.1
+Bundle-Vendor: fedoraproject.org
+Bundle-Name: High-performance, full-featured text search engine
+Bundle-ManifestVersion: 2
diff --git a/lucene-4.7.0-queryparser-OSGi-MANIFEST.MF b/lucene-4.7.1-queryparser-OSGi-MANIFEST.MF
similarity index 53%
rename from lucene-4.7.0-queryparser-OSGi-MANIFEST.MF
rename to lucene-4.7.1-queryparser-OSGi-MANIFEST.MF
index b84210b..5f6db90 100644
--- a/lucene-4.7.0-queryparser-OSGi-MANIFEST.MF
+++ b/lucene-4.7.1-queryparser-OSGi-MANIFEST.MF
@@ -1,25 +1,25 @@
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-SymbolicName: org.apache.lucene.queryparser
-Require-Bundle: org.apache.lucene.core;bundle-version="4.7.0"
-Export-Package: org.apache.lucene.queryparser.analyzing;version="4.7.0",
- org.apache.lucene.queryparser.classic;version="4.7.0",
- org.apache.lucene.queryparser.complexPhrase;version="4.7.0",
- org.apache.lucene.queryparser.ext;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.builders;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.config;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.messages;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.nodes;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.parser;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.processors;version="4.7.0",
- org.apache.lucene.queryparser.flexible.core.util;version="4.7.0",
- org.apache.lucene.queryparser.simple;version="4.7.0",
- org.apache.lucene.queryparser.surround.parser;version="4.7.0",
- org.apache.lucene.queryparser.surround.query;version="4.7.0",
- org.apache.lucene.queryparser.xml;version="4.7.0",
- org.apache.lucene.queryparser.xml.builders;version="4.7.0"
-Bundle-Version: 4.7.0
+Require-Bundle: org.apache.lucene.core;bundle-version="4.7.1"
+Export-Package: org.apache.lucene.queryparser.analyzing;version="4.7.1",
+ org.apache.lucene.queryparser.classic;version="4.7.1",
+ org.apache.lucene.queryparser.complexPhrase;version="4.7.1",
+ org.apache.lucene.queryparser.ext;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.builders;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.config;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.messages;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.nodes;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.parser;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.processors;version="4.7.1",
+ org.apache.lucene.queryparser.flexible.core.util;version="4.7.1",
+ org.apache.lucene.queryparser.simple;version="4.7.1",
+ org.apache.lucene.queryparser.surround.parser;version="4.7.1",
+ org.apache.lucene.queryparser.surround.query;version="4.7.1",
+ org.apache.lucene.queryparser.xml;version="4.7.1",
+ org.apache.lucene.queryparser.xml.builders;version="4.7.1"
+Bundle-Version: 4.7.1
Bundle-Vendor: fedoraproject.org
Bundle-Name: Lucene Query parsers and parsing framework
Import-Package: org.xml.sax;resolution:=optional,
diff --git a/lucene.spec b/lucene.spec
index 579ea6b..0485764 100644
--- a/lucene.spec
+++ b/lucene.spec
@@ -30,8 +30,8 @@
Summary: High-performance, full-featured text search engine
Name: lucene
-Version: 4.7.0
-Release: 8%{?dist}
+Version: 4.7.1
+Release: 1%{?dist}
Epoch: 0
License: ASL 2.0
URL: http://lucene.apache.org/
@@ -39,8 +39,8 @@ Source0: http://www.apache.org/dist/lucene/java/%{version}/%{name}-%{vers
Source1: lucene-%{version}-core-OSGi-MANIFEST.MF
Source2: lucene-%{version}-analysis-OSGi-MANIFEST.MF
Source3: lucene-%{version}-queryparser-OSGi-MANIFEST.MF
-#svn export http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_7_0/dev-tools/
-#tar caf dev-tools-4.7.0.tar.xz dev-tools/
+#svn export http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_7_1/dev-tools/
+#tar caf dev-tools-4.7.1.tar.xz dev-tools/
Source4: dev-tools-%{version}.tar.xz
Patch0: 0001-disable-ivy-settings.patch
@@ -391,6 +391,9 @@ popd
%doc LICENSE.txt
%changelog
+* Thu Apr 3 2014 Alexander Kurtakov <akurtako(a)redhat.com> 0:4.7.1-1
+- Update to 4.7.1 upstream release.
+
* Tue Mar 25 2014 Michael Simacek <msimacek(a)redhat.com> - 0:4.7.0-8
- Enable tests that required newer icu4j and nekohtml
diff --git a/sources b/sources
index d2f9839..e9bc08c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-07dbe7b3116c083fc9142d880e91aee8 lucene-4.7.0-src.tgz
-70ab1404e65aeb4522ae08e2eb60249c dev-tools-4.7.0.tar.xz
+eaa27b5325ddd6aa22004ce9150d0db7 dev-tools-4.7.1.tar.xz
+88b83d99f6edb429ffd1411f2ba16a61 lucene-4.7.1-src.tgz
10 years