コード例 #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)
コード例 #2
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)
コード例 #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)
コード例 #4
0
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.')
コード例 #5
0
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.')
コード例 #6
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.")
コード例 #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.')
コード例 #8
0
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)
コード例 #9
0
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)