Use an alternative Maven Profile during test phase

前端 未结 2 1065
再見小時候
再見小時候 2021-02-11 02:06

I\'m trying to build an application starting from an Appfuse Archetype, but I get some strange problems. For once I\'d like to use a hsqldb for automated unit tests and integrat

2条回答
  •  无人及你
    2021-02-11 02:16

    I'm not sure if this is exactly what you are asking for, but you can do the following to setup multiple filters for your Maven project.

    
      /your/path/filter-${env}.properties
    
    

    This way you can setup multiple profiles using:

    
      
        local
        
          local
        
      
      
        test
        
          test
        
      
    
    

    You can then run the build with the relevant property file using:

    mvn -P 
    

    This would require having property files located at:

    /your/path/filter-local.properties
    /your/path/filter-test.properties
    

提交回复
热议问题