GRADLE快速获得Jar

最快速入门的莫过于通过一个例子了,请看下面

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
apply plugin: 'java'
apply plugin: 'war'
 
 
repositories{
     mavenCentral()
}
dependencies{
     //compile('org.springframework:spring-core:2.5.6')
     //runtime('junit:junit:4+')
     
     compile( 'org.springframework:spring-core:3.2+' )
     compile( 'org.hibernate:hibernate-c3p0:3.6.10.Final' )
     compile( 'org.springframework.security:spring-security-core:2.0.8.RELEASE' )
     compile( 'org.apache.struts:struts2-tiles-plugin:2.3.8' )
     compile( 'org.apache.struts:struts2-spring-plugin:2.3.8' )
     compile( 'org.apache.cxf:cxf:2.7.3' )
     compile( 'org.springframework:spring-core:3.2+' )
     compile( 'org.apache.cxf:cxf-rt-core:2.7.3' )
     compile( 'org.apache.cxf:cxf-api:2.7.3' )
     
     runtime( 'junit:junit:4+' )
}

将其保存为build.gradle 
在当前目录下打开命令行 $ gradle build
然后你在build 目录下面就会发现一个war文件,你要的jar文件应该全部在里面

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值