Last updated by admin 4 years ago
IDE ??
Eclipse?? ??
Grails ???? ????
Grails ???? Eclipse ???? ? ????? ??? ??????. Eclipse? ??? ?????(Package Explorer)?? ??? ??? ? ?? "Import"? ???? "Existing project into Workspace"? ??? ? "Browse"?? ????? ??? ?????."Finish"? ?? ? "Ok"? ??? ????? ?????.Eclipse ??? ??? GRAILS_HOME ? ???? Grails ?? ??? ?????? ??? ??? ?????. ??? ??? ????? Windows -> Preferences… -> Java -> Build path -> Classpath Variables -> New ? ?????.??, ?????? JSP? ???? ??? JDK? tools.jar ?????? ???? ?????? ???? ???. ??? ??? jetty?? ??? ??? ??? ????. ??? ??? ?? ???? ?????: http://nuin.blogspot.com/2005/05/launch-jetty-from-eclipse-solving.html
Grails ?????? ????
Grails? ?? ???? ?? Eclipse ?? ??(run configuration)? ???? ??????. ????? ????? "Run" ???? ???? "Run" ????? ?? "Java Application" ???? ???? ???? ??? ??? ?????. ??? "Run"? ???? Grails ??????? Eclipse ???? ???? Eclipse ???? ??? ??? ?? ??? ???? ??? ???.?? ??? ?? ??? ?????:org.mortbay.util.MultiException[java.io.FileNotFoundException: {yourpath}/tmp/war]
at org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
at org.mortbay.util.Container.start(Container.java:72)
at grails.util.GrailsMain.main(GrailsMain.java:67)grails dev packageEclipse?? ?? ?????
?? Groovy Eclipse ????? ?????? ??? ?? ???? ?? ???? ?????.- ??? ????? Groovy ??? ???({{BookController.groovy}}?? ???) ??? ?? ???(break point)? ?????.
- ??? Grails ??????? ???? ?? ??? ???? "Debug" ??? ?? ??? ??? ??????? ?????.
- ????? ??? ?? ??? ?????.
??? ??? ?? ????
"grails"? "External Tool"? ???? ??? ??? ?? ?? ??? ? ????. ?????? ??? ?????:- "Run > External Tools > External Tools..." ? ??
- "Grails"? ??
- "grails" ?? "grails.bat"? ??? ?????
- "Working directory"? "${project_loc}" ? ?????
- "Arguments"? "${string_prompt}"? ?????
- "Refresh" ??? "project containing the selected resource"? ??????? ?????
- "Common" ??? "Display in favorites menu"? ?????.
- "External Tools"? ???? ???? "Grails"? ?????
- ????? "create-domain-class"? ?????
- ?? ???? ????? ?????? ?????.
- grails-app/domain ? ??? ???? ???????.
?? ??
*.groovy ??? ??? ? ?? ??? ?? ???? ???:An internal error occurred during: "Building workspace". BUG! exception in phase 'conversion' in source unit '...' Error: duplicate class declaration for name: … and class: org.codehaus.groovy.ast.ClassNode@...[name:...]
- ??? ??????? ??? ??? ?? "Properties..." ?????? ???.
- "Builders" ? ??? ? "Groovy Builder"? ???? ??? ?????.
- "Java Compiler/Building" ? ??? ? "Enable project specific settings" ? ?????.
- "Filtered Resources" ??? "*.groovy"? ???? "*.groovy" ??? ?? ????(output directory)? ???? ??? ???. ?? ???? ";"? ??? ","?? ?? ?????.
- ??? ??? ? ?????? ????.
- ????? clean ? ?, ?? ????? "*.groovy" ??? ??? ?????.



