Plugin execution not covered by lifecycle configuration

14,766

This should be resolved with maven-jaxb2-plugin 0.8.1 and m2e 1.1.

Share:
14,766

Related videos on Youtube

Dhruv
Author by

Dhruv

New to java world and finding it to be awesome :)

Updated on June 04, 2022

Comments

  • Dhruv
    Dhruv almost 2 years

    I am newbiee to maven. I am trying to add JAXB2 plugin and dependencies to generate xml files from xsd. When I add underneath dependencies then a error is thrown under markers:-

    Plugin execution not covered by lifecycle configuration: org.jvnet.jaxb2.maven2: maven-jaxb2-plugin:0.7.4:generate(execution: default, phase: generate-sources)

    The error is marked over tag in jaxb2 plugin. I added this tag in reference to solutions over internet, but nothing works.

    My pom.xml looks like this:-

     <build>
        <finalName>PatternsWebapp</finalName>
    
        <defaultGoal>install</defaultGoal>
    
        <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.appfuse.plugins
                                        </groupId>
                                        <artifactId>
                                            maven-warpath-plugin
                                        </artifactId>
                                        <versionRange>
                                            [2.1.0,)
                                        </versionRange>
                                        <goals>
                                            <goal>add-classes</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                      <execution></execution>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    
    
    
        <plugins>
      <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.7.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <verbose>true</verbose>
                    <schemaDirectory>src/main/resources</schemaDirectory>
                    <generatePackage>com.webapp.xml</generatePackage>
                </configuration>
            </plugin>
    
        <plugin>
                    <inherited>true</inherited>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
    
    
        </plugins>
    
    
      </build>
    
    • Dhruv
      Dhruv about 12 years
      hey guys, I got the solution to this problem. I just need to add m2e plugin for jaxb and that error is resolved.
  • Dhruv
    Dhruv about 12 years
    :Thanks for reply. But I resolved this problem by installing m2e connector for JAXB2 in eclipse from windows --> preference --> maven -->Discovery --> click "open catalog" --> install m2e connector for JAXB2
  • lexicore
    lexicore about 12 years
    Yes, what I'm saying is that with newer versions you should no longer need this.
  • Albert Cheng
    Albert Cheng almost 11 years
    m2e connector for JAXB2 is no longer available actually!