I am unable to build my application because of the syntax in the package-info.java file. The sample below is just a demo but any sample I try gives me the syntax errors I would expect since I'm placing code before the package and imports. How exactly are you suppose to get this to work if the syntax below is what is actually suppose to go into package-info.java?
Update: Another way to ask this question is, shouldn't the annotation go at the bottom? My compiler, IntelliJ, certainly things so...
@XmlSchema(
elementFormDefault=XmlNsForm.QUALIFIED,
namespace="http://www.example.com/FOO",
xmlns={@XmlNs(prefix="bar",
namespaceURI="http://www.example.com/BAR")}
)
package blog.prefix;
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
The problem was my IDE. For this to work in IntelliJ you must disable "Optimize Imports".