comparison mx/mx_graal.py @ 17359:115de469a26b

support distributions in pom.mxdeps files
author Doug Simon <doug.simon@oracle.com>
date Tue, 07 Oct 2014 11:42:41 +0200
parents 95b879bdce67
children 4f9633b83a24
comparison
equal deleted inserted replaced
17355:e354b82355fc 17359:115de469a26b
1792 1792
1793 def makejmhdep(artifactId, groupId, deps): 1793 def makejmhdep(artifactId, groupId, deps):
1794 graalSuite = mx.suite("graal") 1794 graalSuite = mx.suite("graal")
1795 path = artifactId + '.jar' 1795 path = artifactId + '.jar'
1796 if args.permissive: 1796 if args.permissive:
1797 allDeps = []
1797 for name in deps: 1798 for name in deps:
1798 if not mx.project(name, fatalIfMissing=False): 1799 dist = mx.distribution(name, fatalIfMissing=False)
1799 if not mx.library(name, fatalIfMissing=False): 1800 if dist:
1800 mx.log('Skipping ' + groupId + '.' + artifactId + '.jar as ' + name + ' cannot be resolved') 1801 allDeps = allDeps + [d.name for d in dist.sorted_deps(transitive=True)]
1801 return 1802 else:
1802 d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=deps, mainClass=None, excludedDependencies=[], distDependencies=[]) 1803 if not mx.project(name, fatalIfMissing=False):
1804 if not mx.library(name, fatalIfMissing=False):
1805 mx.log('Skipping dependency ' + groupId + '.' + artifactId + ' as ' + name + ' cannot be resolved')
1806 return
1807 allDeps.append(name)
1808 d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=allDeps, mainClass=None, excludedDependencies=[], distDependencies=[], javaCompliance=None)
1803 d.make_archive() 1809 d.make_archive()
1804 cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId, 1810 cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId,
1805 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path] 1811 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path]
1806 if not mx._opts.verbose: 1812 if not mx._opts.verbose:
1807 cmd.append('-q') 1813 cmd.append('-q')