Use Eclipse to develop groovy[docs.codehaus.org]

http://docs.codehaus.org/display/GROOVY/Install+Groovy-Eclipse+Plugin

http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project

TUTORIAL OVERVIEW 
Task - Install GroovyEclipse Plugin. 
Level - Very basic. 
Prerequisites - Eclipse 3.4.2, 3.5, 3.5.1 or 3.6.0.

ALL GROOVY-ECLIPSE TUTORIALS 
Install GroovyEclipse Plugin 
Create Your First Groovy Project


QUICK FACTS FOR ECLIPSE EXPERTS


GroovyEclipse update site for Eclipse 4.2 (Juno), 
Release update site

http://dist.springsource.org/release/GRECLIPSE/e4.2/

GroovyEclipse update site for Eclipse 3.7 (Indigo), 
Release update site

http://dist.springsource.org/release/GRECLIPSE/e3.7/

GroovyEclipse update site for Eclipse 3.6.n (Helios), 
snapshot build with recent fixes

http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/

GroovyEclipse update site for Eclipse 3.5.n (Galileo), 
M1 build

http://dist.springsource.org/milestone/GRECLIPSE/e3.5/

GroovyEclipse update site for Eclipse 3.5.n (Galileo), 
snapshot build with recent fixes

http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.5/

GroovyEclipse update site for Eclipse 3.4.2 (Europa), 
snapshot build with recent fixes

http://ci.repository.codehaus.org/greclipse/snapshot/e34/

GroovyEclipse update site for Eclipse 3.4.2 (Europa), 
M1 build

available soon

GETTING HELP – If you have problems, send a message to http://xircles.codehaus.org/lists/[email protected].

 

Do

See

1
In Eclipse 3.5.x, click Help > Install New Software.

You use Eclipse‘s standard installation process to download and install GroovyEclipse. The Eclipse user interface for software installation and update varies between 3.4 and 3.5.

Eclipse 3.4.2 users: click Help > Software Updates and follow the dialogs to work with or add the GroovyEclipse update site - see step 3 for the URL.


2
To add the GroovyEclipse plugin download site to your Available Software Sites, click Add on the Available Software page.

If you have previously added the site, click the blue down arrow and select if from the drop-down list of your available sites.


3
On the Add Site page, type a name in the Name box to assign a name of your preference to the site, or leave it blank to use a default site name constructed from repository metadata.

In the Location box type the download URL the URL that corresponds to your version of Eclipse, and click Next.

If you use 3.4.2 - "http://ci.repository.codehaus.org/greclipse/snapshot/e34" or

If you use 3.5.x - "http://dist.springsource.org/milestone/GRECLIPSE/e3.5/"


4
On the Available Software page, checkmark Groovy-Eclipse Plugin, and if you wish to work with the plugin sources, Groovy Eclipse SDK.

Click Next.

Don‘t checkmark Groovy Compilers - they are included in the GroovyEclipse Plugin.


5
You can review the components to be installed on the Install Details page.

As noted above, the GroovyEclipse Plugin includes two versions of the Groovy compilers: v1.7-beta2 (enabled) and v1.6.5.

The JDT Core patch is an update to the Eclipse Java Development Tool (JDT) that enables Groovy/JDT integration.


6
Accept the license agreement and click Finish.


7
Eclipse prompts you to restart.


8
After Eclipse restarts, you can see that Eclipse‘s File > New menu now includes wizards for creating Groovy projects, classes, and test cases.

You have successfully installed GroovyEclipse.

For step-by-step instructions on how to create your first Groovy program using GroovyEclipse, see Create Your First Groovy Project.


TUTORIAL OVERVIEW 
   Task - Create a Groovy project in Eclipse. 
   Level - Basic. The task is simple if you have created a Java project in Eclipse. 
   Prerequisites - GroovyEclipse v2.0, Eclipse 3.4.2, 3.5, or 3.5.1.

ALL GROOVY-ECLIPSE TUTORIALS 
   Install Groovy-Eclipse Plugin 
   Create Your First Groovy Project


QUICK FACTS FOR EXPERIENCED ECLIPSE USERS 
Create a Groovy project in Eclipse the same way you do a Java project, but use the Groovy wizards – File > New > Groovy Project and File > New > Groovy Class – instead of the Java equivalents.

NOTE: In this tutorial, the Groovy-Eclipse plugin is running on Eclipse 3.5.1. The user interface and task flow may vary somewhat in Eclipse 3.4.2.

GETTING HELP – If you have problems, send a message to http://xircles.codehaus.org/lists/[email protected].

 

Do

See

1
In Eclipse, click File > New > Groovy Project.

If Groovy Project does not appear in the drop-down list, then select Other and search for Groovy Project in the dialog box.


2
In the New Groovy Project wizard, type a name in the Project Name box, and click Next.

GroovyEclipse creates the project and a folder structure for it. A folder with the same name as the project appears in the Package Explorer. The project directory contains asrc and a bin folder, each empty.


3
The tabs and options in the Build Settings window are identical to those in the the Java Development Tool (JDT).

Click Finish to proceed without customizing the build settings.

For information about build options, see Eclipse help for the New Java Project Wizard; it applies to Groovy projects as well.


4
Select the project in the Package Explorer, and click File > New > Groovy Class.


5
In the Groovy Class wizard, type a name for the class in the Name box, a name for the package in the Packagefield, and click Finish to create the class and package.

If you type the name of an existing package in thePackage field, the class is created there.

Just like in the JDT, you can create a package as a separate step with File > New > Package, or when you use the create the first class


6
GroovyEclipse creates the new class. The new class, Greetings.groovy in this example, is listed in the Package Explorer, and opened in the editor.

Note that, as generated by GroovyEclipseGreetings.groovy already contains the package statement and class declaration.


7
Paste this code into the file:

static void main(def args) { 
   def mygreeting = "Hello World" 
   println mygreeting 
}


8
Right click anywhere in the editor and then Run > Run As > Groovy Scriptor Java Application.

Running as an Application will launch the compiled *.class files, whereas running as aScript will launch the uncompiled *.groovy files. In general, the results will be the same, but there are some subtle differences between the two.


9
The greeting is issued in the Consoletab.


Use Eclipse to develop groovy[docs.codehaus.org],布布扣,bubuko.com

时间: 2024-10-07 16:06:16

Use Eclipse to develop groovy[docs.codehaus.org]的相关文章

SoapUI Pro Project Solution Collection –Easy develop Groovy Script to improve SoapUI ability

As you know the groovy script and java script language is the soapui supported .but unfortunately Soapui's groovy editor had not provided a better editor to write the groovy script. there are two approaches you can take to write your own groovy scrip

eclipse安装groovy插件

Eclipse Mars 2 groovy - http://dist.springsource.org/snapshot/GRECLIPSE/e4.4/ groovy - http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/ 有几个子选项不能选择,会安装失败,比如测试的那个,这样在测web项目时debug groovy脚本会找不到源码,,,在找其他方法

Debug with Eclipse

In this post we are going to see how to develop applications using Eclipse and Portofino 4. The traditional development of a web application in Eclipse requires the creation of a web project and its deployment on an application server such as Tomcat.

Maven + Eclipse + Tomcat - 开启项目调试之旅(转载)

本文的读者需要拥有一些Maven基础知识和实践,如果没有,请直接绕过或者先看一些关于Maven教程,比如Juven翻译的<Maven权威指南>,google一下便知. 开门见山,首先抛出一个问题(如果你对我遇到的问题不敢兴趣,请飘过,直接看分割线以下的文字): 我有一个团队基础框架项目,代号:framework,用maven构建,是个war类型的项目.团队中其他的应用项目都会用到它,包括Java程序和Web相关的一些文件(js.css和html等公共组件).所以我在package的时候产出了多

精通 Groovy

使用 Groovy 的简单语法开发 Java 应用程序 本教程适合于不熟悉 Groovy,但想快速轻松地了解其基础知识的 Java? 开发人员.了解 Groovy 对 Java 语法的简化变形,学习 Groovy 的核心功能,例如本地集合.内置正则表达式和闭包.编写第一个 Groovy 类,然后学习如何使用 JUnit 轻松地进行测试.借助功能完善的 Groovy 开发环境和使用技能,您将轻松完成本教程的学习.最重要的是,您将学会如何在日常 Java 应用程序开发中联合使用 Groovy 和 J

Groovy轻松入门——搭建Groovy开发环境

多日来,我发表了多篇关于Groovy的文章,想必大家对Groovy或多或少已经有所了解,今后我会抽空写些Groovy入门性质的文章,供大家参考.由于时间仓促,水平有限,不足之处请各位朋友多包涵提点,谢谢.既然是入门,我先不介绍那些IDE的东西,比如Eclipse中的Groovy插件(如果您迫不及待的话,可以先看一下安装Groovy的Eclipse插件),我先讲一下如何设置Groovy的环境变量(我目前所用的系统是Windows XP),最后运行一个Hello, world程序告终. Groovy

Git下载Spring项目源码并编译为Eclipse

1)当前系统中安装了gradle,如果为安装,可以从:http://www.gradle.org/downloads,,下载完后进行解压到任意盘符,然后增加环境变量GRADLE_HOME,并在环境变量bin中增加%GRADLE_HOME%/bin,打开DOS窗口,运行gradle -v,出现版本号等信息,表示安装成功: 2)spring4 用jdk8,所以需要当前系统安装OpenJDK 8 early access build 100 or later,点击链接可以下载.安装后还需要确认JAVA

Gradle 1.12 翻译——第九章 Groovy高速入口

由于时间.没办法,做笔记和翻译的同时,大约Gradle用户指南.本博客不再做相关的注意事项.而仅仅翻译和本出版物中未翻译章节. 有关其他章节翻译请注意Github该项目:https://github.com/msdx/gradledoc/tree/1.12,訪问:http://gradledoc.qiniudn.com/1.12/userguide/userguide.html 本文原创.转载请注明出处:http://blog.csdn.net/maosidiaoxian/article/det

即时编译和打包您的 Groovy 脚本(转)

在本文中将会涉及到: 使用 CliBuilder 来实现对命令行选项的支持,脚本执行时所需要的参数将通过命令行选项的方式传递. 使用 GroovyClassLoader 加载 Groovy class. 使用 AntBuilder 来构建 Jar 包. 开始之前 关于本文 也许您写了一些有趣或实用的 Groovy 脚本并希望与您的朋友分享,可是您并不想强迫他们安装 Groovy,所以您也许想要做一个小工具让您的朋友们能够用它编译您的 Groovy 脚本并且生成一个可执行的 Jar 包.本文将介绍