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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:54:08+00:00 2026-05-25T18:54:08+00:00

I am trying to use jibx-maven plugin 1.2.3 for generating Java Source Code from

  • 0

I am trying to use jibx-maven plugin 1.2.3 for generating Java Source Code from a Schema file.

Following is the plugin config in my pom.xml

<build>
<plugins>
    <!--
         To use the JiBX Maven Plugin in your project you have to add it 
         to the plugins section of your POM. 
     -->
    <plugin>
        <groupId>org.jibx</groupId>
        <artifactId>jibx-maven-plugin</artifactId>
        <version>1.2.3</version>
        <executions>
           <execution>
                <goals>
                  <goal>schema-codegen</goal>
                </goals>
                <configuration>
                   <schemaLocation>src/main/resources</schemaLocation>
                   <options>
                       <package>com.poc.jibx</package>
                   </options>
                </configuration>
           </execution>
        </executions>
    </plugin>
</plugins>
 </build>

When I try to run the goal using command: mvn jibx:schema-codegen

I get the following output

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jibx-sample 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- jibx-maven-plugin:1.2.3:schema-codegen (default-cli) @ jibx-sample ---
[INFO] Generating Java sources in target/generated-sources from schemas available in src/main/config...
Loaded and validated 0 specified schema(s)
Total classes in model: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.691s
[INFO] Finished at: Thu Sep 22 20:11:33 IST 2011
[INFO] Final Memory: 6M/71M
[INFO] ------------------------------------------------------------------------

As can be seen in the output the default schema location is being searched for i.e. src/main/config instead of my the configured location src/main/resources.

I came across the following JIRA which says the the above plugin config is appropriate and should work prefectly.
http://jira.codehaus.org/browse/JIBX-450

However it is not working in my case.Am I missing anything else for making this work?

Thanks,
Jignesh

  • 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-25T18:54:09+00:00Added an answer on May 25, 2026 at 6:54 pm

    Jignesh,

    Actually, your first pom should have worked fine. khmarbaise is correct, it is considered good practice to place your schema definitions in the /src/main/config directory and make sure they have an .xsd extension.

    Here is a corrected project file. I am using your schema location. Note the OSGi bundle packaging. This will work fine for non-OSGi projects, and your project is ready to go when you start using OSGi.

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.poc.jibx</groupId>
        <artifactId>test</artifactId>
        <version>0.0.1</version>
        <packaging>bundle</packaging>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.jibx</groupId>
                    <artifactId>jibx-maven-plugin</artifactId>
                    <version>1.2.3</version>
    
                    <executions>
                        <execution>
                            <id>generate-java-code-from-schema</id>
                            <goals>
                                <goal>schema-codegen</goal>
                            </goals>
                            <configuration>
                                <schemaLocation>src/main/resources</schemaLocation>
                                <options>
                                    <package>com.poc.jibx</package>
                                </options>
                            </configuration>
                        </execution>
                        <execution>
                            <id>compile-binding</id>
                            <goals>
                                <goal>bind</goal>
                            </goals>
                            <configuration>
                                <schemaBindingDirectory>target/generated-sources</schemaBindingDirectory>
                                <includes>
                                    <include>binding.xml</include>
                                </includes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Include-Resource>META-INF/binding.xml=${basedir}/target/generated-sources/binding.xml</Include-Resource>
                            <Export-Package>com.poc.jibx.*;version=${project.version}</Export-Package>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
        <dependencies>
            <dependency>
                <groupId>org.jibx</groupId>
                <artifactId>jibx-run</artifactId>
                <version>1.2.3</version>
            </dependency>
            <dependency>
                <groupId>org.jibx</groupId>
                <artifactId>jibx-extras</artifactId>
                <version>1.2.3</version>
            </dependency>
        </dependencies>
    
    </project>
    

    Good luck!

    Don
    jibx-maven-plugin project contributor

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

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
Trying to use Excel VBA to capture all the file attributes from files on
Im trying to use my web Config files in Silverlight. I've put the following
I trying to use ImageInfo and Jython to get information from a image on
I'm trying to use jQuery to format code blocks, specifically to add a <pre>
I'm trying to use the Optiflag package in my Ruby code and whenever I
I am trying use the jQuery table sorter plugin for a table that is
I am trying use a Java Uploader in a ROR app (for its ease
I revieving the following error when trying use mysql_real_escape() function Fatal error: Call to
Trying to use make from cygwin using g++ I was getting Access Denied error

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.