You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Stephen Coy <st...@resolvesw.com> on 2004/06/07 08:41:33 UTC
Setting runtime properties from Maven
Hi,
I'm using maven cactus plugin 1.6 together with maven 1.0rc3.
My unit test needs to know the file system location of some test data,
and I'm trying to specify it using a system property. However I'm stuck
trying to set this so that it is evaluated at runtime for the cactus
maven plugin.
For a vanilla junit testcase, I can use maven.junit.sysproperties to
specify such things, but this facility does not seem to exist for
cactus.
Is there any other way that I can do this?
Thanks,
Steve Coy
RE: Setting runtime properties from Maven
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Stephen,
I have now added a new property to the Maven plugin to do what you want:
Added new <code>cactus.sysproperties</code> property to the
Maven plugin for Cactus to allow passing system properties to
the client and server side Cactus JVMs.
It's in CVS HEAD for now. I'll upload a nightly build sometime this
week.
Thanks
-Vincent
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: 08 June 2004 08:21
> To: 'Cactus Users List'
> Subject: RE: Setting runtime properties from Maven
>
> Hi Stephen,
>
> You're right! It's definitely missing this feature. This is supported
by
> the <cactus> task through the <cactusproperty> nested element which
> allows you to set up a runtime property either on the cactus client
side
> or cactus server side. However it's not used in the Maven plugin.
>
> That said, you can use a trick till we add this feature request. It
> happens that the following is used in the plugin.jelly of the Maven
> plugin:
>
> <cactusproperty server="false"
> propertiesFile="${cactus.logging.config.client}"/>
> [...]
> <cactusproperty server="true"
> propertiesFile="${cactus.logging.config.server}"/>
>
> Which means that if you define a cactus.logging.config.client or
> cactus.logging.config.server property in your project.properties or
> build.properties and that you make it point to the location of a
> properties file, you will be able to define properties in it that will
> be set up as system properties by the Cactus task.
>
> The cactus.logging.config.client would be for Cactus client side
> properties whereas the cactus.logging.config.server would be for
Cactus
> server side properties.
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Stephen Coy [mailto:steve@resolvesw.com]
> > Sent: 07 June 2004 08:42
> > To: cactus-user@jakarta.apache.org
> > Subject: Setting runtime properties from Maven
> >
> > Hi,
> >
> > I'm using maven cactus plugin 1.6 together with maven 1.0rc3.
> >
> > My unit test needs to know the file system location of some test
data,
> > and I'm trying to specify it using a system property. However I'm
> stuck
> > trying to set this so that it is evaluated at runtime for the cactus
> > maven plugin.
> >
> > For a vanilla junit testcase, I can use maven.junit.sysproperties to
> > specify such things, but this facility does not seem to exist for
> > cactus.
> >
> > Is there any other way that I can do this?
> >
> > Thanks,
> >
> > Steve Coy
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
RE: Setting runtime properties from Maven
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Stephen,
You're right! It's definitely missing this feature. This is supported by
the <cactus> task through the <cactusproperty> nested element which
allows you to set up a runtime property either on the cactus client side
or cactus server side. However it's not used in the Maven plugin.
That said, you can use a trick till we add this feature request. It
happens that the following is used in the plugin.jelly of the Maven
plugin:
<cactusproperty server="false"
propertiesFile="${cactus.logging.config.client}"/>
[...]
<cactusproperty server="true"
propertiesFile="${cactus.logging.config.server}"/>
Which means that if you define a cactus.logging.config.client or
cactus.logging.config.server property in your project.properties or
build.properties and that you make it point to the location of a
properties file, you will be able to define properties in it that will
be set up as system properties by the Cactus task.
The cactus.logging.config.client would be for Cactus client side
properties whereas the cactus.logging.config.server would be for Cactus
server side properties.
Thanks
-Vincent
> -----Original Message-----
> From: Stephen Coy [mailto:steve@resolvesw.com]
> Sent: 07 June 2004 08:42
> To: cactus-user@jakarta.apache.org
> Subject: Setting runtime properties from Maven
>
> Hi,
>
> I'm using maven cactus plugin 1.6 together with maven 1.0rc3.
>
> My unit test needs to know the file system location of some test data,
> and I'm trying to specify it using a system property. However I'm
stuck
> trying to set this so that it is evaluated at runtime for the cactus
> maven plugin.
>
> For a vanilla junit testcase, I can use maven.junit.sysproperties to
> specify such things, but this facility does not seem to exist for
> cactus.
>
> Is there any other way that I can do this?
>
> Thanks,
>
> Steve Coy
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org