Develop a grails project in eclipse
1. environment variables:
Configure grails_home. grails_home refers to the root directory of Grail. Use the grails command line to create a project:
Grails create-app
Enter the project name. Assume that grailstest is the project name.
2. Install the groovy-Eclipse plug-in eclipse and use the link method.
3. Import the grails project. If the project is not in the eclipse workspace, select copy projects into workspace"
4. Right-click the grails project and select "Disable groovy compiler generating class files" in the project properties to prevent groovy files from being compiled into class files by eclipse.
5. In the Java build path of the project properties, select libraries and add
Variable, add the grails_home variable, and introduce all jar files in all the folders into the project (you can use the Shift key to select multiple files, the package will be imported automatically. You only need to add the variable.
6. In the building of Java compiler in the project attribute, select enable project specific settings and output the filtered of folder at the bottom.
Resource, the default *. launch, add *,. groovy type (note that the types are separated by commas). This prevents the compiler from copying groovy files to the Web-APP/classes folder.
7. Select General in window preference, where the file of editor
Associations, add the GSP file type, and select the JSP file editor for the association editor.
8. In window preference, select general, content types, and add GSP File Association for JSP type.
9. Select open external tools of run and external tools.
Dialog, as shown in the following configuration, you can enable the grails control command in eclipse.
Location: grails_home/bin/grails. bat
Working directory :$ {workspace_loc:/grailstest}
Arguments: $ {string_prompt}
10. Select Run and open run dialog to run grails projects as Java applications.
Refer:
Http://www.grails.org/Quick+Start
Http://wangcheng.javaeye.com/blog/190201
Http://www.chinagroovy.org/forum/index.php? Topic = 72.0