Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [JET] Running a JET transform in headless mode
[JET] Running a JET transform in headless mode [message #52424] Wed, 29 October 2008 00:01 Go to next message
Tom Hoover is currently offline Tom Hoover
Messages: 3
Registered: July 2009
Junior Member
I need to be able to run several JET transforms in headless mode. What is
the best way to achieve this?

I thought that adding a custom Ant builder to my projects would work, but
those cause some interesting exceptions. After a lot searching, I found
bug 184528. While this fixes the crashes, it only partially fixes the
issue -- while the builds no longer crash, I don't get any report of a
build failure (or any indication of status for that matter). Since this is
for a build system, that doesn't work so well.

I'm sorry if I'm asking a question with an obvious solution, but I'm new
to Eclipse and I'm really scratching my head over this.
Re: [JET] Running a JET transform in headless mode [message #52613 is a reply to message #52424] Wed, 29 October 2008 12:26 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Tom:

JET does come with an ANT task jet.transform that can be used in an ANT
build run with-in Eclipse - either by the external tools UI, or from the
headless ant builder application. Here's the doc:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jet.doc/references/ant/antTasks.xhtml

And, here some doc on using the Eclipse ANT runner:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.user/tasks/antRunner.htm

The basic idea of the Eclipse ant runner is that it is Ant, hosted within
Eclipse, so it is aware of the Workspace, and all the ANT tasks (like
jet.transform) that are bound into eclipse.

Also, that page on antRunner seems to be needlessly complex. You can launch
simply by doing:

eclipse -application org.eclipse.ant.core.antRunner -workspace ... ...the
rest is your standard Ant command line...

Paul
Re: [JET] Running a JET transform in headless mode [message #52665 is a reply to message #52613] Wed, 29 October 2008 13:34 Go to previous messageGo to next message
Tom Hoover is currently offline Tom Hoover
Messages: 3
Registered: July 2009
Junior Member
Paul,

Thanks for the tip. That is sort of what I was doing. Let me clarify. I
have projects in my workspace that have external Ant tasks running. Those
Ant tasks make use of jet.transform. This works fine when developers are
working on their desktops, but I need to have automated builds (with
Cruise Control).

What I did was fire up:

eclipse -application org.eclipse.ant.core.antRunner -data <workspacedir>
-buildfile build.xml

Where build.xml contains an eclipse.incrementalBuild task. This doesn't
work since projects that contain external Ant tasks can't be run in
headless mode. I tried using the org.eclipse.ant.ui.antRunner application
instead, but this causes the builds to fail silently (and Ant reports that
the build succeeded).

Basically, I want a way for these transforms to be run as part of either
my desktop build or my command line build, and I'd like those two builds
to be as close to one another as possible.
Re: [JET] Running a JET transform in headless mode [message #52690 is a reply to message #52665] Wed, 29 October 2008 17:08 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Tom:

I just read bug 184528
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=184528) in detail. It claims
to be fixed in 3.4.

What eclipse (and JET) version are you using?

Paul
Re: [JET] Running a JET transform in headless mode [message #52717 is a reply to message #52690] Wed, 29 October 2008 17:51 Go to previous messageGo to next message
Tom Hoover is currently offline Tom Hoover
Messages: 3
Registered: July 2009
Junior Member
I tried both the one off for 3.2 and I tried 3.4.

org.eclipse.ant.core.antRunner still fails with the crash and
org.eclipse.ant.ui.antRunner reports a build success even when the
external tasks fail. Also, org.eclipse.ant.ui.antRunner provides no
console output (even with -consolelog). To me, that still seems broken. I
realize that this isn't a JET specific issue -- but rather its that
external build tasks are pretty broken.

Is there a better JET specific way to do this besides creating my own
custom nature and builder? If there's a generic way, I'd be more than
happy with that, too. :)
Re: [JET] Running a JET transform in headless mode [message #52771 is a reply to message #52717] Wed, 29 October 2008 20:10 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Tom:

If Ant isn't working, then I can't think of any route other than a custom
nature/builder.

But, if you go that route, it might be a very useful think to have in JET
itself. If you submit a bugzilla, I'd be willing to help figure out how to
create one, and, ultimately, put it into JET.

Paul
Previous Topic:AssertionFailed Exception with templates containing scriptles
Next Topic:[Announce] M2T XPAND 0.7.0 I200810271227 is available
Goto Forum:
  


Current Time: Mon Sep 22 18:30:09 GMT 2014

Powered by FUDForum. Page generated in 0.03244 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software