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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:07:11+00:00 2026-06-10T10:07:11+00:00

I am using using the jaxb2 xjc plugin for generating java files from a

  • 0

I am using using the jaxb2 xjc plugin for generating java files from a XSD. Therefore I used to configure my pom.xml as follows:

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxb2-maven-plugin</artifactId>
            <version>1.3</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>xjc</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <packageName>com.mypackage.model</packageName>
                <schemaDirectory>${basedir}/src/main/resources/XSD</schemaDirectory>
            </configuration>
        </plugin>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
               <source>1.6</source>
               <target>1.6</target>
           </configuration>
       </plugin>
    </plugins>
</build>

I changed my developing environment to Eclipse Indigo and this does not work any more. The error says: “Plugin execution not covered by lifecycle configuration”. I understand I have to define the execution of my plugin differently so that it works in my new environment.

I followed the instructions on this page M2E plugin execution not covered but the source files are not generated when executing the generate-sources phase.

Could anybody show me how to exactly refactor my pom so that my files are properly generated?

Thanks for helping!

  • 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-10T10:07:13+00:00Added an answer on June 10, 2026 at 10:07 am

    It turns out that I did eventually find an answer! Eclipse’s integration with Maven has known compatibility issues with numerous Maven plugins.

    When you can successfully run a Maven build from the command-line outside of Eclipse, yet but Eclipse shows “execution not covered” errors in your POM, then try adding this plugin:

    <build>
        ...
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>jaxb2-maven-plugin</artifactId>
                                        <versionRange>[1.3,)</versionRange>
                                        <goals>
                                            <goal>xjc</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    

    As indicated in the above comment, this plugin doesn’t do anything outside of Eclipse. It simply tells Eclipse when to execute the JAXB plugin, since Eclipse isn’t smart enough to figure that out on its own.

    I found this snippet on another StackOverflow question, and adopted it to the “jaxb2-maven-plugin” plugin rather than the plugin at issue in the the other question.

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

Sidebar

Related Questions

I am working on generating Java objects from an XSD file using JAXB 2.1.
I'm generating Java classes from a WSDL using the jaxws-maven-plugin's wsimport goal. Out of
The code I'm working on is using jaxb2-maven-plugin from org.codehaus.mojo to generate Java classes
I want to generate java code from xsd using JAXB 2.1 XJC. I have
When generating Java from an XSD via the XJC compiler, I always get the
I'm trying to generate beans from an xsd by using the jaxb2-maven-plugin maven plugin,
I'd like to generate Java source code from an XML Schema file using JAXB2
I'm using the maven jaxb2 plugin to generate Java classes, built from schemas in
I generate XML using JAXB2 for an standalone java app that uses maven 3,
I'm using jaxb to generate java object class from xml schemas within an Ant

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.