diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-02-07 22:17:44 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-02-07 22:17:44 +0000 |
| commit | 72f036264b18ea38d51f82807823a99e04df0cd3 (patch) | |
| tree | 98296e6341488c92bc0b6410f72034bf4c17d0d6 /qpid/java/genpom | |
| parent | 527c6d224ef3facb92c1ecb15cc02fff69d1bf7d (diff) | |
| download | qpid-python-72f036264b18ea38d51f82807823a99e04df0cd3.tar.gz | |
QPID-2977: simply specify the required dep info in a file rather than using full POMs. Update the SLF4J, Derby, Felix dep info to match the jars currently in use.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1068179 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/genpom')
| -rwxr-xr-x | qpid/java/genpom | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/qpid/java/genpom b/qpid/java/genpom index 3974078556..39eccd4c3e 100755 --- a/qpid/java/genpom +++ b/qpid/java/genpom @@ -34,9 +34,9 @@ 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("-i", "--ignore", action="store_true", help="ignore missing deps") parser.add_option("-s", "--search-path", action="append", - help="the path to search for poms") + help="the path to search for deps") parser.add_option("-S", "--scope", metavar="ARTIFACT=SCOPE", action="append", default=[], help="specify scope for an artifact") @@ -73,10 +73,9 @@ if opts.name is None: if opts.artifact is None: opts.artifact = opts.name -def lookup(pom, attr): - nd = pom["project"][attr] +def lookup(dep, attr): + nd = dep["dep"][attr] if nd is None: - nd = pom["project/parent"][attr] if nd is None: return None return nd.text() @@ -115,15 +114,15 @@ for module in module_depends: for jar in jars: base, ext = os.path.splitext(os.path.basename(jar)) - pom = search(expanded_path, "%s.pom" % base) - if pom is None: + dep = search(expanded_path, "%s.xml" % base) + if dep is None: if opts.ignore: continue else: - die("unable to locate pom for %s" % jar) - group = lookup(pom, "groupId") - artifactId = lookup(pom, "artifactId") - version = lookup(pom, "version") + die("unable to locate xml for %s" % jar) + group = lookup(dep, "groupId") + artifactId = lookup(dep, "artifactId") + version = lookup(dep, "version") deps.append(""" <dependency> <groupId>%s</groupId> |
