mentioned above:
Gradle existed for a long time, only to know that Maven and Ivy, only recently knew this existence, because later will use this; So, to learn how to use this tool, start by building a simple project!
In fact, I have seen Gradle before, but did not pay attention to, of course, there are many, look at the picture:
There are so many dependent management tools!
Using tools:
Ide:eclipse
jdk:1.7
gradle:3.0
Springboot
Specific steps:
1. Eclipse Add Gradle Support:
Install Eclipse bulidship plugin: eclipse-->help-->eclipse marketpalce---> Search gradle
2, the official website download Gradle-3.0-bin.zip Reserve;
3, Eclipse New Project Select Gradle, you can choose the default options, you can also configure your own gradlehome
4, modify the Build.gradle configuration file, add dependencies
Apply plugin: ' java 'Apply Plugin: ' Maven 'Apply Plugin: ' Maven-publish 'sourcecompatibility= 1.7Compilejava. options.encoding = ' UTF-8 'version= ' 1.0 'repositories {jcenter () Maven {name' Maven Repository 'URL"${repositorymavenurl}"} ivy {name' Ivy Repository 'URL"${repositoryivyurl}"Layout"Pattern",{Artifact' [Organisation]/[module]/[revision]/[type]s/[artifact]-[revision]. [ext] 'Ivy' [Organisation]/[module]/[revision]/[type]s/[artifact]. [ext] 'm2compatible=true}}}dependencies {compile' Org.slf4j:slf4j-api:1.7.21 'Compile ("Org.springframework.boot:spring-boot-starter-web:1.4.2.release")}task copyjars (Type:Copy) {from Configurations.runtime into' Build/libs/lib '} task Copyconfigs (type:Copy) { /*From ' configs/' to ' Build/libs/configs '*/} task Generatejar (type: Jar, DependsOn: [Copyjars, Copyconfigs,Jar]) {manifest {attributes (' Implementation-title ': ' Gradle ', ' implementation-version ': Version, ' main-class ': ' Samp Le.main.Main ', ' Class-path ': configurations.compile.collect {' lib/' + It.getname ()}.Join(‘ ‘)} into (‘‘) { from"$buildDir/classes/main "include(' sample/')} into (‘‘) { from"$projectDir/src/main/resources " } }
Build.gradle
Repositories configuration warehouse, the default Jcenter (), of course, you can also configure the local server dependencies;
5, Spring boot related configuration, reference: http://www.cnblogs.com/liangblog/p/5207855.html
----------------------------------------------------------------------------------------------------
Use the Spring boot project in Eclipse to build dependency management using Gradle