自动化构建工具发展历程
Make -> Ant -> Maven -> Gradle
Make 、Ant 已经完全被淘汰掉了。
当前,maven是主流,maven和gradle并存。gradle使用的越来越广泛。
Maven使用基于XML的配置,Gradle采用了领域特定语言Groovy的配置。
在Maven中要引入一个依赖,如下面的例子:
<properties>
<kaptcha.version>2.3</kaptcha.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.code.kaptcha</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
而想要在gradle中达到相同的效果,代码如下:
dependencies {
testCompile('junit:junit:4.7')
compile('org.springframework:spring-core:2.5.6')
compile('org.springframework:spring-beans:2.5.6')
compile('org.springframework:spring-context:2.5.6')
compile('com.google.code.kaptcha:kaptcha:2.3:jdk15') }
Gradle学习系列之一——Gradle快速入门
http://www.cnblogs.com/CloudTeng/p/3417762.html