This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Steps to reproduce (NB 6.5 RC2 used): 1) Create directory c:/tmp/groovyt, add simple GroovyTest.groovy file into this directory. Content of the file: class GroovyTest { static void main(String[] args) { println "GroovyTest" } } 2) Start NB 6.5 RC2 3) create new java project (Java Application) named "groovyt", uncheck "Create Main Class", press Finish 4) Select Project properties, go to Build/Groovy, check "Enable Groovy" 5) Select Project properties, go to Sources , remove default "src" entry, press "add Folder", select (add) c:/tmp/groovyt 6) Clean and Build project -> error occurs telling that srcdir does not exist: "C:\...\groovy-build.xml:16: srcdir "C:\...\groovyt\${src.dir}" does not exist!" (Note: I had replaced the full path with "...") In case groovy sources are placed into default src directory, program can be compiled and run correctly.
It also doesn't work with multiple source directories, for example a source directory for Java and one for groovy code. The issue is that groovy-build.xml is not generated correctly: the javac and depend macros just refer to the default source directory, not to the ones set up int the project properties. A simple work around is to copy the 'srcdir' attribute from the javac and depend macros in build-impl.xml over to groovy-build.xml.
*** Issue 159250 has been marked as a duplicate of this issue. ***
Created attachment 78379 [details] patch that will fix the issue
Fixed in web-main 7d0d716feac6.
Integrated into 'main-golden', will be available in build *200903210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7d0d716feac6 User: phejl@netbeans.org Log: #152158 Cannot build/run groovy script/application if sources anre nor in default src directory
*** Issue 162317 has been marked as a duplicate of this issue. ***