Activating a profile by default

后端 未结 2 1310
伪装坚强ぢ
伪装坚强ぢ 2021-02-12 17:55

I\'m using Maven 3.0.3. I need to define a variable in my script (\"env\"). I have a section in my pom in which I define the variable per &

相关标签:
2条回答
  • 2021-02-12 18:17

    I know it was a long time ago, but I had this problem just now, so... You should do that:

    <profile>
        <id>dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <env>dev</env>
            <url>http://localhost:8080/manager</url>
            <server>nnadbmon-dev-tomcat</server>
        </properties>
    </profile>
    
    0 讨论(0)
  • 2021-02-12 18:34

    The documentation for what I think you want is http://maven.apache.org/pom.html#Activation

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