Eclipse under Gradle Configuration
This is really troublesome ah, a project to learn the Java thing finished! No, it's just a gradle after maven.
Http://gradle.org/gradle-download
1, downloaded a 2.9. Configuration:
2. After downloading, unzip the zip directly and put it in your computer's software installation directory, for example: D:\Program Files
3. In the computer/My Computer settings environment variables, if you download all, you need to add Gradle_home point to gradle the directory of the installation directory, for example: D:\Program files\gradle-2.0. You then need to add the bin directory of the Gradle to the PATH environment variable, for example: D:\Program files\gradle-2.0\bin
Eclipse Plugin, I'm looking for in the market
Project or not run up Ah, missing jar package, what to do?
-----------because we're adding a dependency package, right? So, we also need to "Gradle->refresh all", we will load the jar---this sentence is the most important!
Import Org.gradle.plugins.ide.eclipse.model.Facet Apply plugin: ' maven ' Apply plugin: ' java ' Apply plugin: ' War ' apply Plugin: ' ECLIPSE-WTP ' sourcecompatibility = 1.8//Set JDK version webappdirname = ' webcontent '//Set WEBAPP root directory sourcesets. Main.java.srcDir ' src '//Set Java source directory//Set MAVEN library address repositories {mavencentral ()//Central library maven {URL ' http: Localhost:8081/nexus/content/groups/public '//Custom library Address}//Set dependent dependencies {providedcompile ' Javax.servlet:servle t-api:2.5 '//Compile period providedruntime ' javax.servlet:jstl:1.2 '//runtime}//Set Project Facetseclipse {WTP {FA Cet {facet name: ' Jst.web ', type:Facet.FacetType.fixed facet name: ' Wst.jsdt.web ', Type:Facet.Fac ettype.fixed facet name: ' Jst.java ', type:Facet.FacetType.fixed facet name: ' Jst.web ', Version: ' 2. 5 ' Facet name: ' Jst.java ', version: ' 1.8 ' facet name: ' Wst.jsdt.web ', Version: ' 1.0 '}}
Eclipse under Gradle Configuration