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 173708 - XML Schema creation wizard in Maven projects
Summary: XML Schema creation wizard in Maven projects
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Schema (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-04 15:32 UTC by sgtgarcia
Modified: 2009-11-16 06:30 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sgtgarcia 2009-10-04 15:32:49 UTC
In a Maven project
1) New File
2) Select type XML then XML Schema

In the location combo box, you can select Source packages (src/main/java) and Test packages (src/test/java).
XML Schemas are Usually located in src/main/resources or src/main/xsd or src/test/resources but not src/???/java.
Comment 1 ledj56 2009-11-15 12:53:21 UTC
Actually, to provide a clean support to the Contract-First approach, one should be able to create and edit any xsd or wsdl document at any location on the file system. This would support the Contract Centralization and Schema Centralization design pattern in a totally vendor-neutral fashion.

It is then easy to use the "Generate service from WSDL" wizard to create a service based on a designed contract.
Comment 2 sgtgarcia 2009-11-16 00:15:11 UTC
ledi56, I don't understand your comment. 

We are using XSD/WSDL plugin to edit XSD (XML Contract), then they are compiled with Maven JAXB plugin (Java Contract). This Maven plugin expects XSD to be located in src/main/xsd, and generated Java classes go to target/classes folder.

Once the Java Contract is generated we can start implementing the business services using it.
Comment 3 ledj56 2009-11-16 06:30:24 UTC
Suppose that we have a generic data information model that represents a business vocabulary that is used by all services within a service inventory. This model is composed of multiple .xsd and located somewhere in the file system as it is shared by many specific service project. If I want to use the Netbeans XSD plugin to edit these schemas, I have to a) create a phony project, b)create a symbolic link in resources to the global schema repository, c) create an .xsd in some package,  d) move that .xsd in the global repo through the symlink, e) etc. All this because the xsd creation wizard assumes that .xsd's should belong to a specific project and that they automatically must end up in a (java) package or even a jar within the project.

As for wsdl, I agree that they belong to a specific project and that we can use a catalog to reference the above mentionned global model schemas.

I realize that my first post was not enough specific and that instead of "Contract First", I should have said "Common Data Model". What I want to do is create any type of XML (WSDL, XSD, etc) and put them anywhere in the file system without the wizard assuming where it should go. 

I am currently doing some prototyping with NB and Maven to find the best way to support this approach.