summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-02-25 20:57:51 +0000
committerRobert Gemmell <robbie@apache.org>2012-02-25 20:57:51 +0000
commit814a72bbb5a1bf317c1319c4ae654e45e3033903 (patch)
tree5a0936bc313ab784e57e16f63c2cd986cfe69e14
parentd8740d624b2152b7b5e45e4655dfd1255544a3a4 (diff)
downloadqpid-python-814a72bbb5a1bf317c1319c4ae654e45e3033903.tar.gz
NO-JIRA: rename the felix dep, we are using the 'main' bundle not the 'framework' one. Enable specifying dependency exclusions during POM generation, exclude deps we dont use in the build
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1293690 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/build.deps5
-rwxr-xr-xqpid/java/genpom34
-rw-r--r--qpid/java/lib/org.apache.felix.main-2.0.5.jar (renamed from qpid/java/lib/org.apache.felix.framework-2.0.5.jar)bin391763 -> 391763 bytes
-rw-r--r--qpid/java/lib/poms/commons-digester-1.8.1.xml6
-rw-r--r--qpid/java/lib/poms/org.apache.felix.main-2.0.5.xml (renamed from qpid/java/lib/poms/org.apache.felix.framework-2.0.5.xml)20
-rw-r--r--qpid/java/lib/poms/org.osgi.core-1.0.0.xml22
-rw-r--r--qpid/java/lib/poms/xalan-2.7.0.xml8
7 files changed, 62 insertions, 33 deletions
diff --git a/qpid/java/build.deps b/qpid/java/build.deps
index dd3853cb73..1531bdfb4b 100644
--- a/qpid/java/build.deps
+++ b/qpid/java/build.deps
@@ -48,10 +48,9 @@ jetty-util=lib/jetty-util-6.1.14.jar
jetty-servlet-tester=lib/jetty-servlet-tester-6.1.14.jar
servlet-api=lib/servlet-api.jar
-osgi-core=lib/org.osgi.core-1.0.0.jar
-felix-framework=lib/org.apache.felix.framework-2.0.5.jar
+felix-main=lib/org.apache.felix.main-2.0.5.jar
-felix.libs=${osgi-core} ${felix-framework}
+felix.libs=${felix-main}
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
diff --git a/qpid/java/genpom b/qpid/java/genpom
index 39eccd4c3e..07a5b82a1f 100755
--- a/qpid/java/genpom
+++ b/qpid/java/genpom
@@ -73,13 +73,15 @@ if opts.name is None:
if opts.artifact is None:
opts.artifact = opts.name
-def lookup(dep, attr):
- nd = dep["dep"][attr]
+def lookup(doc, attr):
+ nd = doc[attr]
if nd is None:
- if nd is None:
- return None
+ return None
return nd.text()
+def lookupElement(doc, attr):
+ return doc[attr]
+
def search(path, file):
for d in path:
f = os.path.join(d, file)
@@ -120,6 +122,7 @@ for jar in jars:
continue
else:
die("unable to locate xml for %s" % jar)
+ dep = dep["dep"]
group = lookup(dep, "groupId")
artifactId = lookup(dep, "artifactId")
version = lookup(dep, "version")
@@ -128,11 +131,28 @@ for jar in jars:
<groupId>%s</groupId>
<artifactId>%s</artifactId>
<version>%s</version>
- <scope>%s</scope>
- </dependency>
-""" % (group, artifactId, version,
+ <scope>%s</scope>""" % (group, artifactId, version,
scopes.get(artifactId, "compile")))
+ exclusions = lookupElement(dep, "exclusions")
+ if exclusions is not None:
+ deps.append("""
+ <exclusions>""")
+ for exclusion in list(exclusions.query["exclusion"]):
+ group = lookup(exclusion, "groupId")
+ artifactId = lookup(exclusion, "artifactId")
+ deps.append("""
+ <exclusion>
+ <groupId>%s</groupId>
+ <artifactId>%s</artifactId>
+ </exclusion>""" % (group, artifactId))
+ deps.append("""
+ </exclusions>""")
+
+ deps.append("""
+ </dependency>
+""")
+
TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/qpid/java/lib/org.apache.felix.framework-2.0.5.jar b/qpid/java/lib/org.apache.felix.main-2.0.5.jar
index 71e5a84231..71e5a84231 100644
--- a/qpid/java/lib/org.apache.felix.framework-2.0.5.jar
+++ b/qpid/java/lib/org.apache.felix.main-2.0.5.jar
Binary files differ
diff --git a/qpid/java/lib/poms/commons-digester-1.8.1.xml b/qpid/java/lib/poms/commons-digester-1.8.1.xml
index 1edee7b5f0..56b38bf778 100644
--- a/qpid/java/lib/poms/commons-digester-1.8.1.xml
+++ b/qpid/java/lib/poms/commons-digester-1.8.1.xml
@@ -19,4 +19,10 @@
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </exclusion>
+ </exclusions>
</dep>
diff --git a/qpid/java/lib/poms/org.apache.felix.framework-2.0.5.xml b/qpid/java/lib/poms/org.apache.felix.main-2.0.5.xml
index cef17fe589..91718725dc 100644
--- a/qpid/java/lib/poms/org.apache.felix.framework-2.0.5.xml
+++ b/qpid/java/lib/poms/org.apache.felix.main-2.0.5.xml
@@ -17,6 +17,24 @@
-->
<dep>
<groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.framework</artifactId>
+ <artifactId>org.apache.felix.main</artifactId>
<version>2.0.5</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.shell</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.shell.tui</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.bundlerepository</artifactId>
+ </exclusion>
+ </exclusions>
</dep>
diff --git a/qpid/java/lib/poms/org.osgi.core-1.0.0.xml b/qpid/java/lib/poms/org.osgi.core-1.0.0.xml
deleted file mode 100644
index 833cc91729..0000000000
--- a/qpid/java/lib/poms/org.osgi.core-1.0.0.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<dep>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.0.0</version>
-</dep>
diff --git a/qpid/java/lib/poms/xalan-2.7.0.xml b/qpid/java/lib/poms/xalan-2.7.0.xml
index 73ea2df7e2..3fd89aacd8 100644
--- a/qpid/java/lib/poms/xalan-2.7.0.xml
+++ b/qpid/java/lib/poms/xalan-2.7.0.xml
@@ -19,4 +19,12 @@
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dep>
+
+