Eclipse loops endlessly: Invoking 'Maven Project Builder'

后端 未结 18 1126
遇见更好的自我
遇见更好的自我 2021-02-02 05:56

Ugh! My Eclipse is stuck in an endless loop:

  • No operations to display at this time
  • Refreshing Workspace Building
  • Workspace. Invoking \'Maven Pro
18条回答
  •  Happy的楠姐
    2021-02-02 06:28

    The problem can be a code generating plugin like the openapi-generator-maven-plugin or the protoc-jar-maven-plugin. Such plugins are generating code that retriggers the eclipse compilation. A solution to prevent this behavior could be to disable the plugin for the Eclipse "Maven Project Builder". This can be done by adding an entry to the pom.xml like described here: https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html

    
        
            
                org.eclipse.m2e
                lifecycle-mapping
                1.0.0
                
                    
                        
                            
                        
                    
                
            
        
    
    

    Such Plugin configuration could look like similar to the following example:

    
      
        org.openapitools
        openapi-generator-maven-plugin
        [0.0,)
        
          generate
        
      
      
        
      
    
    

    Alternatively such settings could be done globally for a eclipse workspace: Window > Preferences > Maven > Lifecycle Mappings. More about this topic can be read here: https://www.benchresources.net/eclipse-maven-plugin-execution-not-covered-by-lifecycle-configuration/

提交回复
热议问题