Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 283347 - Multiple calls to genericTargets fail when p2.gathering is set
Summary: Multiple calls to genericTargets fail when p2.gathering is set
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 321888 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-13 19:28 EDT by Ian Bull CLA
Modified: 2018-12-03 09:03 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2009-07-13 19:28:37 EDT
I currently have one feature (foo) that depends on feature (bar) being built first.  I have done this by customizing allElementsDelegator by adding a second call to genericTargets.  

Both features appear to get assembled in ${build_dir}/tmp, but when the packaging gets called, the cleanup assembly from the first feature removes the temp directory and the build fails.

Maybe this is just a misuse of allElementsDelegator.
Comment 1 Ian Bull CLA 2009-07-13 19:33:53 EDT
I should also point out that if I remove the runPackager, then the error doesn't happen, and I still get a repository.  Is runPackager still relevant?
Comment 2 Ian Bull CLA 2009-07-14 15:55:01 EDT
here is a trace of the problem:

BUILD FAILED
C:\Documents and Settings\irbull\workspaces\book\feature.builder\build.xml:38: The following error occurred while executing this line:
C:\Documents and Settings\irbull\workspaces\book\feature.builder\build.xml:129: The following error occurred while executing this line:
C:\eclipse\eclipse\plugins\org.eclipse.pde.build_3.5.0.v20090527-1800\templates\headless-build\customTargets.xml:12: The following error occurred while executing this line:
C:\Documents and Settings\irbull\workspaces\book\feature.builder\allElements.xml:20: The following error occurred while executing this line:
C:\eclipse\eclipse\plugins\org.eclipse.pde.build_3.5.0.v20090527-1800\scripts\genericTargets.xml:192: The following error occurred while executing this line:
C:\Documents and Settings\irbull\eclipse_feature.build\package.org.equinoxosgi.toast.client.audio.feature.all.xml:23: The following error occurred while executing this line:
C:\Documents and Settings\irbull\eclipse_feature.build\package.org.equinoxosgi.toast.client.audio.feature.all.xml:15: The following error occurred while executing this line:
C:\Documents and Settings\irbull\workspaces\book\feature.builder\allElements.xml:35: The following error occurred while executing this line:
C:\Documents and Settings\irbull\eclipse_feature.build\package.org.equinoxosgi.toast.client.audio.feature.group.group.group.xml:90: The following error occurred while executing this line:
C:\Documents and Settings\irbull\eclipse_feature.build\package.org.equinoxosgi.toast.client.audio.feature.group.group.group.xml:110: C:\Documents and Settings\irbull\eclipse_feature.build\tmp\eclipse not found.
Comment 3 ttest CLA 2009-11-05 05:25:20 EST
I'm having a similar problem that results in the same error. I'm trying to build two features that should be packaged into two separate zip files.

I also specified the two features in the allElementsDelegator target in the allElements.xml file.

The porblem only occurs when p2.gathering is set to true. With the p2.gathering everything works as expected.
Comment 4 ttest CLA 2009-11-05 09:20:17 EST
There is an additional problem with the p2 gathering and multiple features in the allElementsDelegator.

In my setup the mirroring of the first archive is succesful, due to the problem with the cleanup the build fails when the archive for the second featureshall be created.

When I look at the contents of the first archive after the aborted build, I observed that the archive actually contains all the plug-ins and features from both "top-level" features specified in the allElementsDelegator.
Comment 5 ttest CLA 2009-11-05 11:18:33 EST
I found a workaround for this bug by using custom assembly targets in the allElements.xml that set specific tmp folders for each feature.

Here's what I changed/added in my allElements.xml:

At the top of allElements.xml:
<property name="defaultAssemblyEnabled" value="false"/>

<property name="assemble.org.foo.sdk.group.group.group" value="true"/>
<target name="assemble.org.foo.sdk.group.group.group">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="assemblyTempDir" value="${buildDirectory}/tmp-sdk"/>
</ant>
</target>

Create such a property/target pair for each feature in the allElementsDelegator.
Comment 6 Andrew Niefer CLA 2009-11-05 13:00:49 EST
I was going to suggest setting that property in the delegator:

<target name="allElementsDelegator">
    <ant antfile="${genericTargets}" target="${target}">
	<property name="type" value="feature" />
	<property name="id" value="org.foo.sdk" />
	<property name="assemblyTempDir" value="${buildDirectory}/tmp-foo" />
    </ant>
    <ant antfile="${genericTargets}" target="${target}">
	<property name="type" value="feature" />
	<property name="id" value="org.bar.sdk" />
	<property name="assemblyTempDir" value="${buildDirectory}/tmp-bar" />
    </ant
</target>
Comment 7 Andrew Niefer CLA 2010-08-05 11:21:22 EDT
*** Bug 321888 has been marked as a duplicate of this bug. ***
Comment 8 Lars Vogel CLA 2018-12-03 09:03:32 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.