Esempio n. 1
0
def remove_flag_8():
    filenames_dict = common.get_flag_8_filenames()
    files_to_remove = filenames_dict['all_files']

    for filepath in files_to_remove:
        common.rm(filepath)

    common.rmdir(common.FLAG_8_DIRECTORY)
Esempio n. 2
0
def clean():
    rmdir(base_dir+'\\examples\\mini-web\\target\\generated-sources\\archetype')

    move(base_dir+'\\examples\\mini-web\\target\\tmp\\WEB-INF-classes', base_dir+'\\examples\\mini-web\\webapp\\WEB-INF\\classes')
    os.chdir(base_dir+'\\examples\\mini-web')
    os.system('mvn eclipse:clean eclipse:eclipse -Declipse.workspace=F:\workspace')
    
    print 'cleaned temp files.'
Esempio n. 3
0
def clean():
    rmdir(base_dir +
          '\\examples\\mini-web\\target\\generated-sources\\archetype')

    move(base_dir + '\\examples\\mini-web\\target\\tmp\\WEB-INF-classes',
         base_dir + '\\examples\\mini-web\\webapp\\WEB-INF\\classes')
    os.chdir(base_dir + '\\examples\\mini-web')
    os.system(
        'mvn eclipse:clean eclipse:eclipse -Declipse.workspace=F:\workspace')

    print 'cleaned temp files.'
Esempio n. 4
0
def prepare():
    move(base_dir+'\\examples\\mini-web\\webapp\\WEB-INF\\classes',base_dir+'\\examples\\mini-web\\target\\tmp\\WEB-INF-classes')
    rmdir(base_dir+'\\examples\\mini-web\\logs\\')
    rmdir(base_dir+'\\examples\\mini-web\\bin\\hibernate\\logs\\')
    rmdir(base_dir+'\\examples\\mini-web\\bin\\hibernate\\generated\\dao')
    rmdir(base_dir+'\\examples\\mini-web\\bin\\hibernate\\generated\\entity')
    rmdir(base_dir+'\\examples\\mini-web\\bin\\hibernate\\generated\\manager')
    rmfile(base_dir+'\\examples\\mini-web\\.project')
    rmfile(base_dir+'\\examples\\mini-web\\.classpath')
    rmfile(base_dir+'\\examples\\mini-web\\.settings\\org.eclipse.jdt.core.prefs')
    rmfile(base_dir+'\\examples\\mini-web\\.settings\\org.eclipse.wst.common.component')
    rmfile(base_dir+'\\examples\\mini-web\\.settings\\org.eclipse.wst.common.project.facet.core.xml')
    print 'prepared example projects.'
Esempio n. 5
0
def prepare():
    move(base_dir + '\\examples\\mini-web\\webapp\\WEB-INF\\classes',
         base_dir + '\\examples\\mini-web\\target\\tmp\\WEB-INF-classes')
    rmdir(base_dir + '\\examples\\mini-web\\logs\\')
    rmdir(base_dir + '\\examples\\mini-web\\bin\\hibernate\\logs\\')
    rmdir(base_dir + '\\examples\\mini-web\\bin\\hibernate\\generated\\dao')
    rmdir(base_dir + '\\examples\\mini-web\\bin\\hibernate\\generated\\entity')
    rmdir(base_dir +
          '\\examples\\mini-web\\bin\\hibernate\\generated\\manager')
    rmfile(base_dir + '\\examples\\mini-web\\.project')
    rmfile(base_dir + '\\examples\\mini-web\\.classpath')
    rmfile(base_dir +
           '\\examples\\mini-web\\.settings\\org.eclipse.jdt.core.prefs')
    rmfile(base_dir +
           '\\examples\\mini-web\\.settings\\org.eclipse.wst.common.component')
    rmfile(
        base_dir +
        '\\examples\\mini-web\\.settings\\org.eclipse.wst.common.project.facet.core.xml'
    )
    print 'prepared example projects.'
Esempio n. 6
0
def prepare():
   rmdir(export_dir+target_name)
   os.chdir(source_dir)
   os.system('svn export . '+export_dir+target_name)
   os.chdir(export_dir)
   rmfile(target_name+'.zip')
Esempio n. 7
0
def clean():
    common.rmdir('src/sonarqube-core-plugin/target')
    common.rmdir('src/sonarqube-gui-plugin/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-base/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-cpp/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-csharp/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-java/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-javascript/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-python/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-rpg/target')
Esempio n. 8
0
def main(options):
    if not os.path.isabs(options.builddir):
        options.builddir = os.path.join(PROJECT_DIR, options.builddir)

    if options.clean:
        clean()
        common.rmdir(options.builddir)

    common.mkdir(options.builddir)

    if options.all or options.dist:
        options.cpp = True
        options.csharp = True
        options.gui = True
        options.java = True
        options.javascript = True
        options.python = True
        options.rpg = True

    # install dependencies
    common.run_cmd('mvn', ['install:install-file', '-DgroupId=com.frontendart.columbus',
                    '-DartifactId=graphsupportlib', '-Dversion=1.0',
                    '-Dpackaging=jar', '-Dfile=lib/graphsupportlib-1.0.jar'])
    common.run_cmd('mvn', ['install:install-file', '-DgroupId=com.frontendart.columbus',
                    '-DartifactId=graphlib', '-Dversion=1.0', '-Dpackaging=jar',
                    '-Dfile=lib/graphlib-1.0.jar'])

    # sonarqube-core-plugin
    mvn_install('sonarqube-core-plugin')

    # sourcemeter-analyzer-base
    mvn_install('sonarqube-analyzers/sourcemeter-analyzer-base')

    # sonarqube-gui-plugin
    if options.gui:
        usersguide()
        mvn_install('sonarqube-gui-plugin')

    # analyzers
    if options.cpp:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-cpp')
    if options.csharp:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-csharp')
    if options.java:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-java')
    if options.javascript:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-javascript')
    if options.python:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-python')
    if options.rpg:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-rpg')

    target_dir = os.path.join(options.builddir, PACKAGENAME)
    common.mkdir(target_dir)
    common.mkdir('%s/doc' % target_dir)
    common.mkdir('%s/plugins' % target_dir)
    try:
        shutil.copy('doc/UG.html', '%s/doc' % target_dir)
        shutil.copy('README.md', target_dir)
    except OSError:
        print('Cannot copy doc files.')
    copy_jars('src/sonarqube-core-plugin/target/', '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-gui-plugin/target/', '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-cpp/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-csharp/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-java/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-javascript/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-python/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-rpg/target/',
              '%s/plugins' % target_dir)

    if options.dist:
        tarfile_name = os.path.join(options.builddir,
                                    '%s.tar.gz' % PACKAGENAME)
        tar = tarfile.open(tarfile_name, 'w:gz')
        tar.add(target_dir, arcname=PACKAGENAME)
        tar.close()

    print('\nBUILD SUCCESS\n')
Esempio n. 9
0
def prepare():
    rmdir(export_dir + target_name)
    os.chdir(source_dir)
    os.system('svn export . ' + export_dir + target_name)
    os.chdir(export_dir)
    rmfile(target_name + '.zip')
Esempio n. 10
0
def remove_flag_12():
    common.rm(common.get_script_path(12))
    common.rmdir(common.FLAG_12_DIRECTORY)
Esempio n. 11
0
def remove_flag_10():
    common.rm(common.FLAG_FILE_10_ORIGINAL_PATH)
    common.rm(common.FLAG_FILE_10_DESIRED_PATH)
    common.rm(common.get_script_path(10))
    common.rmdir(common.FLAG_10_DIRECTORY)
Esempio n. 12
0
def clean():
    common.rmdir('src/sonarqube-core-plugin/target')
    common.rmdir('src/sonarqube-gui-plugin/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-base/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-cpp/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-csharp/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-java/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-python/target')
    common.rmdir('src/sonarqube-analyzers/sourcemeter-analyzer-rpg/target')
Esempio n. 13
0
def main(options):
    if not os.path.isabs(options.builddir):
        options.builddir = os.path.join(PROJECT_DIR, options.builddir)

    if options.clean:
        clean()
        common.rmdir(options.builddir)

    common.mkdir(options.builddir)

    if options.all or options.dist:
        options.cpp = True
        options.csharp = True
        options.gui = True
        options.java = True
        options.python = True
        options.rpg = True

    # install dependencies
    common.run_cmd('mvn', ['install:install-file', '-DgroupId=com.frontendart.columbus',
                    '-DartifactId=graphsupportlib', '-Dversion=1.0',
                    '-Dpackaging=jar', '-Dfile=lib/graphsupportlib-1.0.jar'])
    common.run_cmd('mvn', ['install:install-file', '-DgroupId=com.frontendart.columbus',
                    '-DartifactId=graphlib', '-Dversion=1.0', '-Dpackaging=jar',
                    '-Dfile=lib/graphlib-1.0.jar'])

    # sonarqube-core-plugin
    mvn_install('sonarqube-core-plugin')

    # sourcemeter-analyzer-base
    mvn_install('sonarqube-analyzers/sourcemeter-analyzer-base')

    # sonarqube-gui-plugin
    if options.gui:
        usersguide()
        mvn_install('sonarqube-gui-plugin')

    # analyzers
    if options.cpp:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-cpp')
    if options.csharp:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-csharp')
    if options.java:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-java')
    if options.python:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-python')
    if options.rpg:
        mvn_install('sonarqube-analyzers/sourcemeter-analyzer-rpg')

    target_dir = os.path.join(options.builddir, PACKAGENAME)
    common.mkdir(target_dir)
    common.mkdir('%s/doc' % target_dir)
    common.mkdir('%s/plugins' % target_dir)
    try:
        shutil.copy('doc/UG.html', '%s/doc' % target_dir)
        shutil.copy('README.md', target_dir)
    except OSError:
        print('Cannot copy doc files.')
    copy_jars('src/sonarqube-core-plugin/target/', '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-gui-plugin/target/', '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-cpp/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-csharp/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-java/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-python/target/',
              '%s/plugins' % target_dir)
    copy_jars('src/sonarqube-analyzers/sourcemeter-analyzer-rpg/target/',
              '%s/plugins' % target_dir)

    if options.dist:
        tarfile_name = os.path.join(options.builddir,
                                    '%s.tar.gz' % PACKAGENAME)
        tar = tarfile.open(tarfile_name, 'w:gz')
        tar.add(target_dir, arcname=PACKAGENAME)
        tar.close()

    print('\nBUILD SUCCESS\n')