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

  • SEARCH
  • Home
  • 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 8593375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:58:29+00:00 2026-06-11T23:58:29+00:00

If got a Java library which other projects depend on (.jar dependancy through Maven).

  • 0

If got a Java library which other projects depend on (.jar dependancy through Maven). In this library there is an XSD-file which defines some xs:simpleTypes which are also annotated with xjc:javaType elements mapping the simple types to already existing java classes and adapter classes in that library. This all works fine, but now I wanted to create a xs:complexType. I let the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin version 0.8.2 create some java beans from the complex type and an addition .episode file.

In my second project I import the library, unpack the xsd file into a schema directory and let project2.xsd import the library.xsd, because it uses the simple and complex types. To avoid double generation of already existing beans, I added the libary as an depenancy in the episodes tag of the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin. But now the plugin complains that it can’t parse the xsd file and throws an exception on every type defintion line.

I presume there is some issue with using episodes (they don’t include simpleTypes?) and xjc:javaType annotations? Is there some kind of workaround to this problem? I can’t find much on the web regarding this issue. Grateful for any hint.

  • 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-06-11T23:58:30+00:00Added an answer on June 11, 2026 at 11:58 pm

    I’ve achieved the same thing by using maven-hyperjaxb3-plugin
    Check how is done:

                <plugin>
                    <groupId>org.jvnet.hyperjaxb3</groupId>
                    <artifactId>maven-hyperjaxb3-plugin</artifactId>
                    <version>0.5.4</version>
                    <executions>
                    <execution>
                        <id>id1</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <args>
                                <param>-npa</param>
                            </args>
                            <generateDirectory>target/generated-sources/xjc2</generateDirectory>
                            <generatePackage>com.target.package</generatePackage>
                            <extension>true</extension>
                            <schemaIncludes>
                                <include>mine.xsd</include>
                            </schemaIncludes>
                            <forceRegenerate>false</forceRegenerate>
                            <removeOldOutput>true</removeOldOutput>
                            <verbose>true</verbose>
                        </configuration>
                    </execution>
    </executions>
    <dependencies>
                        <dependency>
                            <groupId>com.sun.xml.bind</groupId>
                            <artifactId>jaxb-impl</artifactId>
                            <version>2.1.12</version>
                        </dependency>
                    </dependencies>
                </plugin>
    

    here are the project dependencies:

    <dependencies>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>2.1.12</version>
            </dependency>
    
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.1</version>
            </dependency>
    
            <dependency>
                <groupId>org.jvnet.hyperjaxb3</groupId>
                <artifactId>hyperjaxb3-ejb-runtime</artifactId>
                <version>0.3</version>
            </dependency>
    
            <!-- Roundtrip -->
            <dependency>
                <groupId>org.jvnet.hyperjaxb3</groupId>
                <artifactId>hyperjaxb3-ejb-roundtrip
                </artifactId>
                <version>0.3</version>
            </dependency>
        </dependencies>
    

    I have any kind of simple and complex types defined and it works like a charm.
    Hope it helps!

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

Sidebar

Related Questions

I got this Error when I run a java class which has an NLP
I'm attempting to write a small library which will convert Java objects, through reflection,
I use a Java library that has a .xml file embedded, and uses this
i got java.lang.NullPointerException by using CrudRepository my project looks like this: strut2 action service
I got a java class which is used to send SMS to a mobile
I've got a java server launched from a jar that uses log4j (RollingFile and
I've got a java application on a windows machine which pins the CPU from
So I've got some Java code that uses Jakarta HttpClient like this: URI aURI
I've got two Java projects, both generate Java classes based on a schema definition,
I've got a .so library compiled for Linux under the ELF format, which is

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.