From 527c6d224ef3facb92c1ecb15cc02fff69d1bf7d Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Mon, 7 Feb 2011 22:17:00 +0000 Subject: QPID-1916: updates to allow creation of maven artifacts for client+common modules during the release process Applied patches from Emmanuel Bourg git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1068178 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/build.xml | 4 +++ qpid/java/genpom | 30 +++++++++++++++++++++- qpid/java/lib/maven-ant-tasks-2.1.1.jar | Bin 0 -> 1314262 bytes qpid/java/module.xml | 44 +++++++++++++++++++++++++++----- 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 qpid/java/lib/maven-ant-tasks-2.1.1.jar (limited to 'qpid/java') diff --git a/qpid/java/build.xml b/qpid/java/build.xml index 6ed2992a68..9031166d76 100644 --- a/qpid/java/build.xml +++ b/qpid/java/build.xml @@ -66,6 +66,10 @@ + + + + diff --git a/qpid/java/genpom b/qpid/java/genpom index 92822a08ae..3974078556 100755 --- a/qpid/java/genpom +++ b/qpid/java/genpom @@ -32,6 +32,8 @@ parser.add_option("-a", "--artifact") parser.add_option("-v", "--version") parser.add_option("-d", "--description", default="") parser.add_option("-u", "--url", default="") +parser.add_option("-m", "--modules", help="modules dependencies") +parser.add_option("-p", "--prefix", help="prefix of the project's artifacts names") parser.add_option("-i", "--ignore", action="store_true", help="ignore missing poms") parser.add_option("-s", "--search-path", action="append", help="the path to search for poms") @@ -62,6 +64,9 @@ if opts.version is None: if opts.name is None and opts.artifact is None: die("one of name or artifact must be supplied") +if opts.prefix is not None: + opts.artifact = opts.prefix + "-" + opts.artifact + if opts.name is None: opts.name = opts.artifact @@ -90,6 +95,24 @@ for s in opts.scope: scopes[m.group(1)] = m.group(2) deps = [] +module_depends = [] +if opts.modules is not None: + module_depends = opts.modules.replace("/", "-").split(); + +for module in module_depends: + if opts.prefix is None: + artifactId = module + else: + artifactId = opts.prefix + "-" + module + + deps.append(""" + + %s + %s + %s + +""" % (opts.group, artifactId, opts.version)) + for jar in jars: base, ext = os.path.splitext(os.path.basename(jar)) pom = search(expanded_path, "%s.pom" % base) @@ -119,22 +142,27 @@ TEMPLATE = """ %(group)s %(artifact)s %(version)s + %(name)s %(url)s %(description)s + The Apache Software Foundation http://www.apache.org + The Apache Software License, Version 2.0 - /LICENSE.txt + http://www.apache.org/licenses/LICENSE-2.0.html + %(dependencies)s + """ diff --git a/qpid/java/lib/maven-ant-tasks-2.1.1.jar b/qpid/java/lib/maven-ant-tasks-2.1.1.jar new file mode 100644 index 0000000000..7810a541b8 Binary files /dev/null and b/qpid/java/lib/maven-ant-tasks-2.1.1.jar differ diff --git a/qpid/java/module.xml b/qpid/java/module.xml index e05fdf0f14..474a1f1937 100644 --- a/qpid/java/module.xml +++ b/qpid/java/module.xml @@ -18,10 +18,15 @@ - under the License. - --> - + + + + @@ -74,6 +79,9 @@ + + @@ -209,11 +217,11 @@ - - - + + + - + @@ -221,6 +229,19 @@ + + + + + + + + + + + + + @@ -407,7 +428,7 @@ - + @@ -424,6 +445,17 @@ + + + + + + + + + + + -- cgit v1.2.1