Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-build-dev] How to properly use configs= property


Hi Melvin,

You are on the right track. Having all your plug-ins, whatever the platform they are for, is the best approach. Way back, eclipse had a structure where it had a feature per-platform and everything was duplicated across the features. That turned out to be a nightmare for the release engineering team(we had platform-win32, platform-linux, etc... - you can still see the entries in CVS) and that why we moved to a model were features could specify os/ws/arch to plug-ins such that all the information is centralized.

Then there is another thing to notice which is that PDE Build perverted the original intent of features in order to use them as a grouping mechanism for the build. Why am I saying that? It is because even though your product requirement prevent you to have an overall feature, you can still have some to drive your build input but not show up in the resulting archive (remove the bin.includes from build.properties of the feature).
For example you can have multiple features to capture the functional decomposition of your application:
        Stuff1
        Stuff2
        Stuff3

And then you can have 'build time' features describing the deliverables in which you compose the previous blocks.
        Deliverable 1: includes Stuff1 & Stuff3 & RCP
        Deliverable 2: includes Stuff1 & Stuff2 & Stuff3 & RCP
        etc...

About the configs property:
This is used to control the platforms for which you want to build your product. For each config in the list you will have a corresponding resulting zip containing the generic parts and the platform specific parts for the platform you picked. The callbacks are here to give opportunities to pick the name of the archive and do other tweaks.
If the download you want to produce is truly platform neutral (for example GEF, EMF) then you just need to build for *, *, *.
If you want to produce one archive for windows and one for the mac, then you specify "win32, win32, x86 & macos, carbon, ppc".
The values specified in the config acts as filters on the content of the feature.xml so that only the proper content is selected.

You are encountering problems with the build.update tasks because they are no longer maintained. And they are no longer maintained because they could no longer satisfy all of our needs in terms of the flexibility required to produce the build and we maintained them for pseudo backward compatibility but I believe they are the source of much confusion. So in short don't use them. Sorry.

So to summarize: you can have overall features, only use *,*,* for truly platform independent download and don't call the build.update.jars.

PaScaL



Mark_Melvin@xxxxxxxx
Sent by: pde-build-dev-bounces@xxxxxxxxxxx

12/01/2005 04:03 PM

Please respond to
"Eclipse PDE Build developers list."

To
pde-build-dev@xxxxxxxxxxx
cc
Subject
[pde-build-dev] How to properly use configs= property






Hi Everyone,


I have been using PDE build to build an Eclipse-based product for a couple years, and we are now getting into multi-architecture builds.  I have always had *issues* with this before, but a quick hack a couple years ago was enough to keep me happy.  That is no longer good enough and I would like to figure this out once and for all.  I've spent most of the day looking at the features and build scripts in the Eclipse CVS repository and frankly I am no further ahead.  What I am trying to do is quite simple, so I'll try to explain it in the hopes that someone can help me out.


We have a product made up of 11 features.  We do not have a single, top-level feature containing all of these (like Eclipse has with the SDK), and I do not have the option to go to this hierarchy, so...I have 11 features.  Of these 11 features, a couple have platform-specific plugins and fragments.  So, in the grand scheme of things, my features are all platform-neutral except for a few.  Let's simplify this down to 2 features then, 1 that is good for all platforms (feature1) and one that is platform specific (feature2).  Currently, let's say I *just* want to build a win32 version of my platform.  


Now, my features are not declared to be platform specific in any way (which is the way Eclipse does it, it appears), but the platform-specific feature contains a win32 version of a plugin and a linux version of a plugin, that are each declared platform-specific as required.  So, I assume building the feature will do the right thing depending on what configuration I am building.


In my customTargets.xml I have the following:


<target name="allElements">

       <!-- Generic feature -->

       <ant antfile="${genericTargets}" target="${target}" >

                 <property name="type" value="feature" />

                 <property name="id" value="com.amis.feature1" />

         </ant>


       <!-- Platform-specific feature -->

       <ant antfile="${genericTargets}" target="${target}" >

                 <property name="type" value="feature" />

                 <property name="id" value="com.amis.feature2" />

         </ant>

</target>


<!-- Generic feature -->

<target name="assemble.com.amis.feature1">

   <property name="archiveName" value="amis-feature1-${buildId}.zip"/>

       <ant antfile="${assembleScriptName}"/>

</target>


<!-- Platform-specific feature -->

<target name="assemble.com.amis.feature2.win32.win32.x86">

   <property name="archiveName" value="amis-feature2-win32-${buildId}.zip"/>

       <ant antfile="${assembleScriptName}"/>

</target>



OK, fine.  I *just* want to build a win32 version of my platform so I run my build with -Dconfigs=win32,win32,x86 and the build makes it to the assemble stage and fails with the error:


C:\Temp\eclipse\assemble.com.amis.feature1.all.xml:7: The following error occurred while executing this line:

Target `assemble.com.amis.feature1.win32.win32.x86' does not exist in this project.


So, apparently the assemble targets must match the configs property...not reflect what the feature itself supports.  OK, well I don't understand why would I want to build a "win32" version of a completely platform-neutral plugin.  Alright, so I go ahead and change my assemble targets to be:


<target name="assemble.com.amis.feature1.win32.win32.x86">

   <property name="archiveName" value="amis-feature1-win32-${buildId}.zip"/>

       <ant antfile="${assembleScriptName}"/>

</target>


<!-- Platform-specific feature -->

<target name="assemble.com.amis.feature2.win32.win32.x86">

   <property name="archiveName" value="amis-feature2-win32-${buildId}.zip"/>

       <ant antfile="${assembleScriptName}"/>

</target>


I run the build again with configs=win32,win32,x86 and the build makes it all the way through to my post-build step where if fails when generating the update site (my code) with the following error:


C:\Temp\eclipse\features\com.amis.feature1\build.xml:74: The following error occurred while executing this line:

Target `rootFiles*_*_*' does not exist in this project.


OK, now hang on a minute.  Why is it building an update site using *_*_*, when it is supposed to only be doing win32,win32,x86??  My Ant call that creates the update site is as follows:


   <antcall target="allElements">

       <param name="genericTargets" value="${customTargets}"/>

       <param name="target" value="updateSiteExport"/>

       <param name="updateSiteExport.outputDir" value="${updateSite.dir}" />

   </antcall>


where updateSiteExport is:


<target name="updateSiteExport">

   <mkdir dir="${updateSiteExport.outputDir}"/>

   <mkdir dir="${updateSiteExport.outputDir}/features"/>

   <mkdir dir="${updateSiteExport.outputDir}/plugins"/>


   <!-- Build and stage the jars for the site -->

   <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar">

       <property name="feature.destination" value="${updateSiteExport.outputDir}/features"/>

       <property name="plugin.destination" value="${updateSiteExport.outputDir}/plugins"/>

   </ant>

</target>


It looks like everything is building properly.  Why is it failing on the update site?  FWIW, the hack I have had in place for years is to basically build both the *,*,* AND win32,win32,x86 configurations, adding BOTH assemble targets for each feature to customTargets.xml - but this is just dumb.


I guess a main question I am left with is what the heck is *,*,* ever used for?  It looks like that is what you would want to use for features that are not platform-specific, but how do you NOT use it for the platform-specific features (if that makes any sense at all...).


Thanks for any help,

Mark.
_______________________________________________
pde-build-dev mailing list
pde-build-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-build-dev


Back to the top