Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Howto invoke an antfile through transformation?
Howto invoke an antfile through transformation? [message #31346] Mon, 20 August 2007 11:12 Go to next message
Eclipse UserFriend
Originally posted by: Thalya79.web.de

Hello everyone!

Is it possible to pass any arguments to the transformation to invoke any
ant build-files during/after transformation?

I generate several files which after generating are used by an antfile. It
would be great, if I could invoke the ant automatically within the
jet-transformation.

I hope anyone can understand what I mean. For a java-project for example
it is possible to define arguments in the run configurations - I hope
something like that ist also possible for jet!

Thank you for any help.
Re: Howto invoke an antfile through transformation? [message #31438 is a reply to message #31346] Mon, 27 August 2007 13:29 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Yasmin:

There isn't a JET tag to invoke ant, but it would certainly be possible to
write one. If you decide to go that route, the only trick would be that JET
defers all its IO until all templates have executed, the ant tag would have
to defer its actions, too.

The other possibility is to invoke your JET transformation from ANT, and
then invoke the other ANT scripts. Personally, I think this would be easier.
JET includes an ANT task for invoking a transformation. The only catch is
that the ANT build must be invoked with the Eclipse ant runner. The JET ant
task looks like:

<jet.transform transformid="my.transform.id"
resource="myProject/path-to-input-file"/>

You can use Eclipse as an ant runner by using the Eclipse ant runner
application:

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

Paul

"Yasmin Stoesser" <Thalya79@web.de> wrote in message
news:0825fd1bf0a4131145c55cbe25f4ccd9$1@www.eclipse.org...
> Hello everyone!
>
> Is it possible to pass any arguments to the transformation to invoke any
> ant build-files during/after transformation?
>
> I generate several files which after generating are used by an antfile. It
> would be great, if I could invoke the ant automatically within the
> jet-transformation.
>
> I hope anyone can understand what I mean. For a java-project for example
> it is possible to define arguments in the run configurations - I hope
> something like that ist also possible for jet!
>
> Thank you for any help.
>
Re: Howto invoke an antfile through transformation? [message #31711 is a reply to message #31438] Tue, 28 August 2007 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thalya79.web.de

Thank you, Paul.

My first idea was to write a ant-file which would start both ant-tasks -
for the jet-transformation and for the other.
But I wasn't able to get the jet-ant-task running, so I tried to do it
another way.

But I guess, I should try it the other way again.

Paul Elder wrote:

> Yasmin:

> There isn't a JET tag to invoke ant, but it would certainly be possible to
> write one. If you decide to go that route, the only trick would be that JET
> defers all its IO until all templates have executed, the ant tag would have
> to defer its actions, too.

> The other possibility is to invoke your JET transformation from ANT, and
> then invoke the other ANT scripts. Personally, I think this would be easier.
> JET includes an ANT task for invoking a transformation. The only catch is
> that the ANT build must be invoked with the Eclipse ant runner. The JET ant
> task looks like:

> <jet.transform transformid="my.transform.id"
> resource="myProject/path-to-input-file"/>

> You can use Eclipse as an ant runner by using the Eclipse ant runner
> application:

> eclipse -application org.eclipse.ant.core.antRunner ...ant command line..

> Paul

> "Yasmin Stoesser" <Thalya79@web.de> wrote in message
> news:0825fd1bf0a4131145c55cbe25f4ccd9$1@www.eclipse.org...
>> Hello everyone!
>>
>> Is it possible to pass any arguments to the transformation to invoke any
>> ant build-files during/after transformation?
>>
>> I generate several files which after generating are used by an antfile. It
>> would be great, if I could invoke the ant automatically within the
>> jet-transformation.
>>
>> I hope anyone can understand what I mean. For a java-project for example
>> it is possible to define arguments in the run configurations - I hope
>> something like that ist also possible for jet!
>>
>> Thank you for any help.
>>
Re: Howto invoke an antfile through transformation? [message #31815 is a reply to message #31438] Wed, 29 August 2007 08:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thalya79.web.de

Paul:

Can you tell me which .jar-libs I need to invoke the antbuild?

I get several Errors and I've got the feeling, it won't work.

So far I use jetant.jar, org.eclipse.jet.jar, ant.jar and antlr.jar

Any thoughts?

Thank you,
Yasmin
Re: Howto invoke an antfile through transformation? [message #31956 is a reply to message #31815] Wed, 29 August 2007 13:04 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Yasmin:

You should not need to play with jar-libs at all, but you must use eclipse
as your ant runner...

eclipse -data workspace-location -application org.eclipse.ant.core.antRunner
....ant command line...

Paul

"Yasmin Stoesser" <Thalya79@web.de> wrote in message
news:97f8976f38161d937e4027596cfd25bc$1@www.eclipse.org...
> Paul:
>
> Can you tell me which .jar-libs I need to invoke the antbuild?
>
> I get several Errors and I've got the feeling, it won't work.
>
> So far I use jetant.jar, org.eclipse.jet.jar, ant.jar and antlr.jar
>
> Any thoughts?
>
> Thank you,
> Yasmin
>
Re: Howto invoke an antfile through transformation? [message #32095 is a reply to message #31956] Thu, 30 August 2007 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thalya79.web.de

ok, I think I begin to understand.

Is it possible to use the pde-build?

Paul Elder wrote:

> Yasmin:

> You should not need to play with jar-libs at all, but you must use eclipse
> as your ant runner...

> eclipse -data workspace-location -application org.eclipse.ant.core.antRunner
> ....ant command line...

> Paul
Re: Howto invoke an antfile through transformation? [message #32235 is a reply to message #32095] Thu, 30 August 2007 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thalya79.web.de

Sorry to ask such silly questions...

Please forget the PDE-question.

If I start the buildfile like you suggested, I get the Error "could not
find transformation with id..."

Now my question is where the transformId is set. In the plugin.xml? I
can't find it.
If I start the generator within eclipse, the Id in the run configurations
is the same I used in the build-file.
Re: Howto invoke an antfile through transformation? [message #32303 is a reply to message #32235] Fri, 31 August 2007 10:42 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
It is the plugin-id, which you'll find in on the General tab of the plug-in
manifest editor, or in MANIFEST.MF, as Bundle-SymbolicName

The JET project will either have to be in the workspace your headless build
is running on, or it will have to be Exported via the Deployable plug-ins
and fragments wizard, and then placed in the plugins directory of you
Eclipse installation.

Paul

"Yasmin Stoesser" <Thalya79@web.de> wrote in message
news:823280912ff910b6a34e0f8ea035f076$1@www.eclipse.org...
> Sorry to ask such silly questions...
>
> Please forget the PDE-question.
>
> If I start the buildfile like you suggested, I get the Error "could not
> find transformation with id..."
>
> Now my question is where the transformId is set. In the plugin.xml? I
> can't find it.
> If I start the generator within eclipse, the Id in the run configurations
> is the same I used in the build-file.
>
Previous Topic:UML2 Sequence Diagrams
Next Topic:JET2 editor plugin ?
Goto Forum:
  


Current Time: Thu Apr 25 01:27:23 GMT 2024

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

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

Back to the top