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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:53:52+00:00 2026-05-15T12:53:52+00:00

There is a top level pom.xml which calls two sub modules as below: <modules>

  • 0

There is a top level pom.xml which calls two sub modules as below:

<modules>
        <module>module1</module>
        <module>module2</module>        
</modules>

Where module2 is dependent on module1

The xjc plugin configuration in module1 pom.xml is as below:

  <build>
    <plugins>
            <plugin>
                <groupId>com.sun.tools.xjc.maven2</groupId>
                <artifactId>maven-jaxb-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <strict>false</strict>
                    <extension>true</extension>
                    <verbose>true</verbose>
                </configuration>               
            </plugin>
    </plugins>
  </build>

The xjc configuration in module2’s pom.xml is as below:

      <build>
        <plugins>
               <plugin>
                    <groupId>com.sun.tools.xjc.maven2</groupId>
                    <artifactId>maven-jaxb-plugin</artifactId>
                <dependencies>
                   <dependency>
                      <groupId>com.mycompany.module1</groupId>
                      <artifactId>module1</artifactId>
                      <version>1.0</version>
                      <scope>runtime</scope>
                   </dependency>
                </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                <includeSchemas>
                  <includeSchema>schema.xsd</includeSchema>
                </includeSchemas>
                <includeBindings>
                  <includeBinding>bindings.xjb</includeBinding>
                </includeBindings>      
                        <strict>false</strict>
                        <extension>true</extension>
                        <verbose>true</verbose>
                        <args>-Xpdm</args>                                      
                    </configuration>                 
                </plugin>
        </plugins>
  </build>

Now when I run mvn from top level directory then module2 build fails, I get the below error:

[INFO] unrecognized parameter -Xpdm
[INFO] ------------------------------------------------------------------------
[INFO] Trace
unrecognized parameter -Xpdm
        at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:446)
        at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:434)

The reason for this error was because module1 dependency was not used while XJC plugin execution during module2 build.

My question: why module2’s xjc plugin configuration did not come into effect?

When I run mvn in module2 directory it works fine but from top level directory it fails.

Any help, what I am missing at?

  • 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-15T12:53:53+00:00Added an answer on May 15, 2026 at 12:53 pm

    It is a limitation/bug of Maven 2.x, where all executions of a
    plugin in a multi-module project has the same classpath. It has been fixed
    in Maven 3 (since one of the alphas).

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

Sidebar

Related Questions

There is a top-level template in my project and it defines several sub-templates nested
According to http://docs.oracle.com/javase/tutorial/collections/interfaces/index.html there are two top level interfaces called collection and map. Whats
Is there a way to get the top level container of a component? For
Hi all I was wondering if there is anyway to export top level classes
I'm attempting to remove a top level tree widget item if there are no
I'm looking to create a top-level horizontal menu, with a second-level horizontal menu below
I have a top level Verilog module that instantiates a VHDL block with a
I created a new module and a new top level menu item in the
Is there a way I can get a top level application in ActionScript like
I have a top level container (JFrame) that contains two JPanels. One of the

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.