This project is no longer under active development. Please use BuildShip instead.
The Eclipse-Integration-Gradle project brings you developer tooling for Gradle into Eclipse.
It comes with Spring UAA (User Agent Analysis), an optional component that help us to collect some usage data. This is completely anonymous and helps us to understand better how the tooling is used and how to improve it in the future.
It also comes with the SpringSource Dashboard as an optional component, which brings you up-to-date information about SpringSource-related projects as well as an easy-to-use extension install to get additional tooling add-ons, like the tc Server Integration for Eclipse, the Cloud Foundry Integration for Eclipse, Grails IDE and Groovy Eclipse.
Either one of the following:
If you want support for editing .gradle files a compatible Groovy Eclipse installation is required. STS 3.0.0 requires Groovy Eclipse 2.7.0. The Gradle tooling should be usable without Groovy Eclipse, but some functionality (related to editing gradle files) will not work.
Documentation for the functionality offered by Eclipse-Integration-Gradle tooling is available from our project's GitHub Wiki.
The easiest way to install is from the STS Dashboard "Extensions" page.
Alternatively you can install from update sites. The following update sites are available:
Pasting the above URLs into a web browser will not work. You need to follow the instructions given below to use an Eclipse update site.
If you follow this installation procedure in a plain Eclipse, this will install the STS Dashboard. This gives you an easy way to subsequently install Groovy Eclipse as well. See instructions on Installing from the STS Dashboard above.
Use Update Site Archive for STS from https://spring.io/tools/sts/all
If you have a question that Google can't answer, the best way is to go to the StackOverflow.
There you can also ask questions and search for other people with related or similar problems (and solutions).
With regards to bug reports, please go to the Github issue tracker.
The remainder of this documents expects a familiarity with Eclipse architecture and how plugin development works. If you are not already familiar with Eclipse development, then you may want to read some tutorials about the Eclipse plugin architecture and how to develop with it. A good start is here: https://www.ibm.com/developerworks/library/os-eclipse-plugindev1/.
The instructions here are tested starting with a 'clean' copy of Eclipse 4.4 JEE. It is also possible to setup a similar environment based on older versions of Eclipse.
First we will start by setting up a suitable instance of Eclipse. This instance will serve a double purpose:
Steps:
https://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2/
https://dist.springsource.com/snapshot/TOOLS/gradle/nightly
The source code for this project is hosted on github. You can use egit (Eclipse Integration for Git) or commandline git tools to get the source code on to your machine.
To get the source code onto your machine:
git clone git://github.com/SpringSource/eclipse-integration-gradle.git
or if you are a committer:
git clone git@github.com:SpringSource/eclipse-integration-gradle.git
The source code consists of a single root project and several sub-projects nested within it. You can use either 'EGit' or the generic Eclipse 'Import Existing Projects' wizard. However both wizards are tripped up by the nested project structure. As soon as the Wizard sees the root .project
file it will stop looking for nested projects. To side-step this problem simply delete the root .project
file before importing the subprojects.
cd eclipse-integration-gradle
rm .project
After importing the sub-projects, reinstate the root .project
file:
git checkout .project
If you want to, you can now import the root project as well.
At this point you likely have errors in your workspace like 'The project cannot be build until build path errors are resolved'.
Our tools are built on top of the Gradle Tooling API. However the Tooling API jars are not included in the git repository. They have to be downloaded and placed into org.springsource.ide.eclipse.gradle.core/lib
. This is accomplished by using gradle itself to download the libraries.
Open the 'Gradle Tasks' View (via Window >> Show View menu).
toolingapi
.publish
task.updateLibs
task.You can also do this on the commandline:
cd toolingapi/
./gradlew
This runs both publish
and updateLibs
as they have been preselected as the default tasks in the Gradle script.
If you do this on the commandline you will need to manually refresh the org.springsource.ide.eclipse.gradle.core
project in the Eclipse workspace afterwards. If you use the 'Gradle Tasks View' then the refresh is automatic.
Note that the script only downloads the jars and updates the plugin MANIFEST.MF
but it does not automatically update the .classpath
file in the project. Normally neither of these files changes unless the Tooling API version has changed. In this case no further action is required.
However if MANIFEST.MF
did change then you will have to force Eclipse to update the .classpath file as well. To do this, right click the project and select 'Plugin Tools >> Update Classpath' (note: in Eclipse 3.7 the menu is called 'PDE Tools').
After this all compile errors should disappear. (Note: In Eclipse 4.2 I have on occasion noticed that you need to force a workspace rebuild by cleaning the project before errors actually disappear).
To run the regression tests inside of Eclipse. Find the class 'AllGradleCoreTests' and run it as a 'Junit Plugin Test'. You can also run the smaller testsuites individually in the same way.
Notes:
testImportSpringSecurity
will fail if you have followed these instructions exactly.
This is expected because the spring-security-code that is imported in this test requires a very specific version of the Groovy Compiler (1.7 at the time of this writing) You can ignore this error or edit the launch configuration to disable all but the 1.7 version of the org.codehouse.groovy bundles.
The Gradle IDE project uses Maven Tycho to do continuous integration builds and to produce p2 repos and update sites. To build the project yourself, you can execute:
mvn -Pe42 -Dmaven.test.skip=true clean install
This will use maven to compile all Gradle-IDE plugins, excluding test bundles and package them up to produce an update site for a snapshot build. The update site will be located in gradle-ide/org.springsource.ide.eclipse.gradle.site/target
.
If you want to run tests during your build, then remove -Dmaven.test.skip=true
.
If you want to also build test bundles but not run tests then replace -Dmaven.test.skip=true
with -DskipTests
.
If you want to build against Eclipse 3.7 instead of Eclipse 4.2 than use -Pe37
instead of -Pe42
.
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct]. By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
Here are some ways for you to get involved in the community:
Before we accept a patch or pull request we will need you to sign the contributor's agreement. Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.