Exemplo n.º 1
0
def main(name, argv):
    logFile = os.path.join(workDir, 'm4e-import.log')
    configLogger(logFile)
    
    log.info('%s %s' % (name, VERSION))
    log.debug('workDir=%s' % os.path.abspath(workDir))
    if userNeedsHelp(argv):
        print('Usage: %s <archives...>')
        print('')
        print('Import the set of archives into Maven 2 repositories in')
        print(workDir)
        return
    
    downloadMaven3()
    unpackMaven3()
    loadNecessaryPlugins(logFile)
    
    for archive in argv:
        archive = downloadArchive(archive)
        path = unpackArchive(archive)
        tool = importIntoTmpRepo(path, logFile)
        
        m2repo = tool.m2repo
        log.info('Deleting non-Eclipse artifacts...')
        deleteCommonFiles(m2repo, templateRepo)
        log.info('OK')
        
        deleteMavenFiles(m2repo)
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repos...> <result>')
        print('')
        print(
            'Merge the files in the various Maven 2 repositories into one repositories'
        )
        print(workDir)
        return

    target = argv[-1]
    if os.path.exists(target):
        raise RuntimeError(
            'Target repository %s already exists. Cowardly refusing to continue.'
            % target)

    if not os.path.exists(target):
        os.makedirs(target)

    global logFile
    logFile = open(target + ".log", 'a')
    log('%s %s' % (name, VERSION))

    for source in argv[:-1]:
        log('Merging %s' % source)
        merge(source, target)
Exemplo n.º 3
0
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <directory-with-patches> <m2repo>')
        print('')
        print('Apply the patches in <directory-with-patches> to the')
        print('Maven 2 Repository located at <m2repo>')
        return

    patchDir = mustBeDirectory(argv[0])
    repoDir = mustBeDirectory(argv[1])

    configLogger(repoDir + ".log")
    log.info('%s %s' % (name, VERSION))

    tool = ApplyPatches()
    tool.run(patchDir, repoDir)
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <directory-with-patches> <m2repo>')
        print('')
        print('Apply the patches in <directory-with-patches> to the')
        print('Maven 2 Repository located at <m2repo>')
        return

    patchDir = mustBeDirectory(argv[0])
    repoDir = mustBeDirectory(argv[1])

    configLogger(repoDir + ".log")
    log.info('%s %s' % (name, VERSION))

    tool = ApplyPatches()
    tool.run(patchDir, repoDir)
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repo>')
        print('')
        print('Move the sources of Eclipse plugins to the right place')
        print('so Maven 2 can find them.')
        return

    repoDir = mustBeDirectory(argv[0])

    configLogger(repoDir + "-analyze.log")
    log.info('%s %s' % (name, VERSION))

    tool = Analyzer(repoDir)
    tool.run()

    log.info('Done.')
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repo>')
        print('')
        print('Move the sources of Eclipse plugins to the right place')
        print('so Maven 2 can find them.')
        return

    repoDir = mustBeDirectory(argv[0])

    configLogger(repoDir + "-analyze.log")
    log.info('%s %s' % (name, VERSION))

    tool = Analyzer(repoDir)
    tool.run()
    
    log.info('Done.')
Exemplo n.º 7
0
def main(name, argv):
    if userNeedsHelp(argv) or len(argv) != 2:
        print("%s %s" % (name, VERSION))
        print("Usage: %s <m2repo> <groupId:artifactId:version")
        print("")
        print("Create a POM file with the dependencyManagement element")
        print("for all POMs found in the repository.")
        return

    repoDir = mustBeDirectory(argv[0])
    artifact = argv[1]

    configLogger(repoDir + "-dm.log")
    log.info("%s %s" % (name, VERSION))

    tool = DependencyManagementTool(repoDir, artifact)
    tool.run()

    log.info("Done.")
Exemplo n.º 8
0
def main(name, argv):
    if userNeedsHelp(argv) or len(argv) != 2:
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repo> <groupId:artifactId:version')
        print('')
        print('Create a POM file with the dependencyManagement element')
        print('for all POMs found in the repository.')
        return

    repoDir = mustBeDirectory(argv[0])
    artifact = argv[1]

    configLogger(repoDir + "-dm.log")
    log.info('%s %s' % (name, VERSION))

    tool = DependencyManagementTool(repoDir, artifact)
    tool.run()

    log.info('Done.')
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repo>')
        print('')
        print('Move the sources of Eclipse plugins to the right place')
        print('so Maven 2 can find them.')
        return

    root = argv[0]
    if not os.path.exists(root):
        raise RuntimeError("%s doesn't exist" % root)
    
    if not os.path.isdir(root):
        raise RuntimeError('%s is not a directory' % root)

    configLogger(root + ".log")
    log.info('%s %s' % (name, VERSION))

    tool = AttachSources()
    tool.run(root)
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repo>')
        print('')
        print('Move the sources of Eclipse plugins to the right place')
        print('so Maven 2 can find them.')
        return

    root = argv[0]
    if not os.path.exists(root):
        raise RuntimeError("%s doesn't exist" % root)

    if not os.path.isdir(root):
        raise RuntimeError('%s is not a directory' % root)

    configLogger(root + ".log")
    log.info('%s %s' % (name, VERSION))

    tool = AttachSources()
    tool.run(root)
Exemplo n.º 11
0
def main(name, argv):
    if userNeedsHelp(argv):
        print('%s %s' % (name, VERSION))
        print('Usage: %s <m2repos...> <result>')
        print('')
        print('Merge the files in the various Maven 2 repositories into one repositories')
        print(workDir)
        return

    target = argv[-1]
    if os.path.exists(target):
        raise RuntimeError('Target repository %s already exists. Cowardly refusing to continue.' % target)
    
    if not os.path.exists(target):
        os.makedirs(target)
    
    global logFile
    logFile = open(target + ".log", 'a')
    log('%s %s' % (name, VERSION))
    
    for source in argv[:-1]:
        log('Merging %s' % source)
        merge(source, target)