How do I disable the maven-compiler-plugin?

前端 未结 4 2048
南笙
南笙 2021-01-03 20:53

I have a maven project that uses the aspectj-compiler-plugin. I use intertype declarations so there are references to Aspect code in my Java code. Because of this, the mav

4条回答
  •  不知归路
    2021-01-03 21:12

    In Maven 3, the following will do this, for example disabling the clean plugin:

       
          
             
                maven-clean-plugin
                2.4.1
                
                   
                      default-clean
                      none
                   
                
             
          
       
    

    The same technique can be used for any other plugin defined in the super-POM, the packaging type, or the parent POM. The key point is that you must copy the shown by help:effective-pom, and change the to an invalid value (e.g. "none"). If you don't have the (as e.g. in Jintian DENG's original answer – it has since been edited to add one), it will not work, as you have discovered.

提交回复
热议问题