Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6186639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:55:25+00:00 2026-05-24T01:55:25+00:00

jaxb2-maven-plugin 1.3 skips an attribute from an object. I cannot modify the XSD .

  • 0

jaxb2-maven-plugin 1.3 skips an attribute from an object. I cannot modify the XSD. In the XSD (fragment):

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="classA" type="classA" substitutionGroup="classSubA"/>

    <xs:complexType name="complexClassA" mixed="true">

    <xs:attribute name="attA">
        <xs:annotation>
            <xs:appinfo>
                <moProperty value="classA:attA"/>
                <label value="Attribute A" default="true"/>
                <externAccess value="readWrite"/>
            <description value="NO COMMENTS"/>
        </xs:appinfo>
    </xs:annotation>
    <xs:simpleType>
        <xs:restriction base="xs:string">
            <xs:enumeration value="off"/>
            <xs:enumeration value="on"/>
        </xs:restriction>
    </xs:simpleType>
</xs:attribute>

<xs:attribute name="id" type="xs:unsignedInt">
    <xs:annotation>
        <xs:appinfo>
            <moProperty value="myClassB:id"/>
            <label value="Id" default="true"/>
            <externAccess value="readWrite"/>
            <description value="NO COMMENTS"/>
        </xs:appinfo>
    </xs:annotation>
</xs:attribute>
</xs:schema>

The Resulting Java Object (fragment):

public class ComplexClassA {
    @XmlSchemaType(name = "unsignedInt")
    protected Long id;
}

Why it is not generating the attA member?

Might it be cause the inline enumeration?

Thank you.

Udo.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:55:25+00:00Added an answer on May 24, 2026 at 1:55 am

    After going to

    org.jvnet.jaxb2.maven2
    maven-jaxb2-plugin

    Everything is working fine.

    Thank you for your time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to generate beans from an xsd by using the jaxb2-maven-plugin maven plugin,
Example: </plugin> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.7.1</version> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration>
im using maven-jaxb2-plugin to generate from a 1.0xsd file: <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <executions> <execution>
I'm switching from Castor to JAXB2 to perform marshaling/unmarshaling between XML and Java object.
I have a Maven project that uses the jaxb2-maven-plugin to compile some xsd files.
I have this Maven task to generate Java classes from an XSD file using
in my pom.xml I've configured maven-jaxb-plugin but I'm getting a A required plugin was
I am using JAXB2 to serialize object to xml. Is there any way how
In Java, we work a lot with JAXB2. Object<->XML mappings are defined as annotations
I'd like to generate Java source code from an XML Schema file using JAXB2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.