Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 将build.gradle移植到pom.xml实例化错误:org.eclipse.jetty.util.SocketAddressResolver_Java_Maven_Gradle_Jetty - Fatal编程技术网

Java 将build.gradle移植到pom.xml实例化错误:org.eclipse.jetty.util.SocketAddressResolver

Java 将build.gradle移植到pom.xml实例化错误:org.eclipse.jetty.util.SocketAddressResolver,java,maven,gradle,jetty,Java,Maven,Gradle,Jetty,添加 Mypom.xml [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api 1.0-SNAPSHOT [INFO] -----

添加

My
pom.xml

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building api 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ api ---
[INFO] ecorp.api:api:jar:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.1.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.4.1.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.4.1.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.1.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-starter-logging:jar:1.4.1.RELEASE:compile
[INFO] |  |     +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] |  |     \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.1.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.5:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.5:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.5:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.8.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.4.1.RELEASE:compile
[INFO] |  \- org.springframework.boot:spring-boot-actuator:jar:1.4.1.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:1.4.1.RELEASE:compile
[INFO] |  +- org.json:json:jar:20140107:compile
[INFO] |  \- org.springframework:spring-core:jar:4.3.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.4.1.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:4.3.3.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-config:jar:4.1.3.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-core:jar:4.1.3.RELEASE:compile
[INFO] |  \- org.springframework.security:spring-security-web:jar:4.1.3.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.3.3.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:4.3.3.RELEASE:compile
[INFO] |  \- org.springframework:spring-context:jar:4.3.3.RELEASE:compile
[INFO] +- javax.mail:mail:jar:1.4.7:compile
[INFO] |  \- javax.activation:activation:jar:1.1.1:compile
[INFO] +- commons-net:commons-net:jar:3.4:compile
[INFO] +- com.google.guava:guava:jar:17.0:compile
[INFO] +- org.eclipse.jetty:jetty-client:jar:9.2.3.v20140905:compile
[INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile
[INFO] |  \- org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile
[INFO] +- org.yaml:snakeyaml:jar:1.13:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.10:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] |  \- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] +- ch.qos.logback:logback-access:jar:1.1.7:compile
[INFO] +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] |  \- com.fasterxml:classmate:jar:1.3.1:compile
[INFO] +- org.testng:testng:jar:6.9.10:compile
[INFO] |  +- com.beust:jcommander:jar:1.48:compile
[INFO] |  \- org.beanshell:bsh:jar:2.0b4:compile
[INFO] +- org.springframework:spring-test:jar:4.3.3.RELEASE:test
[INFO] +- org.assertj:assertj-core:jar:2.5.0:test
[INFO] +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  \- org.objenesis:objenesis:jar:2.4:test
[INFO] +- com.google.code.gson:gson:jar:2.7:test
[INFO] +- com.icegreen:greenmail:jar:1.3.1b:test
[INFO] +- com.github.tomakehurst:wiremock:jar:1.58:test
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.2:test
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.5:test
[INFO] |  |  \- commons-codec:commons-codec:jar:1.10:test
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.8.3:compile
[INFO] |  +- xmlunit:xmlunit:jar:1.6:test
[INFO] |  +- org.mortbay.jetty:jetty:jar:6.1.26:test
[INFO] |  |  +- org.mortbay.jetty:jetty-util:jar:6.1.26:test
[INFO] |  |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.3.0:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.2.1:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.1:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.3:compile
[INFO] |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:test
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:1.4.1.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:1.4.1.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.1.RELEASE:test
[INFO]    +- junit:junit:jar:4.12:test
[INFO]    \- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.645 s
[INFO] Finished at: 2016-12-28T12:30:30-05:00
[INFO] Final Memory: 20M/243M
[INFO] ------------------------------------------------------------------------

不要混用Jetty的不同版本

description = 'API'

group = 'ecorp.api'
version = getenv('version', 'unknown')

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'spring-boot'
apply plugin: 'checkstyle'
apply plugin: 'project-report'
apply plugin: 'sonar-runner'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'war'

war {
    baseName = 'api'
}

compileJava.options.encoding = 'UTF-8'

ext.sourceCompatibility = JavaVersion.toVersion('1.8')
ext.targetCompatibility = JavaVersion.toVersion('1.8')

eclipse {
    classpath {
        downloadSources = true
        downloadJavadoc = true
    }
}

checkstyle {
    toolVersion = '7.2'
    configFile = rootProject.file('src/main/resources/checkstyle.xml')
    sourceSets = [sourceSets.main]
    showViolations = true
    ignoreFailures = true
}

bootRun {
    // Enable ./gradlew -Dspring.profiles.active=dev bootRun
    // https://github.com/spring-projects/spring-boot/issues/832
    systemProperties = System.properties
}

buildscript {
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.12.RELEASE")
    }
    repositories {
        maven { url "http://nexus/nexus/content/groups/public" }
    }
}

jacoco {
    toolVersion = "0.7.0.201403182114"
    reportsDir = file("$buildDir/jacoco/reports")
}

test {
    systemProperties = System.properties
    useTestNG()
    jacoco {
        append = false
        destinationFile = file("$buildDir/jacoco/test.exec")
    }
}

// Integration test setup from http://selimober.com/blog/2014/01/24/separate-unit-and-integration-tests-using-gradle/
sourceSets {
    integTest {
        java.srcDir file('src/it/java')
        resources.srcDir file('src/it/resources')
    }
}

task integTest(type: Test) {
    testClassesDir = sourceSets.integTest.output.classesDir
    classpath = sourceSets.integTest.runtimeClasspath
}

check.dependsOn integTest

dependencies {
    integTestCompile sourceSets.main.output
    integTestCompile configurations.testCompile
    integTestCompile sourceSets.test.output
    integTestRuntime configurations.testRuntime
}

integTest {
    systemProperties = System.properties
    useTestNG()
    jacoco {
        append = false
        destinationFile = file("$buildDir/jacoco/integTest.exec")
    }
}


task wrapper(type: Wrapper) {
    gradleVersion = '2.8'
    distributionUrl = 'http://nexus/nexus/content/repositories/Gradle/gradle/gradle/2.8/gradle-2.8-all.zip'
}

configurations { providedRuntime }

/*
 * Include 'provided' scoped dependency during compile time
 */
sourceSets.main.compileClasspath += configurations.providedRuntime

// Define versions used in 2+ places
def versions = [
        activation                  : "1.1.1",
        guava                       : "19.0",
        jackson                     : "2.4.2",
        tomcat                      : "8.0.14",
        logback                     : "1.1.2",
        slf4j                       : "1.7.15",
        snakeYaml                   : "1.13",
        spring                      : "4.2.4.RELEASE",
        springBoot                  : "1.3.2.RELEASE",
        springSecurity              : "3.2.9.RELEASE",
        hibernateValidator          : "5.1.1.Final",
        validation                  : "1.1.0.Final",
        hibernateValidatorAnnotation: "5.1.1.Final"
]

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
    exclude group: 'commons-logging', module: 'commons-logging'
    exclude group: 'org.slf4j', module: 'slf4j-log4j12'
    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
    resolutionStrategy {
        force "ch.qos.logback:logback-classic:${versions.logback}",
                "org.slf4j:slf4j-api:${versions.slf4j}",
                "org.slf4j:jcl-over-slf4j:1.7.6",
                "org.springframework:spring-aop:${versions.spring}",
                "org.springframework:spring-beans:${versions.spring}",
                "org.springframework:spring-context:${versions.spring}",
                "org.springframework:spring-context-support:${versions.spring}",
                "org.springframework:spring-core:${versions.spring}",
                "org.springframework:spring-expression:${versions.spring}",
                "org.springframework:spring-messaging:${versions.spring}",
                "org.springframework:spring-tx:${versions.spring}",
                "org.springframework:spring-web:${versions.spring}",
                "org.springframework:spring-webmvc:${versions.spring}",
                "org.springframework.security:spring-security-config:${versions.springSecurity}",
                "org.springframework.security:spring-security-web:${versions.springSecurity}",
                "org.springframework.ldap:spring-ldap-core:2.0.1.RELEASE",
                "javax.activation:activation:${versions.activation}",
                "org.yaml:snakeyaml:${versions.snakeYaml}",
                "org.apache.httpcomponents:httpclient:4.5",
                "joda-time:joda-time:2.9.2",
                "com.google.guava:guava:${versions.guava}",
                "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}",
                "com.fasterxml.jackson.core:jackson-core:${versions.jackson}",
                "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}",
                "commons-beanutils:commons-beanutils:1.7.0",
                "commons-collections:commons-collections:3.2.1",
                "javax.mail:mail:1.4.7",
                "javax.validation:validation-api:${versions.validation}",
                "org.hibernate:hibernate-validator:${versions.hibernateValidator}",
                "org.hibernate:hibernate-validator-annotation-processor:${versions.hibernateValidatorAnnotation}",
                "net.sf.jopt-simple:jopt-simple:4.7"
        failOnVersionConflict()
    }
}

dependencies {
    compile group: 'org.projectlombok', name: 'lombok', version: "1.14.4"
    compile group: 'org.yaml', name: 'snakeyaml', version: "${versions.snakeYaml}"

    compile group: 'org.slf4j', name: 'slf4j-api', version: "${versions.slf4j}"
    compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: "${versions.slf4j}"
    compile group: 'ch.qos.logback', name: 'logback-classic', version: "${versions.logback}"
    compile group: 'ch.qos.logback', name: 'logback-access', version: "${versions.logback}"
    compile(group: 'org.logback-extensions', name: 'logback-ext-spring', version: "0.1.1") {
        exclude(module: 'spring-context')
        exclude(module: 'spring-web')
        exclude(module: 'servlet-api')
    }
    compile group: 'com.google.guava', name: 'guava', version: "${versions.guava}"
    compile group: 'org.apache.commons', name: 'commons-lang3', version: "3.3.2"
    compile group: 'commons-net', name: 'commons-net', version: "3.4"
    compile group: 'org.springframework', name: 'spring-core', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-aop', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-beans', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-web', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-webmvc', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-tx', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-context', version: "${versions.spring}"

    compile group: 'org.springframework', name: 'spring-context-support', version: "${versions.spring}"
    compile group: 'javax.mail', name: 'mail', version: "1.4.7"
    compile group: 'javax.activation', name: 'activation', version: "${versions.activation}"

    compile group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "0.8.0.RELEASE"
    compile group: 'org.springframework.boot', name: 'spring-boot', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-actuator', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: "${versions.springBoot}"

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${versions.springBoot}"

    compile group: 'org.eclipse.jetty', name: 'jetty-client', version: "9.2.3.v20140905"

    compile "org.apache.tomcat.embed:tomcat-embed-core:${versions.tomcat}"
    compile "org.apache.tomcat.embed:tomcat-embed-logging-juli:${versions.tomcat}"

    compile group: 'javax.validation', name: 'validation-api', version: '${versions.validation}'
    compile group: 'org.hibernate', name: 'hibernate-validator', version: "${versions.hibernateValidator}"
    compile "org.hibernate:hibernate-validator-annotation-processor:${versions.hibernateValidatorAnnotation}"
    compile "javax.el:javax.el-api:2.2.4"
    compile "org.glassfish.web:javax.el:2.2.4"

    compile group: 'org.aspectj', name: 'aspectjweaver', version: '1.8.0'

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: "${versions.springBoot}"
    compile group: 'org.springframework.security', name: 'spring-security-core', version: "${versions.springSecurity}"
    compile group: 'org.springframework.security', name: 'spring-security-web', version: "${versions.springSecurity}"
    compile group: 'org.springframework.security', name: 'spring-security-config', version: "${versions.springSecurity}"

    testCompile group: 'org.testng', name: 'testng', version: "6.8.1"
    testCompile group: 'org.assertj', name: 'assertj-core', version: "3.3.0"
    testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: "1.3"
    testCompile group: 'org.mockito', name: 'mockito-core', version: "1.10.19"
    testCompile group: 'org.springframework', name: 'spring-test', version: "${versions.spring}"
    testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: "4.5"
    testCompile group: "com.icegreen", name: "greenmail", version: "1.3.1b"
    testCompile group: 'com.github.tomakehurst', name: 'wiremock', version: "1.58"
    testCompile group: 'com.google.code.gson', name: 'gson', version: "2.5"
}

def getenv(name, defaultVal = null) {
    return System.properties[name] ?: System.env[name] ?: defaultVal
}
始终使用相同的版本

另外,Jetty9.x是Servlet3.1

[INFO] +- org.eclipse.jetty:jetty-client:jar:9.2.3.v20140905:compile
[INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile
[INFO] |  \- org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile
...
[INFO] |  +- org.mortbay.jetty:jetty:jar:6.1.26:test
[INFO] |  |  +- org.mortbay.jetty:jetty-util:jar:6.1.26:test
这是无效的。

运气好吗?(从历史上讲)Gradle不像Maven那样严格,也不像Maven那样能够复制构建。
description = 'API'

group = 'ecorp.api'
version = getenv('version', 'unknown')

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'spring-boot'
apply plugin: 'checkstyle'
apply plugin: 'project-report'
apply plugin: 'sonar-runner'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'war'

war {
    baseName = 'api'
}

compileJava.options.encoding = 'UTF-8'

ext.sourceCompatibility = JavaVersion.toVersion('1.8')
ext.targetCompatibility = JavaVersion.toVersion('1.8')

eclipse {
    classpath {
        downloadSources = true
        downloadJavadoc = true
    }
}

checkstyle {
    toolVersion = '7.2'
    configFile = rootProject.file('src/main/resources/checkstyle.xml')
    sourceSets = [sourceSets.main]
    showViolations = true
    ignoreFailures = true
}

bootRun {
    // Enable ./gradlew -Dspring.profiles.active=dev bootRun
    // https://github.com/spring-projects/spring-boot/issues/832
    systemProperties = System.properties
}

buildscript {
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.12.RELEASE")
    }
    repositories {
        maven { url "http://nexus/nexus/content/groups/public" }
    }
}

jacoco {
    toolVersion = "0.7.0.201403182114"
    reportsDir = file("$buildDir/jacoco/reports")
}

test {
    systemProperties = System.properties
    useTestNG()
    jacoco {
        append = false
        destinationFile = file("$buildDir/jacoco/test.exec")
    }
}

// Integration test setup from http://selimober.com/blog/2014/01/24/separate-unit-and-integration-tests-using-gradle/
sourceSets {
    integTest {
        java.srcDir file('src/it/java')
        resources.srcDir file('src/it/resources')
    }
}

task integTest(type: Test) {
    testClassesDir = sourceSets.integTest.output.classesDir
    classpath = sourceSets.integTest.runtimeClasspath
}

check.dependsOn integTest

dependencies {
    integTestCompile sourceSets.main.output
    integTestCompile configurations.testCompile
    integTestCompile sourceSets.test.output
    integTestRuntime configurations.testRuntime
}

integTest {
    systemProperties = System.properties
    useTestNG()
    jacoco {
        append = false
        destinationFile = file("$buildDir/jacoco/integTest.exec")
    }
}


task wrapper(type: Wrapper) {
    gradleVersion = '2.8'
    distributionUrl = 'http://nexus/nexus/content/repositories/Gradle/gradle/gradle/2.8/gradle-2.8-all.zip'
}

configurations { providedRuntime }

/*
 * Include 'provided' scoped dependency during compile time
 */
sourceSets.main.compileClasspath += configurations.providedRuntime

// Define versions used in 2+ places
def versions = [
        activation                  : "1.1.1",
        guava                       : "19.0",
        jackson                     : "2.4.2",
        tomcat                      : "8.0.14",
        logback                     : "1.1.2",
        slf4j                       : "1.7.15",
        snakeYaml                   : "1.13",
        spring                      : "4.2.4.RELEASE",
        springBoot                  : "1.3.2.RELEASE",
        springSecurity              : "3.2.9.RELEASE",
        hibernateValidator          : "5.1.1.Final",
        validation                  : "1.1.0.Final",
        hibernateValidatorAnnotation: "5.1.1.Final"
]

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
    exclude group: 'commons-logging', module: 'commons-logging'
    exclude group: 'org.slf4j', module: 'slf4j-log4j12'
    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
    resolutionStrategy {
        force "ch.qos.logback:logback-classic:${versions.logback}",
                "org.slf4j:slf4j-api:${versions.slf4j}",
                "org.slf4j:jcl-over-slf4j:1.7.6",
                "org.springframework:spring-aop:${versions.spring}",
                "org.springframework:spring-beans:${versions.spring}",
                "org.springframework:spring-context:${versions.spring}",
                "org.springframework:spring-context-support:${versions.spring}",
                "org.springframework:spring-core:${versions.spring}",
                "org.springframework:spring-expression:${versions.spring}",
                "org.springframework:spring-messaging:${versions.spring}",
                "org.springframework:spring-tx:${versions.spring}",
                "org.springframework:spring-web:${versions.spring}",
                "org.springframework:spring-webmvc:${versions.spring}",
                "org.springframework.security:spring-security-config:${versions.springSecurity}",
                "org.springframework.security:spring-security-web:${versions.springSecurity}",
                "org.springframework.ldap:spring-ldap-core:2.0.1.RELEASE",
                "javax.activation:activation:${versions.activation}",
                "org.yaml:snakeyaml:${versions.snakeYaml}",
                "org.apache.httpcomponents:httpclient:4.5",
                "joda-time:joda-time:2.9.2",
                "com.google.guava:guava:${versions.guava}",
                "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}",
                "com.fasterxml.jackson.core:jackson-core:${versions.jackson}",
                "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}",
                "commons-beanutils:commons-beanutils:1.7.0",
                "commons-collections:commons-collections:3.2.1",
                "javax.mail:mail:1.4.7",
                "javax.validation:validation-api:${versions.validation}",
                "org.hibernate:hibernate-validator:${versions.hibernateValidator}",
                "org.hibernate:hibernate-validator-annotation-processor:${versions.hibernateValidatorAnnotation}",
                "net.sf.jopt-simple:jopt-simple:4.7"
        failOnVersionConflict()
    }
}

dependencies {
    compile group: 'org.projectlombok', name: 'lombok', version: "1.14.4"
    compile group: 'org.yaml', name: 'snakeyaml', version: "${versions.snakeYaml}"

    compile group: 'org.slf4j', name: 'slf4j-api', version: "${versions.slf4j}"
    compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: "${versions.slf4j}"
    compile group: 'ch.qos.logback', name: 'logback-classic', version: "${versions.logback}"
    compile group: 'ch.qos.logback', name: 'logback-access', version: "${versions.logback}"
    compile(group: 'org.logback-extensions', name: 'logback-ext-spring', version: "0.1.1") {
        exclude(module: 'spring-context')
        exclude(module: 'spring-web')
        exclude(module: 'servlet-api')
    }
    compile group: 'com.google.guava', name: 'guava', version: "${versions.guava}"
    compile group: 'org.apache.commons', name: 'commons-lang3', version: "3.3.2"
    compile group: 'commons-net', name: 'commons-net', version: "3.4"
    compile group: 'org.springframework', name: 'spring-core', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-aop', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-beans', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-web', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-webmvc', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-tx', version: "${versions.spring}"
    compile group: 'org.springframework', name: 'spring-context', version: "${versions.spring}"

    compile group: 'org.springframework', name: 'spring-context-support', version: "${versions.spring}"
    compile group: 'javax.mail', name: 'mail', version: "1.4.7"
    compile group: 'javax.activation', name: 'activation', version: "${versions.activation}"

    compile group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "0.8.0.RELEASE"
    compile group: 'org.springframework.boot', name: 'spring-boot', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-actuator', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: "${versions.springBoot}"
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: "${versions.springBoot}"

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${versions.springBoot}"

    compile group: 'org.eclipse.jetty', name: 'jetty-client', version: "9.2.3.v20140905"

    compile "org.apache.tomcat.embed:tomcat-embed-core:${versions.tomcat}"
    compile "org.apache.tomcat.embed:tomcat-embed-logging-juli:${versions.tomcat}"

    compile group: 'javax.validation', name: 'validation-api', version: '${versions.validation}'
    compile group: 'org.hibernate', name: 'hibernate-validator', version: "${versions.hibernateValidator}"
    compile "org.hibernate:hibernate-validator-annotation-processor:${versions.hibernateValidatorAnnotation}"
    compile "javax.el:javax.el-api:2.2.4"
    compile "org.glassfish.web:javax.el:2.2.4"

    compile group: 'org.aspectj', name: 'aspectjweaver', version: '1.8.0'

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: "${versions.springBoot}"
    compile group: 'org.springframework.security', name: 'spring-security-core', version: "${versions.springSecurity}"
    compile group: 'org.springframework.security', name: 'spring-security-web', version: "${versions.springSecurity}"
    compile group: 'org.springframework.security', name: 'spring-security-config', version: "${versions.springSecurity}"

    testCompile group: 'org.testng', name: 'testng', version: "6.8.1"
    testCompile group: 'org.assertj', name: 'assertj-core', version: "3.3.0"
    testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: "1.3"
    testCompile group: 'org.mockito', name: 'mockito-core', version: "1.10.19"
    testCompile group: 'org.springframework', name: 'spring-test', version: "${versions.spring}"
    testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: "4.5"
    testCompile group: "com.icegreen", name: "greenmail", version: "1.3.1b"
    testCompile group: 'com.github.tomakehurst', name: 'wiremock', version: "1.58"
    testCompile group: 'com.google.code.gson', name: 'gson', version: "2.5"
}

def getenv(name, defaultVal = null) {
    return System.properties[name] ?: System.env[name] ?: defaultVal
}
[INFO] +- org.eclipse.jetty:jetty-client:jar:9.2.3.v20140905:compile
[INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile
[INFO] |  \- org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile
...
[INFO] |  +- org.mortbay.jetty:jetty:jar:6.1.26:test
[INFO] |  |  +- org.mortbay.jetty:jetty-util:jar:6.1.26:test
[INFO] |  |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:test