How do I start Maven “compile” goal on save in Eclipse?

前端 未结 2 1113
予麋鹿
予麋鹿 2020-12-02 13:30

I have a Maven project with JavaScript code. There is a special javascript compiler plugin connected to the compile goal in the pom.xml. So when I type \"mvn compile\" then

2条回答
  •  囚心锁ツ
    2020-12-02 14:00

    since @pascal-thivent answer is outdated (as mentioned in the comments) and hinted by @akostadinov https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html :

    You have to add a valid maven lifecycle action

    Example for a jar which is automatically deployed locally by maven install plugin:

    
        
    
        
            
                
                    org.eclipse.m2e
                    lifecycle-mapping
                    1.0.0
                    
                        
                            
    
                                
                                    
                                        org.apache.maven.plugins
                                        maven-jar-plugin
                                        [2.0,)
                                        
                                            jar
                                        
                                    
                                    
                                        
                                            true
                                            true
                                        
                                    
                                
    
                                
                                    
                                        org.apache.maven.plugins
                                        maven-install-plugin
                                        [2.5.0,)
                                        
                                            install
                                        
                                    
                                    
                                        
                                            true
                                            true
                                        
                                    
                                
    
                            
                        
                    
                
            
        
    
    

    Hint: relates to Maven Project Builder is invoked every time I change a source file (GWT) and as a warning: install typically includes tests if you have included them in your normal maven build cycle

提交回复
热议问题