Java项目自动化构建工具

自动化构建工具发展历程

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值