Maven JAXB2 XJC plugin: M2E plugin execution not covered

前端 未结 3 837
小鲜肉
小鲜肉 2021-02-02 01:32

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:



        
3条回答
  •  梦毁少年i
    2021-02-02 01:40

    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:

    
        ...
        
            
                
                
                    org.eclipse.m2e
                    lifecycle-mapping
                    1.0.0
                    
                        
                            
                                
                                    
                                        org.codehaus.mojo
                                        jaxb2-maven-plugin
                                        [1.3,)
                                        
                                            xjc
                                        
                                    
                                    
                                        
                                    
                                
                            
                        
                    
                
            
        
    
    

    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.

提交回复
热议问题