A profile can contain any portion of the <build> section:
http://maven.apache.org/maven2/maven-model/maven.html#class_Profile

so just copy/move that into a profile element.

You activate the profile by -P profile-id on the command line, or by
giving it another trigger, such as a system property (most common),
jdk version, operating system, etc.

You specify all this in the pom.xml. If it is specific to you, move it
to profiles.xml instead.

A subset of a profile can also be put in settings.xml (for non-project
specific settings).

However, your use case should only require the pom.xml changes. See
maven-model/pom.xml in the Maven source for an example.

Cheers,
Brett

On 10/7/05, Wendell Beckwith <[EMAIL PROTECTED]> wrote:
> Where can I find a good document or an example of how to use profiles to
> control the plugins that are activated in a specific phase? I have the
> following build element:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>com.agitar.maven.plugins</groupId>
> <artifactId>maven-agitar-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>agitate</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> ...
> <reporting>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>com.agitar.maven.plugins</groupId>
> <artifactId>maven-agitar-plugin</artifactId>
> <configuration>
> <projectName>My Project</projectName>
> </configuration>
> </plugin>
> </plugins>
> </reporting>
>
>
> The maven-agitar-plugin has 1 mojo bound to the test phase and 1 that
> generates a report, but they take quite a bit of time to run, so I want
> these mojos to only run of the build server. I understand profiles should be
> the way to handle this, but I'm lost on the syntax of what goes where in the
> pom, and what I need to add in the settings.xml and/or on the command line
> to make this only active for the build server.
>
> Wb
>
>

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

Reply via email to