Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Headless build of several features
Headless build of several features [message #25527] Tue, 07 October 2008 09:23 Go to next message
Eclipse UserFriend
Dear all,
I'm pretty new in Eclipse features and plugins headless build.

I'm writing a build system for my company, it is aimed to build all of our
projects (all Eclipse based) and must be headless.

My problems come from I have to manage several JDK versions (one project
is based on 1.4 another could be 1.6), several Eclipse versions (the
oldest is 3.2).

This part works pretty well...on my prototype.

My biggest problem deals with building project with several features,
unfortunately the available documentation is about building one feature
and only one.

On my example project, I customize only the build.properties and the
allElements.xml if this is sufficient to build a multi-features project?
And, if yes, what are the rules to customize this allElements.xml to build
such a project.

Thanks in advance for your help.

romu
Re: Headless build of several features [message #25567 is a reply to message #25527] Tue, 07 October 2008 10:48 Go to previous messageGo to next message
Eclipse UserFriend
More information, I've just achieved a headless build of a multi-feature
project by customising the allElements.xml file which look like:


<target name="allElementsDelegator">
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="com.company.feature1" />
</ant>
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="com.company.feature2" />
</ant>
</target>

<target name="assemble.com.company.feature1">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

<target name="assemble.com.company.feature2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

Is this correct? By correct I mean in accordance with the PDE best
practices?

Thanks.

romu
Re: Headless build of several features [message #25643 is a reply to message #25567] Tue, 07 October 2008 11:17 Go to previous messageGo to next message
Eclipse UserFriend
That should work, however, you may find it more manageable to simply
have a builder-feature. Features will only be included in the final
result if they have a "bin.includes" property in their build.properties
file.

This means that you can have one top level builder feature that includes
all your com.company.feature1, com.company.feature2, etc.

-Andrew

romu wrote:
> More information, I've just achieved a headless build of a multi-feature
> project by customising the allElements.xml file which look like:
>
>
> <target name="allElementsDelegator">
> <ant antfile="${genericTargets}" target="${target}">
> <property name="type" value="feature" />
> <property name="id" value="com.company.feature1" />
> </ant>
> <ant antfile="${genericTargets}" target="${target}">
> <property name="type" value="feature" />
> <property name="id" value="com.company.feature2" />
> </ant>
> </target>
>
> <target name="assemble.com.company.feature1">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> <target name="assemble.com.company.feature2">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> Is this correct? By correct I mean in accordance with the PDE best
> practices?
>
> Thanks.
>
> romu
>
Re: Headless build of several features [message #25728 is a reply to message #25643] Wed, 08 October 2008 04:51 Go to previous message
Eclipse UserFriend
Thanks for your advice Andrew.

Indeed it works with a builder feature, but I have a clear packaging
problem in that way. The output is a single zip containing all features
and plugins. This is not acceptable to me.

Hacking the allElements.xml file seems to be an easy way to achieve my
goals, but if you think the builder is a more "state of art" solution,
don't hesitate to give me some directions to fix my packaging issues. The
documentation is pretty...unsufficient.

Thanks
Re: Headless build of several features [message #582408 is a reply to message #25527] Tue, 07 October 2008 10:48 Go to previous message
Eclipse UserFriend
More information, I've just achieved a headless build of a multi-feature
project by customising the allElements.xml file which look like:


<target name="allElementsDelegator">
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="com.company.feature1" />
</ant>
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="com.company.feature2" />
</ant>
</target>

<target name="assemble.com.company.feature1">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

<target name="assemble.com.company.feature2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

Is this correct? By correct I mean in accordance with the PDE best
practices?

Thanks.

romu
Re: Headless build of several features [message #582434 is a reply to message #25567] Tue, 07 October 2008 11:17 Go to previous message
Eclipse UserFriend
That should work, however, you may find it more manageable to simply
have a builder-feature. Features will only be included in the final
result if they have a "bin.includes" property in their build.properties
file.

This means that you can have one top level builder feature that includes
all your com.company.feature1, com.company.feature2, etc.

-Andrew

romu wrote:
> More information, I've just achieved a headless build of a multi-feature
> project by customising the allElements.xml file which look like:
>
>
> <target name="allElementsDelegator">
> <ant antfile="${genericTargets}" target="${target}">
> <property name="type" value="feature" />
> <property name="id" value="com.company.feature1" />
> </ant>
> <ant antfile="${genericTargets}" target="${target}">
> <property name="type" value="feature" />
> <property name="id" value="com.company.feature2" />
> </ant>
> </target>
>
> <target name="assemble.com.company.feature1">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> <target name="assemble.com.company.feature2">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> Is this correct? By correct I mean in accordance with the PDE best
> practices?
>
> Thanks.
>
> romu
>
Re: Headless build of several features [message #582462 is a reply to message #25643] Wed, 08 October 2008 04:51 Go to previous message
Eclipse UserFriend
Thanks for your advice Andrew.

Indeed it works with a builder feature, but I have a clear packaging
problem in that way. The output is a single zip containing all features
and plugins. This is not acceptable to me.

Hacking the allElements.xml file seems to be an easy way to achieve my
goals, but if you think the builder is a more "state of art" solution,
don't hesitate to give me some directions to fix my packaging issues. The
documentation is pretty...unsufficient.

Thanks
Previous Topic:PDE Build Bug with jar signing for eclipse folder plugins?
Next Topic:PDE Build Bug with jar signing for eclipse folder plugins?
Goto Forum:
  


Current Time: Fri May 09 20:28:08 EDT 2025

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

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

Back to the top