[javapackages/big-refactoring] Add license headers
by Michal Srb
commit 591e1e1ecbaecdb3b91bca04f7d4fab421423af0
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed Jun 4 08:12:45 2014 +0200
Add license headers
python/javapackages/pom/artifact.py | 34 +++++++++++++++++++++++++++++++++
python/javapackages/pom/dependency.py | 33 ++++++++++++++++++++++++++++++++
python/javapackages/pom/exclusion.py | 33 ++++++++++++++++++++++++++++++++
python/javapackages/pom/extension.py | 33 ++++++++++++++++++++++++++++++++
python/javapackages/pom/plugin.py | 33 ++++++++++++++++++++++++++++++++
python/javapackages/pom/pom.py | 34 +++++++++++++++++++++++++++++++++
python/javapackages/pom/pomreader.py | 33 ++++++++++++++++++++++++++++++++
python/javapackages/pom/printer.py | 33 ++++++++++++++++++++++++++++++++
8 files changed, 266 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/pom/artifact.py b/python/javapackages/pom/artifact.py
index 297a4ca..5f3bd1b 100644
--- a/python/javapackages/pom/artifact.py
+++ b/python/javapackages/pom/artifact.py
@@ -1,3 +1,37 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
+# Michal Srb <msrb(a)redhat.com>
+
import sys
from pomreader import POMReader
diff --git a/python/javapackages/pom/dependency.py b/python/javapackages/pom/dependency.py
index 1893067..6af5511 100644
--- a/python/javapackages/pom/dependency.py
+++ b/python/javapackages/pom/dependency.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import sys
from artifact import AbstractArtifact, ArtifactFormatException
diff --git a/python/javapackages/pom/exclusion.py b/python/javapackages/pom/exclusion.py
index 79d657d..1af025d 100644
--- a/python/javapackages/pom/exclusion.py
+++ b/python/javapackages/pom/exclusion.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import sys
from artifact import AbstractArtifact, ArtifactFormatException
diff --git a/python/javapackages/pom/extension.py b/python/javapackages/pom/extension.py
index 7a2d2eb..f1b00f4 100644
--- a/python/javapackages/pom/extension.py
+++ b/python/javapackages/pom/extension.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import sys
from artifact import AbstractArtifact, ArtifactFormatException
diff --git a/python/javapackages/pom/plugin.py b/python/javapackages/pom/plugin.py
index 7d8cf2a..536db77 100644
--- a/python/javapackages/pom/plugin.py
+++ b/python/javapackages/pom/plugin.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import sys
from dependency import Dependency
diff --git a/python/javapackages/pom/pom.py b/python/javapackages/pom/pom.py
index 4c827c8..6042688 100644
--- a/python/javapackages/pom/pom.py
+++ b/python/javapackages/pom/pom.py
@@ -1,3 +1,37 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
+# Michal Srb <msrb(a)redhat.com>
+
from pomreader import POMReader, PomLoadingException
from dependency import Dependency
from plugin import Plugin
diff --git a/python/javapackages/pom/pomreader.py b/python/javapackages/pom/pomreader.py
index 80995c1..f9625c5 100644
--- a/python/javapackages/pom/pomreader.py
+++ b/python/javapackages/pom/pomreader.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
from lxml.etree import ElementTree, XMLParser
diff --git a/python/javapackages/pom/printer.py b/python/javapackages/pom/printer.py
index 0839497..f88bdc2 100644
--- a/python/javapackages/pom/printer.py
+++ b/python/javapackages/pom/printer.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
class Printer(object):
@staticmethod
def get_mvn_str(gid, aid, ext="", cla="", ver=""):
9 years, 11 months
[Bug 1103839] New: tycho: FTBFS - reactor contains a cyclic reference
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1103839
Bug ID: 1103839
Summary: tycho: FTBFS - reactor contains a cyclic reference
Product: Fedora
Version: rawhide
Component: tycho
Assignee: rgrunber(a)redhat.com
Reporter: mizdebsk(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
krzysztof.daniel(a)gmail.com, mat.booth(a)redhat.com,
mizdebsk(a)redhat.com, rgrunber(a)redhat.com
Description of problem:
tycho fails to build in rawhide:
[INFO] Scanning for projects...
[ERROR] The projects in the reactor contain a cyclic reference: Edge between
'Vertex{label='org.eclipse.tycho:tycho-compiler-plugin:0.20.0'}' and
'Vertex{label='org.eclipse.tycho:tycho-core:0.20.0'}' introduces to cycle in
the graph org.eclipse.tycho:tycho-core:0.20.0 -->
org.eclipse.tycho:tycho-embedder-api:0.20.0 -->
org.eclipse.tycho:org.eclipse.tycho.embedder.shared:0.20.0 -->
org.eclipse.tycho:tycho-compiler-plugin:0.20.0 -->
org.eclipse.tycho:tycho-core:0.20.0 -> [Help 1]
Possibly related to:
http://jira.codehaus.org/browse/MNG-5591
Version-Release number of selected component (if applicable):
0.20.0-10
--
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=2GBsgdRXsV&a=cc_unsubscribe
9 years, 11 months
[javapackages/big-refactoring] [artifact] Move __str__ and __unicode__ methods to AbstractArtifact
by Michal Srb
commit 41f0f2259684a94155aae3ec73a8bd31d84e2373
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 17:13:06 2014 +0200
[artifact] Move __str__ and __unicode__ methods to AbstractArtifact
python/javapackages/pom/artifact.py | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/python/javapackages/pom/artifact.py b/python/javapackages/pom/artifact.py
index 904cefb..297a4ca 100644
--- a/python/javapackages/pom/artifact.py
+++ b/python/javapackages/pom/artifact.py
@@ -86,6 +86,12 @@ class AbstractArtifact(object):
classifier or m['classifier'],
version or m['version'])
+ def __unicode__(self):
+ return unicode(self.get_mvn_str())
+
+ def __str__(self):
+ return unicode(self).encode(sys.getfilesystemencoding())
+
def __get_members(self):
m = {'groupId': '',
'artifactId': '',
@@ -116,16 +122,6 @@ class Artifact(AbstractArtifact):
self.classifier = classifier.strip()
self.version = version.strip()
- def __unicode__(self):
- return u"{gid}:{aid}:{ext}:{cla}:{ver}".format(gid=self.groupId,
- aid=self.artifactId,
- ext=self.extension,
- cla=self.classifier,
- ver=self.version)
-
- def __str__(self):
- return unicode(self).encode(sys.getfilesystemencoding())
-
def get_xml_element(self, root="artifact"):
"""
Return XML Element node representation of the Artifact
9 years, 11 months
[javapackages/big-refactoring] [artifact] Add method for creating Artifact objects
by Michal Srb
commit 7c2b59ad9aa36989f2b2b5e03e822dc633325dba
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 16:37:47 2014 +0200
[artifact] Add method for creating Artifact objects
python/javapackages/pom/artifact.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/pom/artifact.py b/python/javapackages/pom/artifact.py
index f1e94a5..904cefb 100644
--- a/python/javapackages/pom/artifact.py
+++ b/python/javapackages/pom/artifact.py
@@ -78,6 +78,14 @@ class AbstractArtifact(object):
root = self.get_xml_element(root)
return tostring(root, pretty_print=True)
+ def get_artifact(self, extension="", classifier="", version=""):
+ m = self.__get_members()
+
+ return Artifact(m['groupId'], m['artifactId'],
+ extension or m['extension'],
+ classifier or m['classifier'],
+ version or m['version'])
+
def __get_members(self):
m = {'groupId': '',
'artifactId': '',
9 years, 11 months
[javapackages/big-refactoring] [pom] Fix xpath for plugins
by Michal Srb
commit d175973e930f460e7bff463398f019821bb8451f
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 16:20:38 2014 +0200
[pom] Fix xpath for plugins
python/javapackages/pom/pom.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/pom/pom.py b/python/javapackages/pom/pom.py
index 07726b9..4c827c8 100644
--- a/python/javapackages/pom/pom.py
+++ b/python/javapackages/pom/pom.py
@@ -126,7 +126,7 @@ class POM(object):
"""
List of artifact's plugins
"""
- xmlnodes = POMReader.xpath(self.__doc, './pom:plugins/pom:plugin')
+ xmlnodes = POMReader.xpath(self.__doc, './pom:build/pom:plugins/pom:plugin')
return [Plugin.from_xml_element(x) for x in xmlnodes]
@property
9 years, 11 months
[javapackages/big-refactoring] [pom] Add support for dependency/plugin management
by Michal Srb
commit d58dd0704eb9235e29d67ca32bcfe41da9f1bd95
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 16:17:46 2014 +0200
[pom] Add support for dependency/plugin management
python/javapackages/pom/pom.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/pom/pom.py b/python/javapackages/pom/pom.py
index c45456e..07726b9 100644
--- a/python/javapackages/pom/pom.py
+++ b/python/javapackages/pom/pom.py
@@ -106,6 +106,22 @@ class POM(object):
return [Dependency.from_xml_element(x) for x in xmlnodes]
@property
+ def dependencyManagement(self):
+ """
+ List of dependencies from dependency management section
+ """
+ xmlnodes = POMReader.xpath(self.__doc, './pom:dependencyManagement/pom:dependencies/pom:dependency')
+ return [Dependency.from_xml_element(x) for x in xmlnodes]
+
+ @property
+ def pluginManagement(self):
+ """
+ List of plugins from plugin management section
+ """
+ xmlnodes = POMReader.xpath(self.__doc, './pom:pluginManagement/pom:plugins/pom:plugin')
+ return [Plugin.from_xml_element(x) for x in xmlnodes]
+
+ @property
def plugins(self):
"""
List of artifact's plugins
9 years, 11 months
[javapackages/big-refactoring] [pom] Add support for properties
by Michal Srb
commit 2a7511130fcbca005ed95f2b04fdd54b88b054b6
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 15:55:05 2014 +0200
[pom] Add support for properties
python/javapackages/pom/pom.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/pom/pom.py b/python/javapackages/pom/pom.py
index 87635bf..c45456e 100644
--- a/python/javapackages/pom/pom.py
+++ b/python/javapackages/pom/pom.py
@@ -120,3 +120,18 @@ class POM(object):
"""
xmlnodes = POMReader.xpath(self.__doc, './pom:build/pom:extensions/pom:extension')
return [Extension.from_xml_element(x) for x in xmlnodes]
+
+ @property
+ def properties(self):
+ """
+ Dictionary consisting of properties specified in pom.xml
+ """
+ properties = {}
+ xmlnodes = POMReader.find(self.__doc, './pom:properties')
+ if xmlnodes is None:
+ return properties
+ propnodes = xmlnodes.getchildren()
+ for node in propnodes:
+ properties[node.tag] = node.text
+
+ return properties
9 years, 11 months
[javapackages/big-refactoring] [pom] Add support for extensions
by Michal Srb
commit 53e910925a3f4a2676b27797eededcc84a2d59d6
Author: Michal Srb <msrb(a)redhat.com>
Date: Tue Jun 3 15:20:02 2014 +0200
[pom] Add support for extensions
python/javapackages/pom/pom.py | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/python/javapackages/pom/pom.py b/python/javapackages/pom/pom.py
index 28ec56a..87635bf 100644
--- a/python/javapackages/pom/pom.py
+++ b/python/javapackages/pom/pom.py
@@ -1,6 +1,7 @@
from pomreader import POMReader, PomLoadingException
from dependency import Dependency
from plugin import Plugin
+from extension import Extension
class POM(object):
@@ -101,13 +102,21 @@ class POM(object):
"""
List of artifact's dependencies
"""
- depsxml = POMReader.xpath(self.__doc, './pom:dependencies/pom:dependency')
- return [Dependency.from_xml_element(x) for x in depsxml]
+ xmlnodes = POMReader.xpath(self.__doc, './pom:dependencies/pom:dependency')
+ return [Dependency.from_xml_element(x) for x in xmlnodes]
@property
def plugins(self):
"""
List of artifact's plugins
"""
- plugsxml = POMReader.xpath(self.__doc, './pom:plugins/pom:plugin')
- return [Plugin.from_xml_element(x) for x in plugsxml]
+ xmlnodes = POMReader.xpath(self.__doc, './pom:plugins/pom:plugin')
+ return [Plugin.from_xml_element(x) for x in xmlnodes]
+
+ @property
+ def extensions(self):
+ """
+ List of artifact's extensions
+ """
+ xmlnodes = POMReader.xpath(self.__doc, './pom:build/pom:extensions/pom:extension')
+ return [Extension.from_xml_element(x) for x in xmlnodes]
9 years, 11 months