Gradle为Web开发提供了两个插件,war和jetty
apply plugin: ‘war‘ apply plugin: ‘jetty‘
war插件继承了java插件,jetty插件继承了war插件
war插件用于打war包
jetty作为工程部署的容器
web项目的基本配置
group ‘org.zln.learning‘ version ‘1.0-SNAPSHOT‘ apply plugin: ‘maven‘ apply plugin: ‘jetty‘ sourceCompatibility = 1.8 repositories { mavenLocal() mavenCentral() } dependencies { testCompile ‘junit:junit:4.12‘ } uploadArchives { repositories { mavenDeployer { repository(url: "file:/Users/sherry/WorkPath/maven/repository/") } } }
原文:http://www.cnblogs.com/sherrykid/p/5928036.html