Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 153804 - Building a feature that contains a local install handler doesn't create the jar containing the handler
Summary: Building a feature that contains a local install handler doesn't create the j...
Status: RESOLVED DUPLICATE of bug 83140
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 14:35 EDT by Jim Adams CLA
Modified: 2006-09-05 15:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Adams CLA 2006-08-14 14:35:28 EDT
I have created a feature project and given it an install handler in the wizard. This creates a Java Project. I have modified the build.properties to create a jar file as part of the build. When I build the feature, however, all I get is the feature.xml.
Here's the build.properties file:
bin.includes = feature.xml,\
               sas.ads.InstallHandler.jar
jars.compile.order = sas.ads.InstallHandler.jar
source.sas.ads.InstallHandler.jar = Source/Java/
output.sas.ads.InstallHandler.jar = bin/

A jar is not created. I don't see any errors.
Comment 1 Andrew Niefer CLA 2006-08-14 18:06:32 EDT
pde.build only knows how to build plug-in projects.  It does not know how to compile normal Java projects.  As far as the build is concerned, features are really just a grouping mechanism specifying which plug-ins to build.

By specifying an install handler, the wizard creates a java project which also happens to be a feature.  Any binaries will need to exist before hand when pde.build packages up the feature.

You could export a jar from the UI and keep it in the feature.  
Or, you could write some ant that will compile the jar and get it called from pde.build using custom Feature build steps. (http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tasks/pde_custom_callbacks.htm)
Comment 2 Jim Adams CLA 2006-08-14 23:59:12 EDT
Frankly, if it is documented that this is how you add install handlers to a feature and the wizard creates the java projet then the PDE builder should also participate.
Comment 3 Andrew Niefer CLA 2006-08-15 10:40:27 EDT
pde.build is not aware of the workspace so we can't do anything at this time in a headless build.  

Sending this to pde.ui for comment.
Comment 4 Wassim Melhem CLA 2006-08-22 00:42:47 EDT
Andrew, this should be regarded as an enhancement for pde/build to build custom install handlers (or any JARs) listed in features.  

I expect it to build all source.* entries in the build.properties regardless if it's a plug-in or a feature.

The user can have workarounds as you suggest in comment 1, but this is a legitimate pde/build request.
Comment 5 Andrew Niefer CLA 2006-08-22 10:26:00 EDT
The first problem is that pde.build does not have any information regarding dependencies to generate a classpath with.  You could maybe provide jars.extra.classpath, but that doesn't apply very well to dependencies on bundles.
Comment 6 Pascal Rapicault CLA 2006-09-05 15:22:06 EDT

*** This bug has been marked as a duplicate of 83140 ***