Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Compile JET templates during a Buckminster PDE Build
Compile JET templates during a Buckminster PDE Build [message #555220] Wed, 25 August 2010 22:07 Go to next message
Chris Eagan is currently offline Chris EaganFriend
Messages: 15
Registered: July 2009
Junior Member
The project I am working on contains JET templates and we are using a Buckminster build to build the project. There is a page on the Eclipse Wiki explaining how to use the jet.compile task to compile these files at build time. A bug exists in Bugzilla regarding this issue as well.

http://wiki.eclipse.org/JET_FAQ_How_to_I_compile_JET_templat es_in_a_headless_build
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210447

The downside to this method is that the Ant task requires that the plug-in be in a workspace and that the internal eclipse Ant runner be used for the build. Both of these issues seem to be satisfied by the use of Buckminster. The wiki page describes the use of the customBuildCallbacks feature in PDE, which inserts the compilation of the JET files into the build process. I have set up a plug-in as the wiki page describes, but Buckminster doesn't appear to be taking my Callbacks file into account. Is there something special about how Buckminster runs the build process where these custom build additions are not taken into account?

I attempted to create a cspex file thinking that I could maybe inject the compilation ant task that way, but I'm not sure how to insert an action before another action takes place. Essentially, I would need my action to become a dependency of an existing, built-in action.

Our current solution is really ugly. We commit the generated java files to SVN instead of letting JET compile them at the time of the build.
Re: Compile JET templates during a Buckminster PDE Build [message #555286 is a reply to message #555220] Thu, 26 August 2010 08:31 Go to previous message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Chris

Am 26.08.2010 00:07, schrieb Chris Eagan:
> I attempted to create a cspex file thinking that I could maybe inject
> the compilation ant task that way, but I'm not sure how to insert an
> action before another action takes place. Essentially, I would need my
> action to become a dependency of an existing, built-in action.

You have 2 options here:
1. Name your action buckminster.prebind
That way buckminster will execute your action automatically after the
component was resolved and before it is bound to the workspace

2. You can (like you said) alter an action. Here's an example on how to
do that:

<actions>
<public name="compileJet" actor="ant">
<actorProperties>
<property key="buildFile" value="build/compileJet.xml"/>
<property key="targets" value="compile"/>
</actorProperties>
</public>
</actions>

....

<alterActions>
<private name="bundle.jar"> <!-- or whatever you want to alter -->
<prerequisites >
<attribute name="compileJet"/>
</prerequisites>
</private>
</alterActions>


You can also combine these two methods, i.e. have the action
automatically executed before binding the project to the workspace to
get rid of compilation errors (makes it easier for developers to set up
their workspace without doing anything manually) and also invoke that
action before building an artifact by adding it as a prerequisite.

Hope that helps.

Best regards,
Johannes
Previous Topic:When does (headless) buckminster refresh resources?
Next Topic:Updating workspace
Goto Forum:
  


Current Time: Thu Apr 25 01:11:29 GMT 2024

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

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

Back to the top