Setting default values for custom Maven 2 properties

前端 未结 6 1811
误落风尘
误落风尘 2020-12-01 03:05

I have a Maven pom.xml with a plugin that I want to be able to control on the command line. Everything works otherwise fine, except even after searching the net a while I ca

6条回答
  •  庸人自扰
    2020-12-01 03:46

    I took sal's approach but flatten it a bit.

    
      
        default
        
          true
        
        
         
           
            LATEST
           
         
        
      
    
    

    Now you have 2 options:

    1. Using default value: MVN install (all $version will be replaced with LATEST)

    2. Using own value: MVN install -P! Default -Dversion=0.9 (all $version will be 0.9)

提交回复
热议问题