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 242181 - XMLSchema Code Completion use catalog/schema loaded from classpath (Maven dependency)
Summary: XMLSchema Code Completion use catalog/schema loaded from classpath (Maven dep...
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Catalog (show other bugs)
Version: 8.0
Hardware: PC Other
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 06:49 UTC by eolivelli
Modified: 2015-04-07 11:05 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 eolivelli 2014-02-21 06:49:53 UTC
I would like that XML code complation could take in consideration catalogs/xml schema which are bundled in Maven dependencies

Actually you have to register your schema using the IDE functions

In my projects I use a lot of custom xml with schemas, when I distribute my Jars my clients have to register manually the schema in the IDE, if Netbeans could load catalogs directly from the classpath (or explicilty Maven deps) It would be a great enhancement

Reference
http://wiki.netbeans.org/SchemaAwareCodeCompletion

I known that developing a nb module I could deploy a catalog to the user platform, but I do not want to create nor a dev environment for a NB Module neither the infrastructure for the distribution of the module to my clients

thanks
Comment 1 Svata Dedic 2015-04-07 09:10:22 UTC
Is there some 'standard' or widely used way how XSDs are distributed in JAR ? Some defined location, entry(ies) in MANIFEST ... ? Sorry :) I am not aware of such packaging; if it exists, please provide links to specs.
Comment 2 eolivelli 2015-04-07 11:05:59 UTC
Honestly I'm not aware of a standard way of packaging XSDs in JAR files.
Maybe the simplest solution would be to look for them inside the root directory of the jar, or inside META-INF directory.
Nowadays we distribute them inside the META-INF directory, because in that directory are usually put configuration descriptors of beans, and it is very simple to provide references to XSD files inside the same directory

something like this

META-INF/magnews-app-schema.xsd

META-INF/magnews-app.xml    --> referes to  myschema.xsd

<app xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:noNamespaceSchemaLocation='magnews-app-schema.xsd'>
....
</app>