This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125089 - junit-tests in freeform project
Summary: junit-tests in freeform project
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Web Opener (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-11 07:41 UTC by mikbra
Modified: 2008-01-11 13:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mikbra 2008-01-11 07:41:57 UTC
I have a freeform java project with source and test (junit) packages. In order to make junit stuff work (e.g. java file popup->Tools->Create JUnit Tests) I 
have to put at <unit-tests> tag in the <compilation-unit> tag for the test package. This works fine, even though the schema says that no such tag should 
exist there. This also makes the "test" folder appear as a test package (instead of a source package) in the project properties. However everytime I open the 
project NetBeans complains about this illegal tag.

I think unit-tests for freeform java projects is broken someway. 


-- Snippet from my project.xml file: ---
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
            <compilation-unit>
                <package-root>${src.dir}</package-root>
                <classpath mode="compile">...</classpath>
                <built-to>${build.classes.dir}</built-to>
                <source-level>1.5</source-level>
            </compilation-unit>
            <compilation-unit>
                <package-root>${test.src.dir}</package-root>
                <unit-tests/>
                <classpath mode="compile">...</classpath>
                <built-to>${build.test.classes.dir}</built-to>
                <source-level>1.5</source-level>
            </compilation-unit>
        </java-data>

--- The error message when opening the project ---
cvc-complex-type.2.4.a: Invalid content was found starting with element 'unit-tests'. One of '{"http://www.netbeans.org/ns/freeform-project-
java/1":package-root, "http://www.netbeans.org/ns/freeform-project-java/1":classpath, "http://www.netbeans.org/ns/freeform-project-java/1":built-to, 
"http://www.netbeans.org/ns/freeform-project-java/1":source-level}' is expected.
Comment 1 Milan Kubec 2008-01-11 13:14:50 UTC
You need to use different version of freeform-project-java xsd, try:

<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">