ANT Task for JET [message #40637] |
Mon, 21 January 2008 21:02 |
Eclipse User |
|
|
|
Originally posted by: vts1018.hotmail.com
I am trying to use custom ANT tasks to perform JET-to-Java transformation
as specified in this jet tutorial
( http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc/tutorials/jet2/jet_tutorial2.html)
for a sample/default JET project (with main.jet and dump.jet templates)
I have got the ANT environment setup and custom task configured and
running, but am still getting some runtime errors. My build.xml is:
<project default="jetc_multiple_templates">
<property name="eclipse.plugins.dir" location="C:\opt\eclipse\plugins" />
<taskdef name="jetc" classname="ch.paranor.epla.structure.JETCTask">
<classpath>
<pathelement location="jetc-task.jar" />
<fileset dir="${eclipse.plugins.dir}">
<!-- since there are some ClassNotFound errors, temporarely include all
eclipse .jars -->
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
<!-- Translate a bunch of template files at once. -->
<!-- You cannot use the "class" and "package" attributes when using a
fileset. -->
<target name="jetc_multiple_templates">
<mkdir dir="jet-output" />
<jetc destdir="jet-output">
<fileset dir="C:\dev\EclipseWorkspace\Jet2Java\templates\"
includes="*.*jet" />
</jetc>
<javac srcdir="jet-output" destdir="classes" />
</target>
</project>
and the error(s) that I am get are:
C:\dev\EclipseWorkspace\Jet2Java>ant
Buildfile: build.xml
jetc_multiple_templates:
[jetc] Compiling 1 JET template(s) to
C:\dev\EclipseWorkspace\Jet2Java\jet-output
BUILD FAILED
C:\dev\EclipseWorkspace\Jet2Java\build.xml:34:
java.lang.IllegalStateException: Workspace is closed.
Total time: 4 seconds
Has anyone else faced this problem? Is anyone else using this approach to
automate JET to Java transformation?
|
|
|
|
Re: ANT Task for JET [message #41445 is a reply to message #40949] |
Thu, 07 February 2008 13:12 |
Eclipse User |
|
|
|
Originally posted by: christian_sarrasin.ml.com
Hi Paul,
What about running the ANT buildfile straight from within Eclipse
(rightclick on build.xml->RunAs->Ant build), do I still require that Ant
Runner command line?
At the moment I'm getting this:
BUILD FAILED
...\build\build.xml:47: Problem: failed to create task or type
jet.transform
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken
place.
Is there a way around this that will not require me to run a second
Eclipse instance for just this purpose?
I can see lots of questions around this topic (running JET transforms from
Ant); perhaps it would be worthy an entry in your excellent Wiki FAQ
Many thanks for all your help!
Christian
|
|
|
|
Powered by
FUDForum. Page generated in 0.02263 seconds