Diego Macario
Diego Macario

Reputation: 1230

There is other way to don´t repeat package-info in Jaxb in every package?

I have a project that extract the source of the xml, and I did a structure with packages in my Java project to identify the level of each element, so I repeated every package the file package-info with this code:

@XmlSchema(namespace = "http://www.portalfiscal.inf.br/nfe", elementFormDefault = XmlNsForm.QUALIFIED)
package com.nfehost.service.processadora.nfeproc;

import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;

So I want to know if there is one way to don´t repeat these files, and make a global file or use a annotattion or other thing to don´t repeat these files.

Thanks

Upvotes: 2

Views: 172

Answers (1)

bdoughan
bdoughan

Reputation: 149037

The largest scope that metadata can be applied in JAXB (JSR-222). This means you will need to repeat that metadata per package.

Upvotes: 1

Related Questions