Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Jet modules
Jet modules [message #14579] Wed, 02 May 2007 08:50 Go to next message
Eclipse User
Originally posted by: ymo.noemail.com

Hi.

I am finally starting to do more advanced stuff however i need the answers
to the below questions:

1) is it possible to run jet2 from ant outside of eclipse in an automated
build for example ?

2) I need to package all my transformations as plugins so the
transformation users do not have to load gazillion projects. Do i have to
use tag lib ? i dont need them specifically for now.

3) related to 2. If i am going to have multiple jet projects. How do you
"chain" the transformation of one transform to another in another plugin ?
I want the user to just have the plugins installed in his work space and
launch one transform. Now this transform has to be able to load its
dependent transformation s
Re: Jet modules [message #14669 is a reply to message #14579] Wed, 02 May 2007 15:32 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Answers to your questions
"ymo" <ymo@noemail.com> wrote in message
news:8ae10725e70fdc64150c9da6f53c92f8$1@www.eclipse.org...
> Hi.
>
> I am finally starting to do more advanced stuff however i need the answers
> to the below questions:
>
> 1) is it possible to run jet2 from ant outside of eclipse in an automated
> build for example ?

There is an ANT task:

<jet.transform transformid="..." source="...workspace relative path to
input..."/>

It requires Eclipse, so you will have to use the Eclpise ant runner:

eclipse -application org.eclipse.ant.core.antRunner ...Ant command-line
arguments...

>
> 2) I need to package all my transformations as plugins so the
> transformation users do not have to load gazillion projects. Do i have to
> use tag lib ? i dont need them specifically for now.
>

Create a feature, and include your JET plug-ins. Deploy the feature to your
target workbenches - update sites work nicely for deploying features.

> 3) related to 2. If i am going to have multiple jet projects. How do you
> "chain" the transformation of one transform to another in another plugin ?
> I want the user to just have the plugins installed in his work space and
> launch one transform. Now this transform has to be able to load its
> dependent transformation s

You need something to act as the 'master' transformation. There are a number
of possibilities:

1) Use a JET transformation, that using <c:invokeTransform> to call the
other transformations. c:invokeTransform is a bit weird - it doesn't load a
model, it merely passes the model already loaded (along with the JET XPath
variables) to the invoked transformation. To make this work, the 'master'
transformation must use c:load to load the model, and the invoked
transformation must know about variable used by c:load.

2) Use the above mentioned ANT task, and an ANT build script.

3) Write some Java code, and invoke JET transformations via
JET2Platform.runTransformOnResource (if the model is in an Eclipse
IResource), runTransformOnObject (if the model is already loaded into
memory), or runTransformOnString (if the model is an XML document in a
string).

I'd like to make option 1 easier, but time is running out on this release.

Let me know which you choose, and how it works out.

Paul
Previous Topic:changing "jet settings" properties creates problem
Next Topic:XSD as XML representation for JET
Goto Forum:
  


Current Time: Fri Oct 24 13:40:47 GMT 2014

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

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