comparison mxtool/mx.py @ 15861:dba1a510fe92

mx: annotation processor paths must include libraries that are also Eclipse containers
author Doug Simon <doug.simon@oracle.com>
date Fri, 23 May 2014 13:10:14 +0200
parents babe4565c371
children f04a541af3c9
comparison
equal deleted inserted replaced
15860:3e55e9614af7 15861:dba1a510fe92
3396 out.open('factorypath') 3396 out.open('factorypath')
3397 out.element('factorypathentry', {'kind' : 'PLUGIN', 'id' : 'org.eclipse.jst.ws.annotations.core', 'enabled' : 'true', 'runInBatchMode' : 'false'}) 3397 out.element('factorypathentry', {'kind' : 'PLUGIN', 'id' : 'org.eclipse.jst.ws.annotations.core', 'enabled' : 'true', 'runInBatchMode' : 'false'})
3398 for ap in p.annotation_processors(): 3398 for ap in p.annotation_processors():
3399 for dep in dependency(ap).all_deps([], True): 3399 for dep in dependency(ap).all_deps([], True):
3400 if dep.isLibrary(): 3400 if dep.isLibrary():
3401 if not hasattr(dep, 'eclipse.container') and not hasattr(dep, 'eclipse.project'): 3401 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse
3402 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse 3402 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's
3403 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's 3403 # safest to simply use absolute paths.
3404 # safest to simply use absolute paths. 3404 path = _make_absolute(dep.get_path(resolve=True), p.suite.dir)
3405 path = _make_absolute(dep.get_path(resolve=True), p.suite.dir) 3405 out.element('factorypathentry', {'kind' : 'EXTJAR', 'id' : path, 'enabled' : 'true', 'runInBatchMode' : 'false'})
3406 out.element('factorypathentry', {'kind' : 'EXTJAR', 'id' : path, 'enabled' : 'true', 'runInBatchMode' : 'false'}) 3406 files.append(path)
3407 files.append(path)
3408 elif dep.isProject(): 3407 elif dep.isProject():
3409 out.element('factorypathentry', {'kind' : 'WKSPJAR', 'id' : '/' + dep.name + '/' + dep.name + '.jar', 'enabled' : 'true', 'runInBatchMode' : 'false'}) 3408 out.element('factorypathentry', {'kind' : 'WKSPJAR', 'id' : '/' + dep.name + '/' + dep.name + '.jar', 'enabled' : 'true', 'runInBatchMode' : 'false'})
3410 out.close('factorypath') 3409 out.close('factorypath')
3411 update_file(join(p.dir, '.factorypath'), out.xml(indent='\t', newl='\n')) 3410 update_file(join(p.dir, '.factorypath'), out.xml(indent='\t', newl='\n'))
3412 files.append(join(p.dir, '.factorypath')) 3411 files.append(join(p.dir, '.factorypath'))