|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Netbeans 6.7.1 - Unable to run fileI created a groovy/grails app project in Netbeans 6.7.1. The "Run File" menu option is disabled, both for groovy files and for java files. I have tried creating groovy scripts under both Groovy Source Package and Java Source Package, in hopes that Netbeans would "turn on" groovy as it does if you're in a java project. No luck. This is a groovy project and I can't run a groovy file - what gives? Anyone know what "obvious" thing I have to do to run a groovy file?
|
|
|
Re: Netbeans 6.7.1 - Unable to run fileI'm not sure I understand the question. The Grails project provides a
way how to interact with Grails framework. I'm not sure how would you run single file in Grails. If you want to run a Grails script it should be possible from Run Grails Command... menu. And I agree this would make sense (for script) to allow it in context menu as well. I this what you meant? Thanks, P. On 11/03/2009 01:57 PM, j philoon wrote: > > I created a groovy/grails app project in Netbeans 6.7.1. The "Run File" menu > option is disabled, both for groovy files and for java files. I have tried > creating groovy scripts under both Groovy Source Package and Java Source > Package, in hopes that Netbeans would "turn on" groovy as it does if you're > in a java project. No luck. This is a groovy project and I can't run a > groovy file - what gives? Anyone know what "obvious" thing I have to do to > run a groovy file? --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Netbeans 6.7.1 - Unable to run fileHi,
running a controller all by itself usually does not make much sense. However, also in the scripts folder "run file" is not a menu item. No, this is not a "groovy" project, it is a "grails" project. This is for creating web applications. If you want to write a desktop JAVA app, then create a normal JAVA app to which you can add groovy sources without any problem (to my experience). Cheers, Wolfgang On Tue, Nov 3, 2009 at 1:57 PM, j philoon <jphiloon@...> wrote:
|
|
|
Re: Netbeans 6.7.1 - Unable to run fileI think what the original poster was referring to was the fact that groovy and java classes placed in the Groovy Source Packages, or Java Source Packages directories are not runnable via the "Run File" menu item.
AFAIK these directories were intended for classes and business logic that did not logically fit in a Controller or Service. If your goal is simply to run a piece of code in order to test it, then the best bet is to create a unit test for it (or at least a unit test stub to call your code). You can then either execute all unit tests, or simply execute the test you're interested in using the "Run Grails Comand > test-app" and enter the fully qualified name of the test in the Parameters field. If all you want to do is run Groovy code snippets, you can either create a Java/Groovy project (using the Samples > Groovy > Groovy-Java Demo). Or use Groovy's console (not part of NetBeans) to execute code. HTH, Mark On Tue, Nov 3, 2009 at 6:12 AM, Müller, Wolfgang <muellerwhh@...> wrote: Hi, -- Mark Fortner blog: http://feeds.feedburner.com/jroller/ideafactory |
|
|
Re: Netbeans 6.7.1 - Unable to run fileYes, thank you Petr. Where I was eventually headed with my question is best stated by Dave Fuller in wiki remarks to grails scripting (http://docs.codehaus.org/display/GRAILS/Command+Line+Scripting):
"Shouldn't there be a way to execute scripts through the shell environment so that it is relatively simple to, say, import/export/manipulate data in the database? It is far too much of a pain to create a Gant script, get the necessary includes and depends and calls, find the right beans from application context and then start doing real, actual work when everything you should need for this sort of task is already present in the shell environment. However, at present there seems to be no such mechanism available." Perhaps there is a way to do this at this point in time?
|
| Free embeddable forum powered by Nabble | Forum Help |