Thanks both, but if i run mvn clean install against the configuration below,
it will report missing assembly id, so i add assembly configuraiton to
pom.xml, but geronimoHome configuration doesn't take effect. It still start
assembly server in repository. not the one i pointed out via geronimoHome
setting.
I just would like create a customized geronimo server with some change in
var/config/config-substitutions.properties
<plugin>
<groupId>org.apache.geronimo.buildsupport</groupId>
<artifactId>geronimo-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<logOutput>true</logOutput>
<background>true</background>
<verifyTimeout>300</verifyTimeout>
<refresh>true</refresh>
<optionSets>
<optionSet>
<id>default</id>
<options>
<option>-DgeronimoHome=${basedir}/server1/</option>
<option>-XX:MaxPermSize=256m</option>
<option>-XX:+HeapDumpOnOutOfMemoryError</option>
<option>-enableassertions</option>
</options>
</optionSet>
</optionSets>
</configuration>
</execution>
i want to run a customized geronimo server with some configuration in
var/config/config-substitutions.properties,
On Wed, Jul 14, 2010 at 11:27 PM, Donald Woods <[email protected]> wrote:
> 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
>
--
viola