<commit_before>import grails.util.Environment

System.setProperty "ivy.checksums", ""
grails.project.plugins.dir = "${basedir}/plugins"
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolver = "maven"

//grails.project.war.file = "target/${appName}-${appVersion}.war"

coverage {
    exclusions = [
        "**/org/apache/log4j/**",
        "**/marketplace/testing/**",
        "changelog*/**"
    ]
    xml = true
    enabledByDefault = false
}

codenarc.reports = {
    AmlXmlReport('xml') {
        outputFile = 'target/CodeNarcReport.xml'
        title = 'App Mall CodeNarc Report'
    }

    AmlHtmlReport('html') {
        outputFile = 'target/CodeNarcReport.html'
        title = 'App Mall CodeNarc Report'
    }
}

codenarc.ruleSetFiles = "file:grails-app/conf/CodeNarcRules.groovy"
codenarc.propertiesFile = "grails-app/conf/codenarc.properties"

def props = new Properties()
new File("application.properties").withInputStream { stream ->
    props.load(stream)
}
def config = new ConfigSlurper().parse(props)

def overlayConfigFile = new File("grails-app/conf/OverlayConfig.groovy")
if (overlayConfigFile.exists()) {
    def slurpedConfig = new ConfigSlurper().parse(overlayConfigFile.toURI().toURL())
    config.merge(slurpedConfig)
}

def warExcludes = [
    'aopalliance-1.0-sources.jar',
    'asm-3.0.jar',
    'asm-tree-3.0.jar',
    'cobertura-1.9.4.1.jar',
    'commons-codec-1.3-javadoc.jar',
    'commons-codec-1.3-sources.jar',
    'commons-lang-2.4-javadoc.jar',
    'commons-lang-2.4-sources.jar',
    'compass-2.2.1-src.jar',
    'core-3.1.1.jar',
    'jasper-compiler-5.5.15.jar',
    'jasper-compiler-jdt-5.5.15.jar',
    'jasper-runtime-5.5.15',
    'jsp-api-2.0-6.1.21.jar',
    //'jstl-1.1.2.jar',
    'standard-1.1.2.jar',
    'servlet-api-2.5-20081211.jar',
    "${config.mp.security.module}-project-${config.mp.security.rev}.zip",
    "rome-0.9.jar"
]

grails.war.resources = { stagingDir ->
    // this class is only used for development to simulate login so we don't need cas
    // remove it from the war so it doesn't get out
    delete(file: "${stagingDir}/WEB-INF/classes/AutoLoginAccountService.class")
    delete(file: "${stagingDir}/WEB-INF/classes/ehcache.xml")
    def libDir = "${stagingDir}/WEB-INF/lib"
    warExcludes.each { exclude ->
        delete(file: "${libDir}/${exclude}")
    }
    delete(dir: "${stagingDir}/js-test/doh")
    delete(dir: "${stagingDir}/js-test/dojo-release-1.6.0-src")
    delete(dir: "${stagingDir}/themes/accessibility-bow")
    delete(dir: "${stagingDir}/themes/accessibility-wob")
    delete(dir: "${stagingDir}/themes/marketplace")
    delete(dir: "${stagingDir}/themes/template")

    def overlayResources = config.overlay.war.resources
    overlayResources.each {
        it.tofile = "${stagingDir}/${it.tofile}"
        copy(it)
    }
}

grails.project.dependency.resolution = {

    // inherit Grails' default dependencies
    inherits("global") {
        excludes 'slf4j'
    }

    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'

    repositories {
        grailsPlugins()
        grailsHome()
        mavenLocal()
        mavenRepo 'http://maven.restlet.org'
        mavenRepo 'http://repository.opencastproject.org/nexus/content/repositories/public'
        grailsCentral()
        mavenCentral()
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

        runtime('net.sf.ehcache:ehcache-jgroupsreplication:1.4', 'log4j:apache-log4j-extras:1.0')
        /*
        //Code-Coverage-1.2 (PLUGIN)
        runtime 'asm:asm-parent:3.0', 'asm:asm:3.0',
            'asm:asm-tree:3.0', 'net.sourceforge.cobertura:cobertura:1.9.4.1'
        */
        runtime('dom4j:dom4j:1.6.1') { excludes 'xml-apis' }<commit_msg>Remove inaccessible Maven repository<commit_after>import grails.util.Environment

System.setProperty "ivy.checksums", ""
grails.project.plugins.dir = "${basedir}/plugins"
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolver = "maven"

//grails.project.war.file = "target/${appName}-${appVersion}.war"

coverage {
    exclusions = [
        "**/org/apache/log4j/**",
        "**/marketplace/testing/**",
        "changelog*/**"
    ]
    xml = true
    enabledByDefault = false
}

codenarc.reports = {
    AmlXmlReport('xml') {
        outputFile = 'target/CodeNarcReport.xml'
        title = 'App Mall CodeNarc Report'
    }

    AmlHtmlReport('html') {
        outputFile = 'target/CodeNarcReport.html'
        title = 'App Mall CodeNarc Report'
    }
}

codenarc.ruleSetFiles = "file:grails-app/conf/CodeNarcRules.groovy"
codenarc.propertiesFile = "grails-app/conf/codenarc.properties"

def props = new Properties()
new File("application.properties").withInputStream { stream ->
    props.load(stream)
}
def config = new ConfigSlurper().parse(props)

def overlayConfigFile = new File("grails-app/conf/OverlayConfig.groovy")
if (overlayConfigFile.exists()) {
    def slurpedConfig = new ConfigSlurper().parse(overlayConfigFile.toURI().toURL())
    config.merge(slurpedConfig)
}

def warExcludes = [
    'aopalliance-1.0-sources.jar',
    'asm-3.0.jar',
    'asm-tree-3.0.jar',
    'cobertura-1.9.4.1.jar',
    'commons-codec-1.3-javadoc.jar',
    'commons-codec-1.3-sources.jar',
    'commons-lang-2.4-javadoc.jar',
    'commons-lang-2.4-sources.jar',
    'compass-2.2.1-src.jar',
    'core-3.1.1.jar',
    'jasper-compiler-5.5.15.jar',
    'jasper-compiler-jdt-5.5.15.jar',
    'jasper-runtime-5.5.15',
    'jsp-api-2.0-6.1.21.jar',
    //'jstl-1.1.2.jar',
    'standard-1.1.2.jar',
    'servlet-api-2.5-20081211.jar',
    "${config.mp.security.module}-project-${config.mp.security.rev}.zip",
    "rome-0.9.jar"
]

grails.war.resources = { stagingDir ->
    // this class is only used for development to simulate login so we don't need cas
    // remove it from the war so it doesn't get out
    delete(file: "${stagingDir}/WEB-INF/classes/AutoLoginAccountService.class")
    delete(file: "${stagingDir}/WEB-INF/classes/ehcache.xml")
    def libDir = "${stagingDir}/WEB-INF/lib"
    warExcludes.each { exclude ->
        delete(file: "${libDir}/${exclude}")
    }
    delete(dir: "${stagingDir}/js-test/doh")
    delete(dir: "${stagingDir}/js-test/dojo-release-1.6.0-src")
    delete(dir: "${stagingDir}/themes/accessibility-bow")
    delete(dir: "${stagingDir}/themes/accessibility-wob")
    delete(dir: "${stagingDir}/themes/marketplace")
    delete(dir: "${stagingDir}/themes/template")

    def overlayResources = config.overlay.war.resources
    overlayResources.each {
        it.tofile = "${stagingDir}/${it.tofile}"
        copy(it)
    }
}

grails.project.dependency.resolution = {

    // inherit Grails' default dependencies
    inherits("global") {
        excludes 'slf4j'
    }

    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'

    repositories {
        grailsPlugins()
        grailsHome()
        mavenLocal()
        grailsCentral()
        mavenCentral()
		mavenRepo 'http://maven.restlet.org'
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

        runtime('net.sf.ehcache:ehcache-jgroupsreplication:1.4', 'log4j:apache-log4j-extras:1.0')
        /*
        //Code-Coverage-1.2 (PLUGIN)
        runtime 'asm:asm-parent:3.0', 'asm:asm:3.0',
            'asm:asm-tree:3.0', 'net.sourceforge.cobertura:cobertura:1.9.4.1'
        */
        runtime('dom4j:dom4j:1.6.1') { excludes 'xml-apis' }
{'fraction_non_alphanumeric': 0.1697440468610722, 'fraction_numerical': 0.022411817139946517, 'mean_word_length': 3.0568181818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4534452', 'n_tokens_mistral': 2878, 'n_tokens_neox': 2779, 'n_words': 411}