Thanks, that would be a good work around.

It stills feels a bit strange though, that profiles allow you to add and modify plugins, but AFAIK not remove plugins from the build.

[EMAIL PROTECTED] wrote:
Could you not use:

<profiles>
  <profile>
    <activation>
      <property>
        <name>webstart</name>
        <value>true</value>
      </property>
    </activation>
    ...
  </profile>
</profiles>


with

<properties>
        <webstart>true</webstart>
</properties>

in your pom.xml (or settings.xml). And then use:

mvn install -Dwebstart=false

to disable the profile activation?


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Geoffrey De Smet
Sent: 17 August 2006 09:13
To: users@maven.apache.org
Subject: Profile which removes a plugin execution from the build


My pom contains the webstart plugin which executes on "mvn install" and signs all dependencies:


     <build>
         <plugins>
         </plugins>
         <pluginManagement>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>webstart-maven-plugin</artifactId>
                     <executions>
                         <execution>
                             <goals>
                                 <goal>jnlp</goal>
                             </goals>
                         </execution>
                     </executions>
                     <configuration>
                         ...
                     </configuration>
                 </plugin>
                 ...

Now I 'd like to create a profile "fast", which doesn't execute the webstart-maven-plugin. If I modify the pom and remove the <executions> entity, "mvn install" doesn't do the webstart-maven-plugin (good). But when I add this to the above pom, "mvn -Pfast install" does do the webstart-maven-plugin (bad):

     <profiles>
         <profile>
             <id>fast</id>
             <build>
                 <pluginManagement>
                     <plugins>
                         <plugin>
                             <groupId>org.codehaus.mojo</groupId>
                             <artifactId>webstart-maven-plugin</artifactId>
                             <executions>
                                 <!-- Do not execute -->
                             </executions>
                         </plugin>
                     </plugins>
                 </pluginManagement>
             </build>
         </profile>
     </profiles>

Is there any way to turn of a plugin execution by using a profile?


--
With kind regards,
Geoffrey De Smet


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to