Help Groovy Netbeans RCP Application
Artur Carlos Hertel Sonnenhohl <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Im trying to integrate Groovy into my netbeans platform application, i tried to follow the tutorial from Gj from the link https://blogs.oracle.com/geertjan/entry/running_groovy_on_the_netbeans but this tutorial is very outdated and doesn´t work anymore.
Then i modified the build.xml from my specific module to this:
<import file="nbproject/build-impl.xml"/>
<taskdef name="groovyc"
classpath="ext/groovy-all-2.4.7.jar"
classname="org.codehaus.groovy.ant.Groovyc"/>
<target name="-javac-init" depends="build-init,-javac-init-nbjdk,-javac-init-bootclasspath-prepend,-javac-init-no-bootclasspath-prepend">
<path id="cp">
<pathelement path="${module.classpath}"/>
<pathelement path="${cp.extra}"/>
</path>
<path id="processor.cp">
<pathelement path="${module.processor.classpath}"/>
<pathelement path="${cp.extra}"/>
</path>
<!-- Unlike ${module.classpath}, this does not use publicPackageJarDir, since processors need not be in public packages.
Also needs to include transitive dependencies. -->
<mkdir dir="build/classes"/>
<groovyc srcdir="src" destdir="build/classes/" >
<classpath refid="cp"/>
</groovyc>
</target>
Basically what i have done is overwrited the target "-javac-init" wich is default from the platform, extending it with the groovy compilation.
My groovy classes now are compiling and running, but i think i have some problems in my classpath, first i need to add every module that i need into the dependencies even if the module is already imported by reference (this doesn´t happen just with java), but the main problem is that im trying to use JavaFX into this groovy classes and im having the following error during compilation:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during class generation: java.lang.NoClassDefFoundError: Unable to load class javafx.scene.control.TextField due to missing dependency javafx.scene.control.Control
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Unable to load class javafx.scene.control.TextField due to missing dependency javafx.scene.control.Control
at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1089)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1067)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
Other classes from JavaFX compile fine but this one isn´t compiling, im really dont know what to do. I already tried to create a library wrapper from javafxrt.jar but it doesn´t help at all.
When i create a new netbeans project (not using platform) and use Groovy with JavaFX it works fine but the compilation process is different and the build logic is very complex to understand quickly.
Is someone already using netbeans platform with Groovy and can help me to configure my build.xml in the right way, i think the problem really is with my classpath.
Thanks.
Artur Carlos Hertel Sonnenhohl
Desenvolvimento de Software
Fone: +55 (47) 3276-7549
WEG Drives & Controls Automação Ltda
http://www.weg.net<http://www.weg.net/>
Clique <a href="http://disclaimer.weg.net/" target=_blank>aqui </a> caso você não seja o destinatário deste email, ou desejar conhecer nossa política de privacidade.
Click <a href="http://disclaimer.weg.net/" target=_blank>here </a> if you are not the intended recipient, or in case you want to know our privacy policy.