Tomasz Pik schrieb:
On 9/27/07, Yan Huang <[EMAIL PROTECTED]> wrote:
Hello,
Is there a way to skip the "deploy" phase for a module? I tried "skip" tag
for the "maven-deploy-plugin" and it seems not working ...
You've a parent pom with some child modules and do not want to 'deploy'
one of them during 'mvn deploy' executed from top right?
You may define a profile in parent pom containing modules that you do not want
to deploy and then activate this profile for 'all-but-not-deploy' builds.
Unfortunately (AFAIK) there's no way do disable profile using
a command line.
Actually there is. I just discovered this yesterday while looking at the
sources [1]:
while ( profileTokens.hasMoreTokens() )
{
String profileAction = profileTokens.nextToken().trim();
if ( profileAction.startsWith( "-" ) )
{
profileManager.explicitlyDeactivate( profileAction.substring( 1 ) );
}
else if ( profileAction.startsWith( "+" ) )
{
profileManager.explicitlyActivate( profileAction.substring( 1 ) );
}
else
{
// TODO: deprecate this eventually!
profileManager.explicitlyActivate( profileAction );
}
}
So 'mvn -P-profile_name' should deactivate a profile. I don't checked if
this in a released version yet but it should be available when 2.0.8 is
released.
-Tim
[1]
https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
Something like this:
<modules>
<module>api</module>
<module>impl</module>
</modules>
<profiles>
<profile>
<id>it</id>
<modules>
<module>itest</module>
</modules>
</profile>
</profiles>
HTH,
Tomek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]