You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MartinAhrer <ma...@gmx.at> on 2006/12/02 13:57:51 UTC

How to disable a goal

I have a parent POM using the <pluginManagement> element for configuring
plugins for sub modules. The plugin configuration contains instructions for
which goals to execute.

The parent POM is supposed to use the same plugin. Therefore I have added
the plugin to the <plugins> element as well. But for the parent it should
only execute a sub set of the goals that were defined in the
<pluginManagement>. Here I want to "disable" the execution with id "mkdir".
I have tried to re define the execution with an empty <goals> element - with
no success, it keeps executing all of the goals!

So my question: is there a concept for disabling executions/goals??

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>GROUP</groupId>
					<artifactId>ftp-plugin</artifactId>
					<version>1.0</version>
					<executions>
						<execution>
							<id>mkdir</id>
							<phase>deploy</phase>
							<goals>
								<goal>mkdir</goal>
							</goals>
						</execution>
						<execution>
							<id>put</id>
							<phase>deploy</phase>
							<goals>
								<goal>put</goal>
							</goals>
						
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>GROUP</groupId>
				<artifactId>ftp-plugin</artifactId>
				<version>1.0</version>
				<executions>
					<execution>
						<id>mkdir</id>
						<phase>deploy</phase>
						<goals></goals>
					</execution>
					<execution>
						<id>put</id>
						<phase>deploy</phase>
						<goals>
							<goal>put</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
-- 
View this message in context: http://www.nabble.com/How-to-disable-a-goal-tf2742921s177.html#a7653081
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to disable a goal

Posted by Aaron Digulla <di...@hepe.com>.

MartinAhrer wrote:
> 
> I have a parent POM using the <pluginManagement> element for configuring
> plugins for sub modules. The plugin configuration contains instructions
> for which goals to execute.
> 

Maven doesn't support to remove elements from parent POMs, you can only
extend it in sub-modules.

Therefore, you should only put common things into the parent POM. In your
case, how about creating a second sub-module/project which prepares the FTP
site?

Then, you can define the order in which the sub-modules are executed in your
parent POM to make sure the FTP site is ready before the other sub-module
wants to access it.
-- 
View this message in context: http://www.nabble.com/How-to-disable-a-goal-tf2742921s177.html#a7673065
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org