Can I tailor a maven build based on platform?

前端 未结 1 812
情深已故
情深已故 2020-12-12 03:37

Specifically, I run the launch4j-maven-plugin plugin to generate me an .exe file. This only works on Windows, so I was wondering if I could \'opt-o

1条回答
  •  温柔的废话
    2020-12-12 04:24

    You can wrap that plugin under separate build profile and just enable that profile on the build that you want

    For example:

    
      ...
    
    generate-exe
      
        
          
            
          
          ...
        
      
    
      ...
    
    

    Now pass parameter while launching maven to specify profile

    For example:

    mvn clean install -Pgenerate-exe
    

    0 讨论(0)
提交回复
热议问题