ANT Task for JET [message #40637] |
Mon, 21 January 2008 16: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 #41496 is a reply to message #41445] |
Thu, 07 February 2008 09:12  |
Eclipse User |
|
|
|
Christian,
When running a contributed Ant task within the workspace, you must choose
the option to run in the same JRE, else the Ant task declaration is not
found.
-- Right-click on the build.xml and select "Run As > External Tools..."
-- In the dialog, on the JRE tab, select "Run in same JRE as workspace"
Regards,
Dave Carlson
"Christian Sarrasin" <christian_sarrasin@ml.com> wrote in message
news:ffc15ad63a6cf270b8a304ff22d4868f$1@www.eclipse.org...
> 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?
|
|
|
Powered by
FUDForum. Page generated in 0.05249 seconds