[javapackages/big-refactoring] [dependency] "optional" is None by default
by Michal Srb
commit 6b775612e8e4ecc1bee53c34ddcd9b0c2fffd840
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Jun 6 11:45:07 2014 +0200
[dependency] "optional" is None by default
None means that "optional" element was not specified in XML.
python/javapackages/maven/dependency.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/python/javapackages/maven/dependency.py b/python/javapackages/maven/dependency.py
index 5979b6e..86a4793 100644
--- a/python/javapackages/maven/dependency.py
+++ b/python/javapackages/maven/dependency.py
@@ -42,7 +42,7 @@ from lxml.etree import Element, SubElement, tostring
class Dependency(AbstractArtifact):
def __init__(self, groupId, artifactId, extension="", classifier="",
- version="", scope="", optional=False, exclusions=set()):
+ version="", scope="", optional=None, exclusions=set()):
self.groupId = groupId.strip()
self.artifactId = artifactId.strip()
self.extension = extension.strip()
@@ -62,7 +62,7 @@ class Dependency(AbstractArtifact):
item = SubElement(root, "scope")
item.text = self.scope
- if self.optional:
+ if self.optional is not None:
item = SubElement(root, "optional")
item.text = str(self.optional).lower()
@@ -87,7 +87,7 @@ class Dependency(AbstractArtifact):
'classifier': '',
'version': '',
'scope': '',
- 'optional': False}
+ 'optional': None}
parts = POMReader.find_parts(xmlnode, parts)
@@ -96,7 +96,7 @@ class Dependency(AbstractArtifact):
"Empty groupId or artifactId encountered. "
"This is a bug, please report it!")
- if parts['optional'] is not False:
+ if parts['optional'] is not None:
if parts['optional'] == "false":
parts['optional'] = False
elif parts['optional'] == "true":
9 years, 11 months
[Bug 1105578] New: portlet-2.0-api should not require portals-pom
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1105578
Bug ID: 1105578
Summary: portlet-2.0-api should not require portals-pom
Product: Fedora
Version: rawhide
Component: portlet-2.0-api
Assignee: puntogil(a)libero.it
Reporter: sgehwolf(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:
yum install apache-commons-fileupload drags in maven in rawhide. Excerpt of yum
log is:
--> Running transaction check
---> Package apache-commons-fileupload.noarch 0:1.3.1-3.fc21 will be
installed
Checking deps for apache-commons-fileupload.noarch 0:1.3.1-3.fc21 - u
looking for ('java-headless', 'GE', ('1', '1.6.0', None)) as a requirement
of apache-commons-fileupload.noarch 0:1.3.1-3.fc21 - u
looking for ('portlet-2.0-api', None, (None, None, None)) as a requirement
of apache-commons-fileupload.noarch 0:1.3.1-3.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of apache-commons-fileupload.noarch 0:1.3.1-3.fc21 - u
looking for ('apache-commons-io', None, (None, None, None)) as a
requirement of apache-commons-fileupload.noarch 0:1.3.1-3.fc21 - u
apache-commons-fileupload-1.3.1-3.fc21.noarch requires: portlet-2.0-api
--> Processing Dependency: portlet-2.0-api for package:
apache-commons-fileupload-1.3.1-3.fc21.noarch
Searching pkgSack for dep: portlet-2.0-api
TSINFO: Marking portlet-2.0-api-1.0-8.fc21.noarch as install for
apache-commons-fileupload-1.3.1-3.fc21.noarch
---> Package tomcat.noarch 0:7.0.54-1.fc21 will be installed
Checking deps for tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('tomcat-lib', 'EQ', ('0', '7.0.54', '1.fc21')) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('java-headless', 'GE', ('1', '1.6.0', None)) as a requirement
of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('systemd-units', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('systemd-units', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('shadow-utils', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('procps', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('chkconfig', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('chkconfig', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-pool', None, (None, None, None)) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-logging', None, (None, None, None)) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-dbcp', None, (None, None, None)) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-daemon', None, (None, None, None)) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-collections', None, (None, None, None)) as a
requirement of tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
looking for ('/bin/bash', None, (None, None, None)) as a requirement of
tomcat.noarch 0:7.0.54-1.fc21 - u
tomcat-7.0.54-1.fc21.noarch requires: tomcat-lib = 7.0.54-1.fc21
--> Processing Dependency: tomcat-lib = 7.0.54-1.fc21 for package:
tomcat-7.0.54-1.fc21.noarch
Searching pkgSack for dep: tomcat-lib
TSINFO: Marking tomcat-lib-7.0.54-1.fc21.noarch as install for
tomcat-7.0.54-1.fc21.noarch
--> Running transaction check
---> Package portlet-2.0-api.noarch 0:1.0-8.fc21 will be installed
Checking deps for portlet-2.0-api.noarch 0:1.0-8.fc21 - u
looking for ('java-headless', 'GE', ('0', '1.5', None)) as a requirement of
portlet-2.0-api.noarch 0:1.0-8.fc21 - u
looking for ('mvn(org.apache.portals:portals-pom)', None, (None, None,
None)) as a requirement of portlet-2.0-api.noarch 0:1.0-8.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of portlet-2.0-api.noarch 0:1.0-8.fc21 - u
portlet-2.0-api-1.0-8.fc21.noarch requires:
mvn(org.apache.portals:portals-pom)
--> Processing Dependency: mvn(org.apache.portals:portals-pom) for package:
portlet-2.0-api-1.0-8.fc21.noarch
Searching pkgSack for dep: mvn(org.apache.portals:portals-pom)
TSINFO: Marking portals-pom-1.3-9.fc21.noarch as install for
portlet-2.0-api-1.0-8.fc21.noarch
---> Package tomcat-lib.noarch 0:7.0.54-1.fc21 will be installed
Checking deps for tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('tomcat-servlet-3.0-api', 'EQ', ('0', '7.0.54', '1.fc21')) as
a requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('tomcat-jsp-2.2-api', 'EQ', ('0', '7.0.54', '1.fc21')) as a
requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('tomcat-el-2.2-api', 'EQ', ('0', '7.0.54', '1.fc21')) as a
requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('ecj', 'GE', ('1', '4.2.1', None)) as a requirement of
tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('java-headless', None, (None, None, None)) as a requirement of
tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('coreutils', None, (None, None, None)) as a requirement of
tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-pool', None, (None, None, None)) as a
requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-dbcp', None, (None, None, None)) as a
requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
looking for ('apache-commons-collections', None, (None, None, None)) as a
requirement of tomcat-lib.noarch 0:7.0.54-1.fc21 - u
tomcat-lib-7.0.54-1.fc21.noarch requires: tomcat-el-2.2-api = 7.0.54-1.fc21
--> Processing Dependency: tomcat-el-2.2-api = 7.0.54-1.fc21 for package:
tomcat-lib-7.0.54-1.fc21.noarch
Searching pkgSack for dep: tomcat-el-2.2-api
TSINFO: Marking tomcat-el-2.2-api-7.0.54-1.fc21.noarch as install for
tomcat-lib-7.0.54-1.fc21.noarch
--> Running transaction check
---> Package portals-pom.noarch 0:1.3-9.fc21 will be installed
Checking deps for portals-pom.noarch 0:1.3-9.fc21 - u
looking for ('mvn(org.apache:apache:pom:)', None, (None, None, None)) as a
requirement of portals-pom.noarch 0:1.3-9.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of portals-pom.noarch 0:1.3-9.fc21 - u
portals-pom-1.3-9.fc21.noarch requires: mvn(org.apache:apache:pom:)
--> Processing Dependency: mvn(org.apache:apache:pom:) for package:
portals-pom-1.3-9.fc21.noarch
Searching pkgSack for dep: mvn(org.apache:apache:pom:)
TSINFO: Marking apache-parent-14-2.fc21.noarch as install for
portals-pom-1.3-9.fc21.noarch
---> Package tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 will be installed
Checking deps for tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('jpackage-utils', None, (None, None, None)) as a requirement
of tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('java-headless', None, (None, None, None)) as a requirement of
tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('chkconfig', None, (None, None, None)) as a requirement of
tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('chkconfig', None, (None, None, None)) as a requirement of
tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of
tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of
tomcat-el-2.2-api.noarch 0:7.0.54-1.fc21 - u
--> Running transaction check
---> Package apache-parent.noarch 0:14-2.fc21 will be installed
Version-Release number of selected component (if applicable):
portlet-2.0-api-1.0-8.fc21
How reproducible:
Always.
Steps to Reproduce:
yum install apache-commons-fileupload with maven not installed.
Additional Info:
The requirement of portals-pom should get dropped from portlet-2.0-api.
--
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=Soc1FYTLsL&a=cc_unsubscribe
9 years, 11 months
[javapackages] Fix tests for mvn_build
by Michal Srb
commit 46f8d135e1814f2a49841656135a4137e3bbb39f
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Jun 6 09:25:22 2014 +0200
Fix tests for mvn_build
test/data/mvn_build/all1_00001.xml | 6 +++---
test/data/mvn_build/all1_00002.xml | 12 +++++++++---
test/data/mvn_build/all1_00003.xml | 11 ++++++++---
test/data/mvn_build/all1_00004.xml | 16 ----------------
test/data/mvn_build/all1_00005.xml | 15 ---------------
test/mvn_build_test.py | 24 +-----------------------
6 files changed, 21 insertions(+), 63 deletions(-)
---
diff --git a/test/data/mvn_build/all1_00001.xml b/test/data/mvn_build/all1_00001.xml
index c21c275..9272777 100644
--- a/test/data/mvn_build/all1_00001.xml
+++ b/test/data/mvn_build/all1_00001.xml
@@ -4,7 +4,7 @@
<!--XMvn configuration file generated by javapackages.xmvn_config (part of javapackages-tools)-->
- <resolverSettings>
- <debug>true</debug>
- </resolverSettings>
+ <buildSettings>
+ <skipTests>true</skipTests>
+ </buildSettings>
</configuration>
diff --git a/test/data/mvn_build/all1_00002.xml b/test/data/mvn_build/all1_00002.xml
index 885d585..1e11d32 100644
--- a/test/data/mvn_build/all1_00002.xml
+++ b/test/data/mvn_build/all1_00002.xml
@@ -4,7 +4,13 @@
<!--XMvn configuration file generated by javapackages.xmvn_config (part of javapackages-tools)-->
- <installerSettings>
- <debug>true</debug>
- </installerSettings>
+ <artifactManagement>
+ <rule>
+ <artifactGlob>
+ <classifier>*?</classifier>
+ </artifactGlob>
+ <optional>true</optional>
+ <targetPackage>__noinstall</targetPackage>
+ </rule>
+ </artifactManagement>
</configuration>
diff --git a/test/data/mvn_build/all1_00003.xml b/test/data/mvn_build/all1_00003.xml
index 9272777..c839562 100644
--- a/test/data/mvn_build/all1_00003.xml
+++ b/test/data/mvn_build/all1_00003.xml
@@ -4,7 +4,12 @@
<!--XMvn configuration file generated by javapackages.xmvn_config (part of javapackages-tools)-->
- <buildSettings>
- <skipTests>true</skipTests>
- </buildSettings>
+ <artifactManagement>
+ <rule>
+ <artifactGlob>
+ <artifactId>{*}</artifactId>
+ </artifactGlob>
+ <targetPackage>@1</targetPackage>
+ </rule>
+ </artifactManagement>
</configuration>
diff --git a/test/mvn_build_test.py b/test/mvn_build_test.py
index 02ea18f..b34a450 100644
--- a/test/mvn_build_test.py
+++ b/test/mvn_build_test.py
@@ -44,17 +44,6 @@ class TestMvnBuild(unittest.TestCase):
self.assertEquals(get_actual_args(),
get_expected_args('mvn_build', 'xmvn_debug'))
- @xmvnconfig('mvn_build',['-d', ])
- def test_xmvn_debug1(self, stdout, stderr, return_value):
- self.assertEquals(return_value, 0, stderr)
- filelist = get_config_file_list()
- self.assertEquals(len(filelist), 2)
- for filename in filelist:
- report = compare_xml_files(get_actual_config(filename),
- get_expected_config(filename, 'mvn_build', 'xmvn_debug1'),
- ['artifactGlob'])
- self.assertFalse(report, '\n' + report)
-
@xmvnconfig('mvn_build',['-f', ])
def test_force(self, stdout, stderr, return_value):
self.assertEquals(return_value, 0, stderr)
@@ -119,17 +108,6 @@ class TestMvnBuild(unittest.TestCase):
self.assertEquals(get_actual_args(),
get_expected_args('mvn_build', 'debug'))
- @xmvnconfig('mvn_build',['-X', ])
- def test_debug1(self, stdout, stderr, return_value):
- self.assertEquals(return_value, 0, stderr)
- filelist = get_config_file_list()
- self.assertEquals(len(filelist), 2)
- for filename in filelist:
- report = compare_xml_files(get_actual_config(filename),
- get_expected_config(filename, 'mvn_build', 'debug1'),
- ['artifactGlob'])
- self.assertFalse(report, '\n' + report)
-
@xmvnconfig('mvn_build',['-ji', ])
def test_skip_both(self, stdout, stderr, return_value):
self.assertEquals(return_value, 0, stderr)
@@ -146,7 +124,7 @@ class TestMvnBuild(unittest.TestCase):
def test_all1(self, stdout, stderr, return_value):
self.assertEquals(return_value, 0, stderr)
filelist = get_config_file_list()
- self.assertEquals(len(filelist), 5)
+ self.assertEquals(len(filelist), 3)
for filename in filelist:
report = compare_xml_files(get_actual_config(filename),
get_expected_config(filename, 'mvn_build', 'all1'),
9 years, 11 months
[javapackages] Remove XMvn 1.x.x logging code
by Mikolaj Izdebski
commit d1a06e7009945644e1fe44f3f2d0a7a9e36eac58
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jun 6 08:15:30 2014 +0200
Remove XMvn 1.x.x logging code
java-utils/mvn_build.py | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/java-utils/mvn_build.py b/java-utils/mvn_build.py
index aabac69..1fc954c 100644
--- a/java-utils/mvn_build.py
+++ b/java-utils/mvn_build.py
@@ -113,10 +113,6 @@ if __name__ == "__main__":
mvn_args.append("-X")
if options.xmvn_debug or options.debug:
- # for XMvn 1.x.x
- xc.add_custom_option("resolverSettings/debug", 'true')
- xc.add_custom_option("installerSettings/debug", 'true')
- # for XMvn 2.x.x
mvn_args.append("-Dorg.slf4j.simpleLogger.log.org.fedoraproject.xmvn=debug")
if options.force:
9 years, 11 months