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

Bug 396368

Summary: samples/examples javadoc build is broken
Product: [Eclipse Project] Platform Reporter: David Williams <david_williams>
Component: RelengAssignee: David Williams <david_williams>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 4.2   
Target Milestone: 4.3 M4   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2012-12-11 21:48:24 EST
This issue was originally noted in bug 396229 but I'm fairly confident the problem is not related to the changes for that bug. It may also be related to the changes for bug 396272 ... and there, may be more a matter of Paul and Thanh over-correcting. :) 

The build is not done/tested yet, but I still see this problem in the log: 
build.index:
[help.buildHelpIndex] Help documentation could not be indexed completely.
[help.buildHelpIndex]     Locale 'en_US': cannot find document: samples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html
[help.buildHelpIndex]     Locale 'en_US': cannot find document: samples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html
[... about 20 more, similar]

Where's "samples" come from? Is created during the build, by the task  
examplesDocCopy
in 
buildDoc.xml
in
org.eclipse.platform.doc.isv

As of right now, the task looks like

<target name="examplesDocCopy" >
	<copy todir="samples">
		<fileset dir=".">
			<include name="${eclipse.platform.team.examples}/org.eclipse.compare.examples/doc-html/"/>
			<include name="${eclipse.platform.team.examples}/org.eclipse.compare.examples.xml/doc-html/"/>				
			<include name="${eclipse.platform.swt.examples}/org.eclipse.swt.examples/doc-html/"/>
[and many more]

But before bug 396272, it looked like

<target name="examplesDocCopy" >
	<copy todir="samples">
		<fileset dir="..">
			<include name="org.eclipse.compare.examples/doc-html/"/>
			<include name="org.eclipse.compare.examples.xml/doc-html/"/>				
			<include name="org.eclipse.swt.examples/doc-html/"/>

That second form is closer to how they are laid out on disk, at least at the point the task is called. 
These may be done that way specifically so there is no "variable qualifiers" in the paths of the javaDoc? 

In any case, we'll need to turn on "verbose" to get a better idea of what's trying to be copied where (and what the basedir is at the time its called). 

I think this has been a build problem for a looong time and its just that we were not really getting "new" builds of JavaDoc samples, due to bug 396245 (as came to light in bug 396009). After all, the "samples and examples" haven't been touched in a long time ... until we started adding pom.xml files to them! :)
Comment 1 David Williams CLA 2012-12-11 22:44:24 EST
I tried adding verbose="true" to the copy task, but that didn't help (during a test build, I just did) ... and then read in ant manual, it list each file copied, so ... if it doesn't copy any, still doesn't tell you what it was trying to copying. 

I'm going to add an explicit echo for ${basedir} and at same time try restoring that target back to its "original" form (the way I first saw it, with ".."; one up from ${basedir} and no "variable names") and trying a "test build" (build machine only, no tagging).
Comment 2 David Williams CLA 2012-12-11 23:18:23 EST
That seemed to do it. Putting that task back the way it was restored "58 files copied" in log, in my test build. Could still be other "doc problems", but this fix will in 12/12 8 AM I-build. 

examplesDocCopy:
     [echo] Copying examples docs to samples. Current basedir: /opt/public/eclipse/eclipse4N/build/supportDir/src/plugins/org.eclipse.platform.doc.isv
     [copy] Copying 58 files to /opt/public/eclipse/eclipse4N/build/supportDir/src/plugins/org.eclipse.platform.doc.isv/samples
Comment 3 David Williams CLA 2012-12-11 23:38:34 EST
BTW, I've "back ported" this same change to 3.8 and 4.2 streams (didn't cleanly cherry pick, for some reason).
Comment 4 Dani Megert CLA 2012-12-13 03:32:18 EST
Verified in I20121212-2000.