Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 295773

Summary: Target "-Dincubation=" does not exist in the project "org.eclipse.dash.commonbuilder.releng/buildAll.xml".
Product: z_Archived Reporter: David Carver <d_a_carver>
Component: Dash AthenaAssignee: Project Inbox <athena.build-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: andrew_johnson, dennis.huebner, nboldt, sbouchet, wayne.beaton
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 295670    
Bug Blocks:    
Attachments:
Description Flags
another attempt at hacking around this issue
none
mylyn/context/zip none

Description David Carver CLA 2009-11-20 20:30:56 EST
While running the xsl.psychopath build the following caused the build to fail.

    [build] publish:
    [build]      [echo] Copy static files to build root folder
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/eclipse/N200911201913
    [build]      [echo] Move generated zips to build root folder
    [build]      [move] Moving 16 files to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena
    [build]      [echo] Generate compilelogs/summary.txt
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testresults
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testresults/consolelogs
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testresults/html
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testresults/xml
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/compilelogs
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/compilelogs/plugins
    [build]      [copy] Copying 1 file to /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/compilelogs/plugins/org.eclipse.wst.xml.xpath2.processor_1.1.1.v200911201913
    [build] 
    [build] BUILD FAILED
    [build] Target "-Dincubation=" does not exist in the project "org.eclipse.dash.commonbuilder.releng/buildAll.xml". 
    [build] 
    [build] Total time: 67 minutes 57 seconds

BUILD FAILED
/opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/sourceediting/development/athena/org.eclipse.wst.xml.xpath2.releng/build.xml:40: The following error occurred while executing this line:
/opt/public/cbi/build/org.eclipse.dash.common.releng/buildAll.xml:290: The following error occurred while executing this line:
/opt/public/cbi/build/org.eclipse.dash.common.releng/buildAll.xml:309: Java returned: 13

build.properties did have a incubation property set to nothing, but nothing in the build.steps.
Comment 1 David Carver CLA 2009-11-20 22:02:34 EST
This is also happening in the wst.xsl build as well.  Both of these builds are Ant based build scripts.   I synchronized with head and don't see anything different.  Did something change on the build server???
Comment 2 David Carver CLA 2009-11-20 22:33:52 EST
wst.jsdt gets same error:

   [build] 
    [build] BUILD FAILED
    [build] Target "-Dincubation=" does not exist in the project "org.eclipse.dash.commonbuilder.releng/buildAll.xml". 
    [build] 
    [build] Total time: 23 minutes 16 seconds
Comment 3 Nick Boldt CLA 2009-11-20 23:31:09 EST
Added this to buildAllHelper.xml:

		<!-- support incubation=true & incubation=false for those who launch builds from Ant rather than shell -->
		<if>
			<or>
				<not>
					<isset property="incubation" />
				</not>
				<isfalse value="${incubation}" />
			</or>
			<then>
				<property name="incubation" value="" />
			</then>
			<elseif>
				<istrue value="${incubation}" />
				<then>
					<property name="incubation" value="-incubation" />
				</then>
			</elseif>
		</if>

Please try the following:

a) omit the entire property -Dincubation= 
                        (or omit incubation= from build.properties)
b) use -Dincubation=false (or incubation=false in build.properties)
c) use -Dincubation=true  (or incubation=true  in build.properties)

If you're satisfied w/ either (a) or (b) then please close. Otherwise let me know what else I can do here.
Comment 4 David Carver CLA 2009-11-21 00:04:51 EST
(In reply to comment #3)
> Added this to buildAllHelper.xml:
> 
>         <!-- support incubation=true & incubation=false for those who launch
> builds from Ant rather than shell -->
>         <if>
>             <or>
>                 <not>
>                     <isset property="incubation" />
>                 </not>
>                 <isfalse value="${incubation}" />
>             </or>
>             <then>
>                 <property name="incubation" value="" />
>             </then>
>             <elseif>
>                 <istrue value="${incubation}" />
>                 <then>
>                     <property name="incubation" value="-incubation" />
>                 </then>
>             </elseif>
>         </if>
> 
> Please try the following:
> 
> a) omit the entire property -Dincubation= 
>                         (or omit incubation= from build.properties)
> b) use -Dincubation=false (or incubation=false in build.properties)
> c) use -Dincubation=true  (or incubation=true  in build.properties)
> 
> If you're satisfied w/ either (a) or (b) then please close. Otherwise let me
> know what else I can do here.

#fail!

This did what I thought it might:

 [build] /opt/public/cbi/build/org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml:113: Warning: Could not find file /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/eclipse/N200911202343/wst-xpath2-psychopath-Updatefalse-N200911202343.zip to copy.


Which put the value of incubation property into the filenames that it was looking for.   I changed in my build.properties file:

incubation=

to

incubation=false

And the above is the result.
Comment 5 David Carver CLA 2009-11-21 00:08:20 EST
What is the recent change that is causing you to key off the incubation value.  As I said, before today, this worked correctly, what changed on the build.eclipse.org.

I think this is a great example of why we need to use AntUnit when making changes to these build scripts.  To many inter-dependencies happening, and to many ways things can go wrong with one change.
Comment 6 Nick Boldt CLA 2009-11-21 00:10:56 EST
(In reply to comment #5)
> What is the recent change that is causing you to key off the incubation value. 
> As I said, before today, this worked correctly, what changed on the
> build.eclipse.org.
> 
> I think this is a great example of why we need to use AntUnit when making
> changes to these build scripts.  To many inter-dependencies happening, and to
> many ways things can go wrong with one change.

Agreed, I'm all for TDD and AntUnit... just need to find time to absorb all your patches.
Comment 7 Nick Boldt CLA 2009-11-21 00:14:03 EST
(In reply to comment #6)
> (In reply to comment #5)
> > What is the recent change that is causing you to key off the incubation value. 
> > As I said, before today, this worked correctly, what changed on the
> > build.eclipse.org.
> > 
> > I think this is a great example of why we need to use AntUnit when making
> > changes to these build scripts.  To many inter-dependencies happening, and to
> > many ways things can go wrong with one change.
> 
> Agreed, I'm all for TDD and AntUnit... just need to find time to absorb all
> your patches.

What about using

incubation=''
or
incubation=""

in your build.properties file?
Comment 8 Nick Boldt CLA 2009-11-21 00:21:23 EST
Might need to patch this snippet from buildAll.xml lines 275-287:

		<!-- generate -Dflags from known Ant variables: for complete list, see buildAllHelper.xml#initCommandlineArgsList -->
		<var name="args" value="" />
		<for param="arg" list="${commandlineArgsList}" delimiter=", 
			">
			<sequential>
				<if>
					<isset property="@{arg}" />
					<then>
						<var name="args" value="${args} -D@{arg}=${@{arg}}" />
					</then>
				</if>
			</sequential>
		</for>

Maybe we want this instead?

						<var name="args" value="${args} -D@{arg}=&quot;${@{arg}}&quot;" />

Or else check if ${@{arg}} is non-null in the <if> ?

  <if><and><not><equals arg1="${@{arg}}" arg2=""/></not><isset property="@{arg}" /></and><then>...</then></if>
Comment 9 David Carver CLA 2009-11-21 00:32:09 EST
(In reply to comment #8)
> Might need to patch this snippet from buildAll.xml lines 275-287:
> 
>         <!-- generate -Dflags from known Ant variables: for complete list, see
> buildAllHelper.xml#initCommandlineArgsList -->
>         <var name="args" value="" />
>         <for param="arg" list="${commandlineArgsList}" delimiter=", 
>             ">
>             <sequential>
>                 <if>
>                     <isset property="@{arg}" />
>                     <then>
>                         <var name="args" value="${args} -D@{arg}=${@{arg}}" />
>                     </then>
>                 </if>
>             </sequential>
>         </for>
> 
> Maybe we want this instead?
> 
>                         <var name="args" value="${args}
> -D@{arg}=&quot;${@{arg}}&quot;" />
> 
> Or else check if ${@{arg}} is non-null in the <if> ?
> 
>   <if><and><not><equals arg1="${@{arg}}" arg2=""/></not><isset
> property="@{arg}" /></and><then>...</then></if>

I guess I'm not sure why this is even necessary if you are passing everything in through ant, and doing an antcall the inheritAll attribute is set to true by default, which passes all the properties that were defined or previously set by the calling ant script to the one being called.

Seems like this is duplicating work and duplicating what antcall with inheritall set to true already does.
Comment 10 David Carver CLA 2009-11-21 00:34:54 EST
(In reply to comment #9)
> (In reply to comment #8)
> > Might need to patch this snippet from buildAll.xml lines 275-287:
> > 
> >         <!-- generate -Dflags from known Ant variables: for complete list, see
> > buildAllHelper.xml#initCommandlineArgsList -->
> >         <var name="args" value="" />
> >         <for param="arg" list="${commandlineArgsList}" delimiter=", 
> >             ">
> >             <sequential>
> >                 <if>
> >                     <isset property="@{arg}" />
> >                     <then>
> >                         <var name="args" value="${args} -D@{arg}=${@{arg}}" />
> >                     </then>
> >                 </if>
> >             </sequential>
> >         </for>
> > 
> > Maybe we want this instead?
> > 
> >                         <var name="args" value="${args}
> > -D@{arg}=&quot;${@{arg}}&quot;" />
> > 
> > Or else check if ${@{arg}} is non-null in the <if> ?
> > 
> >   <if><and><not><equals arg1="${@{arg}}" arg2=""/></not><isset
> > property="@{arg}" /></and><then>...</then></if>
> 
> I guess I'm not sure why this is even necessary if you are passing everything
> in through ant, and doing an antcall the inheritAll attribute is set to true by
> default, which passes all the properties that were defined or previously set by
> the calling ant script to the one being called.
> 
> Seems like this is duplicating work and duplicating what antcall with
> inheritall set to true already does.

Doh...this is building the command line list for sending to headless eclipse.   Sigh...another reason I despise the way pde build and the eclipse Ant tasks are done.   Why not just have the headless task, load a properties file, and avoid having to create the -D flags to pass into it?  Since it is ant that eclipse headless antrunner is running.
Comment 11 David Carver CLA 2009-11-21 00:38:42 EST
More failure:

BUILD FAILED
    [build] /opt/public/cbi/build/org.eclipse.dash.common.releng/buildAll.xml:330: The following error occurred while executing this line:
    [build] /opt/public/cbi/build/org.eclipse.dash.common.releng/buildAll.xml:367: The following error occurred while executing this line:
    [build] /opt/public/cbi/build/org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml:1383: The following error occurred while executing this line:
    [build] /opt/public/cbi/build/org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml:1411: The following error occurred while executing this line:
    [build] /opt/public/cbi/build/org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml:16: The following error occurred while executing this line:
    [build] /opt/public/cbi/build/org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml:113: Warning: Could not find file /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/eclipse/N200911210022/wst-xpath2-psychopath-Update${incubation}-N200911210022.zip to copy.
    [build] 
    [build] Total time: 18 minutes 8 seconds

Will try incubation='' then I'm calling it a night.
Comment 12 David Carver CLA 2009-11-21 01:02:28 EST
Okay tried with the incubation='' and still failed.  So going to call it a night.

Here are some parting thoughts that might make life easier going forward and not have to go through all this looping to build the -Dflag stuff:

In regards to passing the properties to headless eclipse: 

In buildAll.xml which gets called during the headless Ant execution add the following just after the project file:

<project default="noDefault" name="org.eclipse.dash.commonbuilder.releng/buildAll.xml">
	
->>>>	<loadproperties srcfile="build.properties"/>

	<target name="noDefault">
		<echo>Must specify a target such as 'run' or 'runEclipse'.</echo>
	</target>

This will load the build.properties file and it's default settings.  Thus eliminating the need to create the massive commandline string.   If there are other values that are need as defaults.  I might suggest a default.properties file to be loaded as well right after the build.properties are loaded. 

This way build.properties takes prescedence.  Of course this does nothing for those properties properties set by Hudson.  If we need to dump the existing properites to be reloaded.  We could use echoproperties with a destfile attribute to dump all the existing properties to a file that can then be re-read back in.  PropertyFile task is another option.

We then read back in that file, during the headless build thus setting all the properties again.
Comment 13 Nick Boldt CLA 2009-11-21 15:18:06 EST
Created attachment 152784 [details]
another attempt at hacking around this issue
Comment 14 Nick Boldt CLA 2009-11-21 15:18:10 EST
Created attachment 152785 [details]
mylyn/context/zip
Comment 15 David Carver CLA 2009-11-21 20:06:01 EST
(In reply to comment #13)
> Created an attachment (id=152784) [details]
> another attempt at hacking around this issue

Yeah...it works but it is a complete hack. :)
Comment 16 Nick Boldt CLA 2009-11-23 11:15:32 EST
(In reply to comment #15)
> (In reply to comment #13)
> > Created an attachment (id=152784) [details] [details]
> > another attempt at hacking around this issue
> 
> Yeah...it works but it is a complete hack. :)

Actually, it looks like the "-Dincubation=" isn't being run, which means my improved check for "if for name=value pair, value is null, DO NOT set a -Dfoo= flag" is working. I could remove the hackaround "-Dincubation=" target too if you want to verify, but I don't see "-Dincubation=" in the log so I think I can safely assume we're fixed here, and the hack is superfluous.
Comment 17 David Carver CLA 2009-11-23 11:37:51 EST
I think we need to keep this open until I verify one item.  Removing incubation= from the build properties file.

I'll re-open if I run into a problem.   I think in many cases we need to provide default values for some of these items.
Comment 18 David Carver CLA 2009-11-23 12:02:29 EST
Re-opening for the following reason:

wst-xpath2-psychopath-junit-tests${incubation}-N200911231153.zip


If you do not set the incubation property, all filenames show up with the ${incubation} in them.   Ideal solution, in the build scripts set incubation property to nothing by default.  If it is over-ridden in build.properties that value takes precedence.
Comment 19 Nick Boldt CLA 2009-11-23 12:47:57 EST
(In reply to comment #18)
> Re-opening for the following reason:
> 
> wst-xpath2-psychopath-junit-tests${incubation}-N200911231153.zip
> 
> 
> If you do not set the incubation property, all filenames show up with the
> ${incubation} in them.   Ideal solution, in the build scripts set incubation
> property to nothing by default.  If it is over-ridden in build.properties that
> value takes precedence.

default null value added to common.releng/build.properties.

+ incubation=

Tested locally for GEF (having removed "incubation=" from gef.releng/build.properties; works. Give it a whirl.
Comment 20 Nick Boldt CLA 2009-11-23 12:51:25 EST
Damn, that breaks the tests if you pass in an actual value: reverted. Need a more complete fix which will pass thru to the test harness. :(
Comment 21 Nick Boldt CLA 2009-11-24 01:35:34 EST
(In reply to comment #20)
> Damn, that breaks the tests if you pass in an actual value: reverted. Need a
> more complete fix which will pass thru to the test harness. :(

Depends on solving bug 295670 so that tests don't have to reload their previously set immutable properties.
Comment 22 Nick Boldt CLA 2009-11-26 18:03:01 EST
(In reply to comment #21)
> (In reply to comment #20)
> > Damn, that breaks the tests if you pass in an actual value: reverted. Need a
> > more complete fix which will pass thru to the test harness. :(
> 
> Depends on solving bug 295670 so that tests don't have to reload their
> previously set immutable properties.

This should be fixed now. Damn, we need XMLUnit tests! "Should be" should never be part of closing a bug :)
Comment 23 Dennis Huebner CLA 2009-12-15 13:48:22 EST
Incubation property is set to -incubation but
incubation suffix is missing in zip file names.
See https://build.eclipse.org/hudson/view/Modeling/job/cbi-emf-index-integration/67/artifact/build/S200912151248/
Comment 24 Nick Boldt CLA 2010-03-01 16:32:05 EST
(In reply to comment #23)
> Incubation property is set to -incubation but
> incubation suffix is missing in zip file names.
> See
> https://build.eclipse.org/hudson/view/Modeling/job/cbi-emf-index-integration/67/artifact/build/S200912151248/

Workaround here is to build using ant script in Hudson or Eclipse instead of running from start.sh or run.sh shell script.

When run from Ant, incubation property is properly loaded.

Here's a sample build.xml for running locally:

http://beyondcvs.cvs.sourceforge.net/viewvc/beyondcvs/org.eclipse.externaltools.releng/build.xml?revision=1.3&view=markup
Comment 25 Andrew Johnson CLA 2010-03-04 07:18:52 EST
This is a problem for Memory Analyzer too:

https://build.eclipse.org/hudson/view/Athena%20CBI%20%28SVN%29/job/cbi-mat-nightly/lastStableBuild/

build.properties:

## BEGIN PROJECT BUILD PROPERTIES ##

thirdPartyDownloadLicenseAcceptance="I accept"

projectid=technolgy.mat
zipPrefix=MAT
incubation=-incubation
version=0.8.0
buildType=N


Hudson:

# configuration
export PROJRELENGROOT='-projRelengRoot svn://dev.eclipse.org/svnroot/technology/org.eclipse.mat/trunk'
export PROJRELENGPATH='-projRelengPath org.eclipse.mat.releng.athena'

# parameters
#export SNAPSHOT="true"

# run the build
. /opt/public/cbi/build/org.eclipse.dash.common.releng/hudson/run.sh


Artifacts:

	MAT-Automated-Tests-N201003030911.zip	12815655	fingerprint view
	MAT-Automated-Tests-N201003030911.zip.md5	72	fingerprint view
	MAT-SDK-N201003030911.zip	4901108	fingerprint view
	MAT-SDK-N201003030911.zip.md5	60	fingerprint view
	MAT-Update-N201003030911.zip	4907232	fingerprint view
	MAT-Update-N201003030911.zip.md5	63	fingerprint view



I do see the comment about switching to Ant from Hudson, but I'm not confident about doing that. I might just change 

zipPrefix=MAT
to
zipPrefix=MemoryAnalyzer-Incubation

until this bug is fixed.
Comment 26 Dennis Huebner CLA 2010-03-04 09:37:21 EST
> I do see the comment about switching to Ant from Hudson, but I'm not confident
> about doing that.

Switching to Ant is currently a bit problematic because ui tests can't be executed. But Nick is working on it.

> zipPrefix=MAT
> to
> zipPrefix=MemoryAnalyzer-Incubation
> 
> until this bug is fixed.

It's not enough, you have to change your update site name too. e.g. using customized category.xml.
Comment 27 Nick Boldt CLA 2010-03-04 21:02:49 EST
(In reply to comment #25)
> zipPrefix=MAT
> to
> zipPrefix=MemoryAnalyzer-Incubation

That sounds like a brilliant workaround.(In reply to comment #26)

> executed. But Nick is working on it.

Yes, um... trying to figure out what's wrong.

> It's not enough, you have to change your update site name too. e.g. using
> customized category.xml.

Not sure that you need to do anything more than label your plugins/features and zips:

http://wiki.eclipse.org/Development_Resources/HOWTO/Conforming_Incubation_Branding#.282.29_What_is_Conforming.3F
Comment 28 Nick Boldt CLA 2010-03-08 19:10:12 EST
Dennis, for want of a better place to put this information, I'm posting it here:

a) some parallel work related to this issue has begun in bug 305050 and bug 304800.

b) to assist in the "my plugins compile but my tests won't" problem, I've added a new debug line to common.releng/build.xml:

		<echoproperties destfile="${buildDir}/echoproperties-build.xml-${component}.txt" />

Thus, in the same directory you find build.cfg, you will find one echoproperties*.txt file for the "all" and "tests" builders so you can compare properties to see what, if anything, is inconsistent.

Let me know if that sheds any light on the issue of missing JAVA_HOME definition when compiling tests.
Comment 29 Dennis Huebner CLA 2010-03-09 05:49:51 EST
Hi Nick,
I compared both files but fund any difference, except of timestamps and component names of cause. 

Currently the settings looks as follow:
J2SE-1.4=/opt/public/common/ibm-java2-ppc-50/lib/rt.jar\:/opt/public/common <snip>
J2SE-1.5=/opt/public/common/ibm-java2-ppc-50/jre/lib/rt.jar\:/opt/public/common<snip>
JAVA14_HOME=/opt/public/common/ibm-java2-142
JAVA50_64_HOME=/opt/public/common/ibm-java2-ppc64-50
JAVA50_HOME=/opt/public/common/ibm-java2-ppc-50
JAVA60_HOME=/opt/public/common/ibm-java-jdk-ppc-60
JAVA_FOUNDATION_HOME=/opt/public/common/org.eclipse.sdk-feature/libs
JAVA_HOME=/opt/public/common/ibm-java2-ppc-50
JavaSE-1.6=/opt/public/common/ibm-java2-ppc-50/jre/lib/rt.jar\:/opt/public/common/<snip>

Also found this entry:
java.home=/opt/ibm/ibm-java2-ppc-50/jre <- should be the same as JAVA_HOME thought
Comment 30 Dennis Huebner CLA 2010-03-09 07:53:11 EST
(In reply to comment #27)
> (In reply to comment #25)
> > zipPrefix=MAT
> > to
> > zipPrefix=MemoryAnalyzer-Incubation
> 
> That sounds like a brilliant workaround.(In reply to comment #26)

Unfortunately zip names like e.g. emf-emfindex-incubation-SDK-I201003090538.zip can't be handled by the download php site. See http://www.eclipse.org/modeling/emft/downloads/?showAll=1&hlbuild=I201003090538&project=emfindex#I201003090538
FirstUpperCase names are also ignored :(
Comment 31 Nick Boldt CLA 2010-03-11 02:15:59 EST
(In reply to comment #30)
> (In reply to comment #27)
> > (In reply to comment #25)
> > > zipPrefix=MAT
> > > to
> > > zipPrefix=MemoryAnalyzer-Incubation
> > 
> > That sounds like a brilliant workaround.(In reply to comment #26)
> 
> Unfortunately zip names like e.g. emf-emfindex-incubation-SDK-I201003090538.zip
> can't be handled by the download php site. See
> http://www.eclipse.org/modeling/emft/downloads/?showAll=1&hlbuild=I201003090538&project=emfindex#I201003090538
> FirstUpperCase names are also ignored :(

There's a way to work around that by setting more options in the downloads/index.php page, but for the life of me I can't remember how... try looking in the www/modeling/emf/downloads/index.php file for examples.
Comment 32 Wayne Beaton CLA 2011-12-22 23:16:36 EST
WONTFIX; Athena has been terminated.