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

Bug 328089

Summary: Add new JAXB Tests feature to WTP build
Product: [WebTools] WTP Releng Reporter: Tran Le <tranle1>
Component: relengAssignee: webtools.releng <webtools.releng-inbox>
Status: RESOLVED FIXED QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3 CC: karenfbutzke
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Patch for documentation
none
patch for jaxb core tests
none
tweak to test.xml none

Description Tran Le CLA 2010-10-18 21:46:11 EDT
Modify the Web Tools build to incorporate the new JAXB Tests feature.
Comment 1 Tran Le CLA 2010-10-18 21:47:36 EDT
On 10/18/2010 5:14 PM, David M Williams wrote:
>
> Of those changes, the only one you need is  the change in    
> Index: components/dali.tests/category.xml      
>
> And, I guess
> Index: components/dalie4.tests/category.xml
> for when we restart those.
>
> Many of the rest are obsolete or no longer used, or no relevant for this
> feature.
> Guess I'll delete some of those now.
>
> You'll also need to add to "build.cfg" file, see the testFeatureIUs property. 
> And, note, ".feature.group" needs to be added to the feature id.
Comment 2 Tran Le CLA 2010-10-18 21:52:42 EDT
Created attachment 181143 [details]
Patch for documentation

I made the changes and committed it. 
In addition, I have attached a patch for documentation.
Comment 3 David Williams CLA 2010-10-18 22:59:06 EDT
Thanks Tran, for the record, the "createnoopzips" scripts should not be changed, either. I have reverted that change. "noop" stands for "no optional" in this case, and these zips have a limited usefulness to limited adopters ... only one I know of ... and these tests would be an "optional" feature that should not be included here. 

The rest look good, from a quick read. 

Since you are getting compile errors ... I'll help look at that too. I suspect this is the bundle that you were telling me about that requires Java 6? And since we don't have others of those (yet), there would be some fixes needed for that in build scripts?
Comment 4 Tran Le CLA 2010-10-18 23:48:04 EDT
Thanks for looking David.
I believe that Dali tests are using the build script wtp-junit-tests.xml and not dali-junit-tests.xml?
Comment 5 David Williams CLA 2010-10-19 00:13:58 EDT
scripts look right for Java 6, but I can mention a few things about that bundle that don't look right ... I'll comment here if that helps you. Don't think they are the exact cause ... but could be related. 

You bundle manifest says "JavaSE-1.6" and your build.properties mentions 1.6, but your projects settings and your .classpath says "1.5". 

I'll add a patch with my recommendation for project settings, which is to remove all the "custom" stuff and let it all be driven by the manifests JavaSE-1.6 BREE. I think that's what you intend ... but could be wrong. Are you really writing for 1.6, but targeting 1.5? 

But, I also don't think these settings are cause of compile errors. During the build, only the manifest.mf, and build.properties files matter ... not project settings and not .classpath.
Comment 6 David Williams CLA 2010-10-19 00:15:14 EDT
Created attachment 181149 [details]
patch for jaxb core tests

patches for recommendations given in comment #5.
Comment 7 David Williams CLA 2010-10-19 00:17:33 EDT
(In reply to comment #4)
> Thanks for looking David.
> I believe that Dali tests are using the build script wtp-junit-tests.xml and
> not dali-junit-tests.xml?

Yes, when running tests, wtp-junit-tests.xml ... which wouldn't effect compile.
Comment 8 Tran Le CLA 2010-10-19 00:42:34 EDT
(In reply to comment #5)
> Are you really writing for 1.6, but targeting 1.5? 

We are requiring Java 6 uniquely to simplify our dependencies and avoid being dependent from external libraries.

I have committed your patch and released.
Thanks.
Comment 9 David Williams CLA 2010-10-19 01:18:50 EDT
I have found a hole in the  build scripts, for Java 6. I tracked down the "java.util.Iterator" compile errors specifically, and see that the "util" classes are now packaged in a java.util.jar in IBM's Java 6 SDK, where as in Java 5 SDK, it was in core.jar. So ... I have updated the JavaSE-1.6 classpath (used by compiler, during PDE build) to contain that jar as well). 

        <property
            name="JavaSE-1.6"
            value="${env.JAVA_6_HOME}/jre/lib/rt.jar:${env.JAVA_6_HOME}/jre/lib/vm.jar:${env.JAVA_6_HOME}/jre/lib/java.util.jar:${env.JAVA_6_HOME}/jre/lib/xml.jar:${env.JAVA_6_HOME}/jre/lib/graphics.jar:${env.JAVA_6_HOME}/jre/lib/server.jar:${env.JAVA_6_HOME}/jre/lib/ibmorbapi.jar:${env.JAVA_6_HOME}/jre/lib/security.jar:${env.JAVA_6_HOME}/jre/lib/ibmpkcs.jar:${env.JAVA_6_HOME}/jre/lib/ibmjcefw.jar"/>


And, before you ask :) ... I prefer to add jars as we discover we need them ... rather than just add them all ... otherwise, who knows what we are getting. 

Next build should be better ... but supposed we might discover some other jar is still missing.
Comment 10 David Williams CLA 2010-10-19 10:35:35 EDT
Created attachment 181185 [details]
tweak to test.xml

Now it all compiles, but tests don't run, failing with 
Class not found "org.eclipse.jpt.jaxb.core.tests.internal.resource.JaxbCoreResourceModelTests"
as I'm sure you've seen. 

The only thing I could see, was the test.xml file refers to the wrong plugin ... looks like a copy/paste error: 

    <property name="plugin-name" value="org.eclipse.jaxb.core.tests"/>

is missing "jpt"

    <property name="plugin-name" value="org.eclipse.jpt.jaxb.core.tests"/> 

Not sure how this gets used, exactly ... but, can imagine it might end up in a "class not found" error. 

Unfortunate there's not a better error message or validity check ... guess that'd be a good future enhancement (though, guess it'd be rarely encountered).
Comment 11 David Williams CLA 2010-10-19 10:42:39 EDT
Oh, funny thing ... I see the version released to the last build had
 
<property name="plugin-name" value="org.eclipse.jpt.core.tests"/>

So, looks like a attempt to correct that was released to HEAD this morning ... but HEAD still not quite right. 

Add Karen to CC (since history shows she's the one who made the change).
Comment 12 Karen Butzke CLA 2010-10-19 10:46:07 EDT
I checked in the change to fix it this morning, Tran is releasing
Comment 13 David Williams CLA 2010-10-19 11:40:02 EDT
(In reply to comment #12)
> I checked in the change to fix it this morning, Tran is releasing

Yes, but to be explicit, again, I think your fix was still missing 'jpt'. 
This morning you changed to 

    <property name="plugin-name" value="org.eclipse.jaxb.core.tests"/>

but needs a missing "jpt"

    <property name="plugin-name" value="org.eclipse.jpt.jaxb.core.tests"/>
Comment 14 Karen Butzke CLA 2010-10-19 12:04:45 EDT
Oh crap, I clearly wasn't reading carefully this morning. Sorry about that! Tran, will you release again?
Comment 15 Tran Le CLA 2010-10-19 12:39:49 EDT
I've just released.
David can you restart the current build please.
Thanks.
Comment 16 David Williams CLA 2010-10-19 14:44:29 EDT
(In reply to comment #15)
> I've just released.
> David can you restart the current build please.
> Thanks.

I did restart ... but not till about 2:30 ... so check back after dinner :) 

Thanks,
Comment 17 David Williams CLA 2010-10-20 02:10:35 EDT
I'm going to close this as fixed, since the tests are there, compiling, and running. 

I'm assuming that the fact that they all fail is a test case issue related to setup/teardown ... which the Dali team can handle by themselves ... but, feel free to reopen if there are still infrastructure problems. (Or, if you simply need help figuring out what's going wrong).