We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the following snippet in my xsd file. I would expect that it generates a Java Enum with the two elements STANDALONE and CONNECTED.
<xs:attribute name="Sample"> <xs:annotation> <xs:documentation>A sample</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="Standalone"/> <xs:enumeration value="Connected"/> </xs:restriction> </xs:simpleType> </xs:attribute>
I'm using jaxb2-maven-plugin version 3.1.0
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution> <id>gen-infrastructure</id> <goals> <goal>xjc</goal> <!-- Generates Java sources from XML Schema(s). --> </goals> <configuration> <locale>en,US</locale> <xjbSources> <xjbSource>src/main/resources/schema/xsd/sample.xjb</xjbSource> </xjbSources> <sources> <source>src/main/resources/schema/xsd/sample.xsd</source> </sources> <!-- The package of your generated sources --> <packageName>com.company.sample.model.pojos</packageName> </configuration> </execution> </executions> <configuration> <noGeneratedHeaderComments>true</noGeneratedHeaderComments> <clearOutputDir>false</clearOutputDir> </configuration> </plugin>
The text was updated successfully, but these errors were encountered:
I faced the same issue. The following schema changes solved my issue:
xmlns:jaxb="http//java.sun.com/xml/ns/jaxb"
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
jaxb:version=2.0
jaxb:version=3.0
Sorry, something went wrong.
@tstuber Does not change anything for me
No branches or pull requests
I have the following snippet in my xsd file. I would expect that it generates a Java Enum with the two elements STANDALONE and CONNECTED.
I'm using jaxb2-maven-plugin version 3.1.0
The text was updated successfully, but these errors were encountered: