maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: Profile Activation
Date Mon, 15 Aug 2016 18:45:02 GMT
If there could be "AND" and "OR" primitives for profile activation
conditions, you could do something like:

       <or>
         <property>
           <name>!profilea</name>
         </property>
         <property>
           <name>profilea</name>
           <value>!true</value>
         </property>
       </or>

Sadly, this feature does not exist.

On Fri, Aug 12, 2016, 11:45 Karl Heinz Marbaise <khmarbaise@gmx.de> wrote:

> Hi to all,
>
> I have the following profile:
>
>
>    <profile>
>        <id>profile-not-value-true</id>
>        <activation>
>          <property>
>            <name>profilea</name>
>            <value>!true</value>
>          </property>
>        </activation>
>        <build>
>          <plugins>
>            <plugin>
>              <groupId>com.soebes.maven.plugins</groupId>
>              <artifactId>echo-maven-plugin</artifactId>
>              <executions>
>                <execution>
>                  <phase>initialize</phase>
>                  <goals>
>                    <goal>echo</goal>
>                  </goals>
>                </execution>
>              </executions>
>              <configuration>
>                <echos>
>                  <echo>profile not value true</echo>
>                </echos>
>              </configuration>
>            </plugin>
>          </plugins>
>        </build>
>      </profile>
>
> So the question is: What would you expect you need to do to activate
> this profile?
>
> Currently this profile is activated cause if I don't define the property
> "profilea" at all it seemed to that Maven is assuming this means "not
> value 'true'" ?
>
> I have assumed it should be activated if the property exists which means
> giving it on command line like this:
>
> mvn -Dprofilea
>
>
>
> WDYT ?
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message