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 6671075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:20:41+00:00 2026-05-26T03:20:41+00:00

I am using JiBX for XML-Java data binding. The current configuration generates classes pretty

  • 0

I am using JiBX for XML-Java data binding. The current configuration generates classes pretty well but I want these generated classes to implement java.io.Serializable.

Here is maven plugin configuration to generate java classes from given schema.

<plugin>
    <groupId>org.jibx</groupId>
    <artifactId>jibx-maven-plugin</artifactId>
    <version>1.2.3</version>
    <configuration>
        <schemaLocation>src/main/resources</schemaLocation>            
        <includeSchemas>
            <includeSchema>FS_OTA_VehResRS.xsd</includeSchema>
        </includeSchemas>
        <options>
            <package>com.test.cars.model.ota2009a.vehresrs</package>
        </options>
        <schemaBindingDirectory>src/main/java</schemaBindingDirectory>
        <includeSchemaBindings>
            <includeSchemaBinding>*_binding.xml</includeSchemaBinding>
        </includeSchemaBindings>
    </configuration>
    <executions>            
        <execution>
        <id>generate-java-code-from-schema</id>
        <goals>
            <goal>schema-codegen</goal>
        </goals>
        </execution>
        <execution>
        <id>compile-the-binding-</id>
        <goals>
            <goal>bind</goal>
        </goals>
        </execution>            
    </executions>
</plugin>

This link suggesting to use org.jibx.schema.codegen.extend.SerializableDecorator in order implement java.io.Serializable to all generated classes. But I don’t have idea how to write customization file and configure jibx-maven-plugin.

Can anyone please guide me to achieve this?

  • 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-26T03:20:41+00:00Added an answer on May 26, 2026 at 3:20 am

    I am able to get it.

    I created src/main/resources/schema-customizations.xml. The content of this custom config file is:

    <schema-set xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <class-decorator class="org.jibx.schema.codegen.extend.SerializableDecorator"/>
    </schema-set>
    

    Also modified pom.xml to add in customization configuration under <configuration>

    <customizations>
        <customization>src/main/resources/schema-customizations.xml</customization>
    </customizations>
    

    and run mvn jibx:schema-codegen

    Now all generated classes are implementing java.io.Serializable

    Thanks @SB

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

Sidebar

Related Questions

I am using JibX as a Java Object to XML Binding tool. With it,
How can I keep my using interfaces in classes I want to use JiBX
I have a XML schema that I will need to create Java classes for.
We're using jibx for our configurations and everything works well so far. I'd like
I'm using jibx to create a xml. the requirement i have is to get
I'm useing JiBX to marshall some Classes. It works well, until i get a
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using jQuery, what's the best way to automatically initialize a plugin on all current
Using the variables extension, I want to change the background color of a cell
I need to generate a number of XML documents from Java objects. The objects

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.