actually, what I'm trying to accomplish is that I still want this module to go through all phases except the deploy one along with other modules in a single run of "mvn deploy". Just like we can "skip" test-compile or test phase, is there the other way to configure to by-pass only "deploy" phase?
On 9/27/07, Tim Kettler <[EMAIL PROTECTED]> wrote: > > 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] > >