You could also set it as a property in the pom, like -
<properties>
<geronimoHome>${project.build.outputDirectory}</geronimoHome>
</properties>
which allows users to override it either in settings.xml or on the
command line. In your case, you could define a profile in settings.xml
that sets geronimoHome for your specific machine and then enable it when
building, like -
mvn clean install -Pg30home
Including hard-coded paths in poms is not a best practice, unless you
allow users to override it. Otherwise, we are adding profiles that are
specific to each user's machine and making the pom harder to maintain...
-Donald
On 7/14/10 12:54 AM, Shawn Jiang wrote:
> You could use optionSets to add your customized properties.
>
>
> 1, add optionSets to your geronimo-maven-plugin configuration
>
> <plugin>
> <groupId>org.apache.geronimo.buildsupport</groupId>
> <artifactId>geronimo-maven-plugin</artifactId>
> <configuration>
> <optionSets>
> <optionSet>
> <id>moreMemory</id>
> <options>
> <option>-XX:MaxPermSize=256m</option>
> <option>-XX:+HeapDumpOnOutOfMemoryError</option>
> <option>-enableassertions</option>
> </options>
> </optionSet>
> <optionSet>
> <id>ghome</id>
> <options>
>
> <option>-DgeronimoHome=/home/genspring/geronimo222-SNAPSHOT
> </option>
> <option>-DXXX=XXX
> </option>
> </options>
> </optionSet>
> </optionSets>
> </configuration>
> </plugin>
>
> 2, add -Doptions=xxx when do the mvn build to active the option set.
>
> mvn clean install -Doptions=ghome
>
> On Wed, Jul 14, 2010 at 11:20 AM, viola lu <viola.lu
> <http://viola.lu>@gmail.com <http://gmail.com>> wrote:
>
> >From geronimo-maven-plugin site doc, it described that if i want to
> run a customized geornimo server, i can run command:
> mvn geronimo:start-server -DgeronimoHome=[$dir_geronimo-server]
>
> but i want to define geronimoHome in pom.xml not in command, how to
> configure geronimo-maven-plugin?
> The way below is possible?thanks in advance!
> <plugin>
> <groupId>org.apache.geronimo.plugins</groupId>
> <artifactId>geronimo-maven-plugin</artifactId>
>
> <configuration>
> <geronimoHome>c:\server1\</geroninomHome>
> </configuration>
> </plugin>
>
>
> --
> viola
>
>
>
>
> --
> Shawn