Is there any way to use a substring of a property for profile activation in
Maven? I'm looking to use Jenkins to simply pass the branch name to my
build, and have a profile activated if it is a release/* branch.

Is there any way I can do parameter manipulation/regex like this for
profile activation? Ex:

  <profiles>
    <profile>
      <id>appserverConfig-dev</id>
      <activation>
        <property>
          <name>branch</name>

          <!-- some form of wildcarding or regex on the parameter value ??? -->
          <value>release/.*</value>
        </property>
      </activation>
      <properties>
        <appserver.home>/path/to/dev/appserver</appserver.home>
      </properties>
    </profile>
   </profiles>

Or is there a different/better approach that I can use to only activate the
profile if the build is coming from a release branch?


Thanks


Eric

Reply via email to