Develop a grails project in eclipse

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.