It does end up in the right place:
unzip webapp/build/libs/webapp-0.0.1.war
// ... snip
creating: WEB-INF/classes/META-INF/
inflating: WEB-INF/classes/META-INF/persistence.xml
creating: WEB-INF/classes/i18n/
inflating: WEB-INF/classes/i18n/core_pt.properties
inflating: WEB-INF/classes/i18n/core_ro.properties
inflating: WEB-INF/classes/i18n/core_mt.properties
inflating: WEB-INF/classes/i18n/core_el.properties
inflating: WEB-INF/classes/i18n/core.properties
// ... snip
Using Gradle 1.0-milestone-3 I get the following dependencies in the War:
inflating: WEB-INF/lib/logback-classic-0.9.30.jar
inflating: WEB-INF/lib/logback-core-0.9.30.jar
inflating: WEB-INF/lib/slf4j-api-1.6.2.jar
inflating: WEB-INF/lib/thymeleaf-spring3-1.1.2.jar
inflating: WEB-INF/lib/thymeleaf-1.1.2.jar
inflating: WEB-INF/lib/ognl-3.0.jar
inflating: WEB-INF/lib/javassist-3.14.0-GA.jar
inflating: WEB-INF/lib/bonecp-0.7.1.RELEASE.jar
inflating: WEB-INF/lib/guava-r08.jar
inflating: WEB-INF/lib/hsqldb-2.2.4.jar
inflating: WEB-INF/lib/spring-webmvc-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-asm-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-beans-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-core-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-context-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-expression-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-aop-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/aopalliance-1.0.jar
inflating: WEB-INF/lib/spring-context-support-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-web-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-orm-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-jdbc-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-tx-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-data-jpa-1.0.1.RELEASE.jar
inflating: WEB-INF/lib/spring-data-commons-core-1.1.0.RELEASE.jar
inflating: WEB-INF/lib/aspectjrt-1.6.8.jar
inflating: WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
inflating: WEB-INF/lib/javax.servlet-api-3.0.1.jar
inflating: WEB-INF/lib/javax.inject-1.jar
inflating: WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar
inflating: WEB-INF/lib/hibernate-entitymanager-3.6.8.Final.jar
inflating: WEB-INF/lib/hibernate-core-3.6.8.Final.jar
inflating: WEB-INF/lib/antlr-2.7.6.jar
inflating: WEB-INF/lib/commons-collections-3.1.jar
inflating: WEB-INF/lib/dom4j-1.6.1.jar
inflating: WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar
inflating: WEB-INF/lib/jta-1.1.jar
inflating: WEB-INF/lib/cglib-2.2.jar
inflating: WEB-INF/lib/asm-3.1.jar
inflating: WEB-INF/lib/javassist-3.12.0.GA.jar
Using both the jettyRun and the jettyRunWar tasks work beautifully this is without any change to the build.gradle scripts or the codebase.
Using Gradle-1.0-milestone-6 I get the following dependencies in the War:
inflating: WEB-INF/lib/spring-webmvc-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-orm-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-data-jpa-1.0.1.RELEASE.jar
inflating: WEB-INF/lib/javax.servlet-api-3.0.1.jar
inflating: WEB-INF/lib/javax.inject-1.jar
inflating: WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar
inflating: WEB-INF/lib/hibernate-entitymanager-3.6.8.Final.jar
inflating: WEB-INF/lib/logback-classic-0.9.30.jar
inflating: WEB-INF/lib/thymeleaf-spring3-1.1.2.jar
inflating: WEB-INF/lib/bonecp-0.7.1.RELEASE.jar
inflating: WEB-INF/lib/hsqldb-2.2.4.jar
inflating: WEB-INF/lib/spring-asm-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/commons-logging-1.1.1.jar
inflating: WEB-INF/lib/spring-core-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-beans-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-expression-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/aopalliance-1.0.jar
inflating: WEB-INF/lib/spring-aop-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-context-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-context-support-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-web-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-tx-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-jdbc-3.0.6.RELEASE.jar
inflating: WEB-INF/lib/spring-data-commons-core-1.1.0.RELEASE.jar
inflating: WEB-INF/lib/slf4j-api-1.6.2.jar
inflating: WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
inflating: WEB-INF/lib/aspectjrt-1.6.8.jar
inflating: WEB-INF/lib/antlr-2.7.6.jar
inflating: WEB-INF/lib/commons-collections-3.1.jar
inflating: WEB-INF/lib/dom4j-1.6.1.jar
inflating: WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar
inflating: WEB-INF/lib/jta-1.1.jar
inflating: WEB-INF/lib/hibernate-core-3.6.8.Final.jar
inflating: WEB-INF/lib/asm-3.1.jar
inflating: WEB-INF/lib/cglib-2.2.jar
inflating: WEB-INF/lib/javassist-3.12.0.GA.jar
inflating: WEB-INF/lib/logback-core-0.9.30.jar
inflating: WEB-INF/lib/ognl-3.0.jar
inflating: WEB-INF/lib/javassist-3.14.0-GA.jar
inflating: WEB-INF/lib/thymeleaf-1.1.2.jar
inflating: WEB-INF/lib/guava-r08.jar
(Note: between switching build tool versions I first run ‘gradle -C rebuild clean’)
They are not exactly the same list of dependencies, with M6 the project fails with missing classes and in M3 the project works perfectly. The differences are that M3 contains:
inflating: WEB-INF/lib/javassist-3.14.0-GA.jar
and M6 contains:
inflating: WEB-INF/lib/commons-logging-1.1.1.jar
inflating: WEB-INF/lib/javassist-3.12.0.GA.jar
The commons-logging dependency used to be excluded, I use this line in the gradle script:
dependencies {
springVersion = "3.0.6.RELEASE"
compile("org.springframework:spring-webmvc:$springVersion") {
exclude group: "commons-logging", name: "commons-logging"
}
// ... snip
}
Which appears to be ignored in the M6 release…
I don’t understand why the same build script would cause different versions of dependencies to be resolved by Gradle ?