Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » p2.gathering causing target does not exist error
p2.gathering causing target does not exist error [message #493699] Tue, 27 October 2009 15:31 Go to next message
Franck Mising name is currently offline Franck Mising nameFriend
Messages: 92
Registered: July 2009
Location: France
Member
I have a headless feature build that works fine until I try to publish the build results to an update site by setting p2.gathering = true at which point I get this error:

Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist in the project "Build specific targets and properties".

I have tried to debug the problem but I can't figure it out, any suggestion would be really appreciated!

Here is my build.properties file:
============================

topLevelElementType = feature
topLevelElementId = com.acme.eclipse.features.myFeature
runPackager=true

base=C:/
baseLocation=${base}/galileo
baseos=win32
basews=win32
basearch=x86

myFeature.eclipse.root=C:/eclipse
myFeature.myFeature.root=C:/myFeature

p2.gathering = true
p2.compress=true

buildDirectory=${myFeature.eclipse.root}/build
elementPath=${myFeature.eclipse.root}/features/com.acme.ecli pse.features.myFeature
pluginPath=${myFeature.eclipse.root};${myFeature.myFeature.r oot}

collectingFolder=${buildLabel}
feature.temp.folder=${buildDirectory}/build.temp.feature
buildTempFolder=${buildDirectory}/build.temp
assemblyTempDir=${buildDirectory}/build.temp.assembly

timestamp=007
buildType=Nightly
buildId=${timestamp}
buildLabel=${buildType}.${buildId}

archivePrefix=${topLevelElementId}
myFeature.eclipse.root=C:/eclipse

JavaSE-1.6=C:/jdk1.6.0_14/jre/lib/rt.jar

logExtension=.log

javacDebugInfo=false
javacFailOnError=true
javacVerbose=true

skipBase=true
skipMaps=true
skipFetch=true

========================
build.log:
========================

Importing file c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\allElements.xml from c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml

parsing buildfile c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\allElements.xml with URI = file:/c:/eclipse/features/com.acme.eclipse.features.myFeatur e/build-config/allElements.xml

Setting ro project property: ant.file.allElements Delegator -> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\allElements.xml

+Target: allElementsDelegator

+Target: allElements Delegator.allElementsDelegator

+Target: assemble.com.acme.eclipse.features.myFeature

+Target: allElements Delegator.assemble.com.acme.eclipse.features.myFeature

[ant] Entering c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml...

Adding reference: eclipse.ant.targetVector

[ant] Exiting c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml.

[ant] Exiting C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur e.all.xml.

[ant] Exiting C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180 0\scripts\genericTargets.xml.

[antcall] Exiting c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml.

[ant] Exiting c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml.

[antcall] Exiting c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180 0\scripts\build.xml.

BUILD FAILED

c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180 0\scripts\build.xml:37: The following error occurred while executing this line:

c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180 0\scripts\build.xml:118: The following error occurred while executing this line:

c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\customTargets.xml:10: The following error occurred while executing this line:

c:\eclipse\features\com.acme.eclipse.features.myFeature\buil d-config\allElements.xml:12: The following error occurred while executing this line:

C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180 0\scripts\genericTargets.xml:185: The following error occurred while executing this line:

C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur e.all.xml:23: The following error occurred while executing this line:

C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur e.all.xml:15: The following error occurred while executing this line:

Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist in the project "Build specific targets and properties".
Re: p2.gathering causing target does not exist error [message #493735 is a reply to message #493699] Tue, 27 October 2009 17:43 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You must have an older allElements.xml.
You can add a target to your allElements.xml:

<target name="assemble.com.acme.eclipse.features.myFeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

In the same way you would have
" assemble.com.acme.eclipse.features.myFeature.win32.win32.x86 " targets.

You could also update your allElements.xml with the template from
pde.build. In 3.4 this file was changed to remove the requirement for
manually adding all those platform specific targets. (bug 179612).
There is now a default target, that can be customized with platform
specific targets. It seems that p2.gathering was never tested against
older allElements.xml files.

-Andrew

Franck wrote:
> I have a headless feature build that works fine until I try to publish
> the build results to an update site by setting p2.gathering = true at
> which point I get this error:
>
> Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist
> in the project "Build specific targets and properties".
> I have tried to debug the problem but I can't figure it out, any
> suggestion would be really appreciated!
>
> Here is my build.properties file:
> ============================
>
> topLevelElementType = feature
> topLevelElementId = com.acme.eclipse.features.myFeature
> runPackager=true
>
> base=C:/
> baseLocation=${base}/galileo
> baseos=win32
> basews=win32
> basearch=x86
>
> myFeature.eclipse.root=C:/eclipse
> myFeature.myFeature.root=C:/myFeature
>
> p2.gathering = true
> p2.compress=true
>
> buildDirectory=${myFeature.eclipse.root}/build
> elementPath=${myFeature.eclipse.root}/features/com.acme.ecli
> pse.features.myFeature
> pluginPath=${myFeature.eclipse.root};${myFeature.myFeature.r oot}
>
> collectingFolder=${buildLabel}
> feature.temp.folder=${buildDirectory}/build.temp.feature
> buildTempFolder=${buildDirectory}/build.temp
> assemblyTempDir=${buildDirectory}/build.temp.assembly
>
> timestamp=007
> buildType=Nightly
> buildId=${timestamp}
> buildLabel=${buildType}.${buildId}
>
> archivePrefix=${topLevelElementId}
> myFeature.eclipse.root=C:/eclipse
>
> JavaSE-1.6=C:/jdk1.6.0_14/jre/lib/rt.jar
>
> logExtension=.log
>
> javacDebugInfo=false javacFailOnError=true
> javacVerbose=true
>
> skipBase=true
> skipMaps=true
> skipFetch=true
>
> ========================
> build.log:
> ========================
>
> Importing file
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml from
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml
>
> parsing buildfile
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml with URI =
> file:/c:/eclipse/features/com.acme.eclipse.features.myFeatur
> e/build-config/allElements.xml
>
> Setting ro project property: ant.file.allElements Delegator ->
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml
>
> +Target: allElementsDelegator
>
> +Target: allElements Delegator.allElementsDelegator
>
> +Target: assemble.com.acme.eclipse.features.myFeature
>
> +Target: allElements Delegator.assemble.com.acme.eclipse.features.myFeature
>
> [ant] Entering
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml...
>
> Adding reference: eclipse.ant.targetVector
>
> [ant] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [ant] Exiting
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur e.all.xml.
>
> [ant] Exiting
> C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\genericTargets.xml.
>
> [antcall] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [ant] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [antcall] Exiting
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml.
>
> BUILD FAILED
>
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml:37: The following error occurred while executing
> this line:
>
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml:118: The following error occurred while executing
> this line:
>
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml:10: The following error occurred while
> executing this line:
>
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml:12: The following error occurred while
> executing this line:
>
> C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\genericTargets.xml:185: The following error occurred while
> executing this line:
>
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur
> e.all.xml:23: The following error occurred while executing this line:
>
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur
> e.all.xml:15: The following error occurred while executing this line:
>
> Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist
> in the project "Build specific targets and properties".
Re: p2.gathering causing target does not exist error [message #493775 is a reply to message #493735] Tue, 27 October 2009 23:13 Go to previous messageGo to next message
Franck Mising name is currently offline Franck Mising nameFriend
Messages: 92
Registered: July 2009
Location: France
Member
Andrew Niefer wrote on Tue, 27 October 2009 13:43
You must have an older allElements.xml.
You can add a target to your allElements.xml:

<target name="assemble.com.acme.eclipse.features.myFeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>


Thanks for looking at this Andrew, that was indeed the issue. I have the latest allElements.xml, but I had no idea that config.spec was to be replaced by p2 in "assemble.element.id[.config.spec]"...

So for the record the targets needed in allElements.xml for a config-neutral feature build with p2.gathering = true are

<target name="assemble.com.acme.myfeature.group.group.group">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

<target name="assemble.com.acme.myfeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

Re: p2.gathering causing target does not exist error [message #493943 is a reply to message #493775] Wed, 28 October 2009 15:06 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Yes, those are the correct targets, though I would not have expected
them to be necessary in the latest allElements.xml.

The allElements.xml has:
<property name="defaultAssemblyEnabled" value="true" />
...
<target name="defaultAssemble">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
</target>

This "defaultAssemblyEnabled" means the allElements has the default
assemble target, and in this case we would expect both the
group.group.group and p2 configs to use this default target without
needing to add explicit "assemble.*.group.group.group" targets.

Also, in when the defaultAssemble is enabled, to use the non-default
targets, you actually need to define a property for each config like this:

<property name="assemble.com.acme.myfeature.p2" value="true" />
<target name="assemble.com.acme.myfeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

This property "assemble.com.acme.myfeature.p2" means use that target
instead of the default target.

-Andrew

Franck wrote:
> Andrew Niefer wrote on Tue, 27 October 2009 13:43
>> You must have an older allElements.xml.
>> You can add a target to your allElements.xml:
>>
>> <target name="assemble.com.acme.eclipse.features.myFeature.p2">
>> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
>> </target>
>
>
> Thanks for looking at this Andrew, that was indeed the issue. I have the
> latest allElements.xml, but I had no idea that config.spec was to be
> replaced by p2 in "assemble.element.id[.config.spec]"...
>
> So for the record the targets needed in allElements.xml for a
> config-neutral feature build with p2.gathering = true are
>
> <target name="assemble.com.acme.myfeature.group.group.group">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> <target name="assemble.com.acme.myfeature.p2">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
>
Re: p2.gathering causing target does not exist error [message #602936 is a reply to message #493699] Tue, 27 October 2009 17:43 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You must have an older allElements.xml.
You can add a target to your allElements.xml:

<target name="assemble.com.acme.eclipse.features.myFeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

In the same way you would have
" assemble.com.acme.eclipse.features.myFeature.win32.win32.x86 " targets.

You could also update your allElements.xml with the template from
pde.build. In 3.4 this file was changed to remove the requirement for
manually adding all those platform specific targets. (bug 179612).
There is now a default target, that can be customized with platform
specific targets. It seems that p2.gathering was never tested against
older allElements.xml files.

-Andrew

Franck wrote:
> I have a headless feature build that works fine until I try to publish
> the build results to an update site by setting p2.gathering = true at
> which point I get this error:
>
> Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist
> in the project "Build specific targets and properties".
> I have tried to debug the problem but I can't figure it out, any
> suggestion would be really appreciated!
>
> Here is my build.properties file:
> ============================
>
> topLevelElementType = feature
> topLevelElementId = com.acme.eclipse.features.myFeature
> runPackager=true
>
> base=C:/
> baseLocation=${base}/galileo
> baseos=win32
> basews=win32
> basearch=x86
>
> myFeature.eclipse.root=C:/eclipse
> myFeature.myFeature.root=C:/myFeature
>
> p2.gathering = true
> p2.compress=true
>
> buildDirectory=${myFeature.eclipse.root}/build
> elementPath=${myFeature.eclipse.root}/features/com.acme.ecli
> pse.features.myFeature
> pluginPath=${myFeature.eclipse.root};${myFeature.myFeature.r oot}
>
> collectingFolder=${buildLabel}
> feature.temp.folder=${buildDirectory}/build.temp.feature
> buildTempFolder=${buildDirectory}/build.temp
> assemblyTempDir=${buildDirectory}/build.temp.assembly
>
> timestamp=007
> buildType=Nightly
> buildId=${timestamp}
> buildLabel=${buildType}.${buildId}
>
> archivePrefix=${topLevelElementId}
> myFeature.eclipse.root=C:/eclipse
>
> JavaSE-1.6=C:/jdk1.6.0_14/jre/lib/rt.jar
>
> logExtension=.log
>
> javacDebugInfo=false javacFailOnError=true
> javacVerbose=true
>
> skipBase=true
> skipMaps=true
> skipFetch=true
>
> ========================
> build.log:
> ========================
>
> Importing file
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml from
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml
>
> parsing buildfile
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml with URI =
> file:/c:/eclipse/features/com.acme.eclipse.features.myFeatur
> e/build-config/allElements.xml
>
> Setting ro project property: ant.file.allElements Delegator ->
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml
>
> +Target: allElementsDelegator
>
> +Target: allElements Delegator.allElementsDelegator
>
> +Target: assemble.com.acme.eclipse.features.myFeature
>
> +Target: allElements Delegator.assemble.com.acme.eclipse.features.myFeature
>
> [ant] Entering
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml...
>
> Adding reference: eclipse.ant.targetVector
>
> [ant] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [ant] Exiting
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur e.all.xml.
>
> [ant] Exiting
> C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\genericTargets.xml.
>
> [antcall] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [ant] Exiting
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml.
>
> [antcall] Exiting
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml.
>
> BUILD FAILED
>
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml:37: The following error occurred while executing
> this line:
>
> c:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\build.xml:118: The following error occurred while executing
> this line:
>
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\customTargets.xml:10: The following error occurred while
> executing this line:
>
> c:\eclipse\features\com.acme.eclipse.features.myFeature\buil
> d-config\allElements.xml:12: The following error occurred while
> executing this line:
>
> C:\galileo\plugins\org.eclipse.pde.build_3.5.0.v20090527-180
> 0\scripts\genericTargets.xml:185: The following error occurred while
> executing this line:
>
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur
> e.all.xml:23: The following error occurred while executing this line:
>
> C:\eclipse\build\assemble.com.acme.eclipse.features.myFeatur
> e.all.xml:15: The following error occurred while executing this line:
>
> Target "assemble.com.acme.eclipse.features.myFeature.p2" does not exist
> in the project "Build specific targets and properties".
Re: p2.gathering causing target does not exist error [message #602944 is a reply to message #493735] Tue, 27 October 2009 23:13 Go to previous message
Franck Mising name is currently offline Franck Mising nameFriend
Messages: 92
Registered: July 2009
Location: France
Member
Andrew Niefer wrote on Tue, 27 October 2009 13:43
> You must have an older allElements.xml.
> You can add a target to your allElements.xml:
>
> <target name="assemble.com.acme.eclipse.features.myFeature.p2">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>


Thanks for looking at this Andrew, that was indeed the issue. I have the latest allElements.xml, but I had no idea that config.spec was to be replaced by p2 in "assemble.element.id[.config.spec]"...

So for the record the targets needed in allElements.xml for a config-neutral feature build with p2.gathering = true are

<target name="assemble.com.acme.myfeature.group.group.group">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

<target name="assemble.com.acme.myfeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>
Re: p2.gathering causing target does not exist error [message #602982 is a reply to message #493775] Wed, 28 October 2009 15:06 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Yes, those are the correct targets, though I would not have expected
them to be necessary in the latest allElements.xml.

The allElements.xml has:
<property name="defaultAssemblyEnabled" value="true" />
...
<target name="defaultAssemble">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
</target>

This "defaultAssemblyEnabled" means the allElements has the default
assemble target, and in this case we would expect both the
group.group.group and p2 configs to use this default target without
needing to add explicit "assemble.*.group.group.group" targets.

Also, in when the defaultAssemble is enabled, to use the non-default
targets, you actually need to define a property for each config like this:

<property name="assemble.com.acme.myfeature.p2" value="true" />
<target name="assemble.com.acme.myfeature.p2">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>

This property "assemble.com.acme.myfeature.p2" means use that target
instead of the default target.

-Andrew

Franck wrote:
> Andrew Niefer wrote on Tue, 27 October 2009 13:43
>> You must have an older allElements.xml.
>> You can add a target to your allElements.xml:
>>
>> <target name="assemble.com.acme.eclipse.features.myFeature.p2">
>> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
>> </target>
>
>
> Thanks for looking at this Andrew, that was indeed the issue. I have the
> latest allElements.xml, but I had no idea that config.spec was to be
> replaced by p2 in "assemble.element.id[.config.spec]"...
>
> So for the record the targets needed in allElements.xml for a
> config-neutral feature build with p2.gathering = true are
>
> <target name="assemble.com.acme.myfeature.group.group.group">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
> <target name="assemble.com.acme.myfeature.p2">
> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
> </target>
>
>
Previous Topic:Use of eclipse.buildScript, need help!!
Next Topic:Use of eclipse.buildScript, need help!!
Goto Forum:
  


Current Time: Thu Apr 25 04:37:08 GMT 2024

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

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

Back to the top