示例#1
0
def gen_eclipse_prjs(dry_run, verbose):
    # do all libraries
    for lib in pdlibs.lib_jars_short:
        eclipse.gen_lib(lib, dry_run, verbose)
    # generate the bulk import plugin file, see http://code.nomad-labs.com/eclipse-bulk-import/
    bulkprj = open('./projectList.txt', 'w')
    lib_top = os.getcwd() + os.sep + settings.lib_path
    for lib in sorted(pdlibs.lib_jars_short):
        bulkprj.write(lib_top + os.sep + lib + '\n')
    # do all modules
    for mod in sorted(find_all_mods()):
        if verbose:
            print mod
        dummy, dep_mods, libs = collect_dependencies(mod)
        eclipse.gen_module(mod, dep_mods, libs, dry_run, verbose)
        bulkprj.write(os.getcwd() + os.sep + mod + '\n')
    bulkprj.close()
示例#2
0
        sys.exit(0)
    
    if options.debug:
        options.verbose = True

    mod = options.module
    
    # scan the jars in lib directory 
    pdlibs.build_jar_lib(options.list_libs)

    if options.eclipse_gen:
        gen_eclipse_prjs(options.dry_run, options.verbose)
        sys.exit(0)
    elif not mod:
        print 'You must use the --module option to specify the module'
        all_mods = find_all_mods()
        if len(all_mods) > 0:
            print 'These are the modules found in the current directory: %s.' % ",".join(all_mods)
        p.print_help()
        sys.exit(1)
        
    if mod[-1] == os.path.sep:
        mod = mod[:-1]
        
    if options.show_dependencies:
        dummy, deps, libs = collect_dependencies(mod)
        print 'Listing dependencies of module %s: ' % mod
        print 'Modules it depends on (including indirect ones): %s.' % ','.join(deps)
        print 'Libraries it depends on (including indirect ones): %s.' % ','.join(libs)
    elif not options.run_task is None:
        tasks.options = options