Community
Participate
Working Groups
This request is split off from bug 49592. For a fully automatic build and test cycle we would like the ability to build and re-package the rcp application through an ant script. This could be done by having the wizard output an ant script, or maybe by defining some export specific ant tasks.
Perhaps this should be phrased more in terms of what is missing from PDE Build rather than PDE UI. Under the covers the "real" work (sorry Wassim) is carried out by PDE build. That is entirely done in terms of Ant tasks etc. I regularly use this and the Eclipse releng builds are done entirely this way. So what is missing?
To build features and plugins, you can use the ant tasks "pde.exportfeatures" and "pde.exportplugins". However, they are running asychronously (as reported in bug 58413). The rcp export wizard should 1) provide a task like pde.exportrcpapplication and 2) allow to run this task sychronously Do the releng tools provide this in a convenient way already?
Added Frank, since we were discussing this issue recently.
>Under the covers the "real" work (sorry Wassim) is carried out by PDE build. Ouch, that hurt. Luckily, I'm thick-skinned. PDE/UI certainly should/would not want to be in the business in duplicating what PDE/Build does. That is what I made clear in bug 58413. I guess the appeal of ant tasks such as pde.exportFeatures and pde.exportPlugins is the simplicity. The unattractive part is the fact that they are asynchronous. Making them synchronous without increasing the complexity would be difficult as explained in bug 58413.
resolving as dup of bug 58413, as implementation-wise, it all boils down to pde.exportFeatures being synchronous and headless. *** This bug has been marked as a duplicate of 58413 ***
This is not a duplicate. Regardless of whether or not some ant task somewhere is synchronous, the Product Configuration editor in I20050209 currently lists Export as a three step process: 1. Synchronize this configuration with the product's defining plug-in. (whatever that means) 2. Specify the export destination, and 3. Press the Export button. An export button is not automation. Consider two other examples from the UI: If you select File > Export > Jar file, you can Save the description of this JAR in the workspace by giving a path to a .jardesc file. Later you can right-click on the jardesc file and select Open JAR Packager, or Create Jar. This is not really automation either but it's a little closer. If you select File > Export > Deployable plug-ins and fragments, you are given the option Save this export operation as an Ant build script. This script, whatever tasks it refers to I don't care, can theoretically be used later as part of an automated build process. This kind of thing is missing from the Product Configuration story.
I was thinking of providing an action to export a product via the PDE Tools context menu of the .product file itself. That is the best PDE/UI can do. Is that what is being alluded to here?
That would be helpful but doesn't go far enough. I want to be able to run that action (rebuild the deployable package) every time the source code changes and the project rebuilds. I want to also run it from CruiseControl. As far as implementation goes, if the UI provided an option to save whatever 'Export' does as an ant script then I think I could do both these things.
Seems like this is why the bug was closed as a duplicate. Everything you are asking for is reasonable but ultimately boils down to being able to run this function without PDE UI in the picture. No one is arguing with the suggested function, just that it is not as easy as you might think. There is a very significant amount of magic in this area.
Ok, how about if I rephrase the request as follows: For a fully automatic build and test cycle we would like the ability to re-package RCP products after builds or through Cruise Control (most likely via ant). The Product Configuration Editor has an Export button as of I20050209 but it's manual. This request is to expose automated export capabilities through the UI, for example by having an option visible in the editor or on a popup menu to save the export operation as an Ant script (see the Deployable plug-ins and fragments export wizard). Bug 58413 is related but is concerned only with the tasks in the script, while this entry is concerned with how the capability is exposed to the user through the UI. The idea is to make it easier for the user to discover this capability. I've modified the summary as well to clarify things.
I might be obtuse here but say there is a way of saving the script as you outlined. Are you not then going to say that you want bug 58413 address to make the generated script useful? If you are ok with something "just like the deployable wizard" then (correct me if you disagree Wassim) that seems doable. We needn't really even provide the button whatever as the generated script is so trivial an automated build mechanism could likely generate one. What you really want is the task.
yes, if what is needed is something similar to the Ant task generation of the export wizard, then it is doable.
I don't think that this should be in the domain of PDE UI. Automated builds are already possible with PDE Build. Wouldn't it be better if PDE UI would create some tools for creating the Ant scripts necessary for an automated build using PDE build? I tried to replicate the product export feature using PDE Build but this is not possible because of the hidden magic, which is done in ProductExportJob to collect all product features and the launchers.
*** Bug 111656 has been marked as a duplicate of this bug. ***
*** Bug 96350 has been marked as a duplicate of this bug. ***
Created attachment 33681 [details] patch that automates the product export Hi, I want to propose one solution. I've created an eclipse product that allows the build automation. It's an application (PlatformRunnable) that takes some command line arguments and invoke the ProductExport. To test the patch I tried the 4 products I have. The patch has two applications: 1) does the import of projects to workspace 2) does the product export The first one is a support application, so one can fetch projects from CVS, SVN, etc and put into a workspace folder. Later it needs to be imported into eclipse workspace. The import application does not copy the files neither fetch from CVS, so the files must be placed in the workspace folder by another ant task. The second application just takes the workspace and build. Some examples 1)---------PROJECT IMPORT INTO WORKSPACE C:\eclipse>java -jar startup.jar -product org.eclipse.automation.importProject -data "C:\Documents and Settings\ebengtso\My Documents\workspace" JunitForPDE ============================================================================= Automation of project import. Imports a project into workspace. ============================================================================= Importing project JunitForPDE ... Project JunitForPDE imported. 2) --------PRODUCT EXPORT C:\eclipse>java -jar startup.jar -product org.eclipse.automation.productExport -data "C:\Documents and Settings\ebengtso\My Documents\workspace" com.wu.agentsv c.agentserver /agentserver.product c:\test\ false ============================================================================= Automation of product export. Exports a product to a directory. ============================================================================= Workspace location:C:/Documents and Settings/ebengtso/My Documents/workspace Job started . 0 out of 10 . . Job done in 109861 ms. Product exported. ----------- TO USE ----------- 1. make a new install of eclipse sdk 1. place the plugin under eclipse/plugins 2. fetch the projects from CVS and place under like eclipse/workspace 3. run the importProject application to import the projects (one run per project) 4. run the productExport application IMPORT PROJECT -------------- -product org.eclipse.automation.importProject -data <workspaceAbsolutePath> <projectPathRelativeToWorkspace> PRODUCT EXPORT -------------- -product org.eclipse.automation.productExport -data <workspaceAbsolutePath> <productProjectPathRelativeToWorkspace> <productFilePathRelativeToProject> <exportFolderAbsolutePath> <export sources (true|false)>
thanks Erik, but the proposed solution is built on top of pde/ui which is not what people here want.
(In reply to comment #17) > thanks Erik, but the proposed solution is built on top of pde/ui which is not > what people here want. > The goal here is to automate the build to end users, and that's reachable with this solution. You just need to create ant scripts to invoke the Main.class passing a couple of arguments, and you are done. There is no visible UI. You may want to have it designed differently, but that's another story.
I like the idea and did something similar. I wrote Jobs to do the checkout and the build and the export. This build was running at one of my clients for several weeks until they decided to go for the full PDE build. Even though your approach is not what the PDE guys want, this solution is really sufficient for most other users. Please don't stop. Maybe you can create a small sourceforge project for it.
The proposed solution seems to be very similar to something that I'm working on - an easy way to build and package Eclipse plugins. Details can be found in this post to the fedora-java mailing list: https://www.redhat.com/archives/fedora-devel-java-list/2006-January/msg00060.html The important thing to note with what I've done so far is that it is a proof-of-concept and there are definitely some problems with the implementation. My initial plan was to talk to other Linux distributions before I approached the Eclipse community for help solving the implementation problems but I just ran across this bug. It would be nice to see if we can come up with a solution that addresses both the needs of the Linux Eclipse communities and the requirements expressed here - if that is possible. Any comments on this would be appreciated.
PDE/Build now supports a headless releng-style product export given a .product file. The UI is staying out of this business. Moving to PDE/Build to close.
As Wassim said PDE build is now able to completly export a product from a product file. It will generate the config.ini and the eclipse.ini (the eclipse.ini is not released yet, see bug #127576). There is no doc yet but you can take a look at the productBuild folder under pde.build/scripts. *** This bug has been marked as a duplicate of 107272 ***
I have released the proposed solution as open source project at: http://eclipseassembly.sourceforge.net Updated to support Eclipse 3.3