Hi Minto,

The reason that this works for this plugin, is because inside of the
plugin it will explicitly execute a System.setProperty("key", "value")
operation with the name value pair that was passed. This is not however,
standard functionality across all plugins. I am essentially having to
write this same functionality into each of my plugins, where actually I
just wanted to set this property one time in my pom or settings.xml,
which would be applied across all plugins, however, at this stage this
does not seem to be available.

Thanks for the response.

Matt

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 15 January 2008 10:56
To: users@maven.apache.org
Subject: RE: Setting Java System property



Hi Matthew,

For my unittest I included the following to set system properties:

                        <plugin>
        
<groupId>org.apache.maven.plugins</groupId>
        
<artifactId>maven-surefire-plugin</artifactId>
                                <configuration>
                                        <forkMode>once</forkMode>
                                        <systemProperties>
                                                <property>
                                                        <name>
        
java.util.prefs.PreferencesFactory
                                                        </name>
                                                        <value>
        
nl.xup.prefs.memoryprefs.MemoryPreferencesFactory
                                                        </value>
                                                </property>
                                        </systemProperties>
                                </configuration>
                        </plugin>

I hope this helps.

Kind regards,

Minto van der Sluis 

-----Oorspronkelijk bericht-----
Van: Matthew Tordoff [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 15 januari 2008 10:43
Aan: Maven Users List
Onderwerp: RE: Setting Java System property

I still haven't moved forwards with this. Does any one have any ideas? 

-----Original Message-----
From: Matthew Tordoff [mailto:[EMAIL PROTECTED]
Sent: 14 January 2008 17:56
To: Maven Users List
Subject: Setting Java System property

Hi all,
 
I am having problems setting a Java System Property as part of my build.
I have tried setting it in all kinds of places and the only one that I
have found to work is setting it as part of the maven command line as
follows:
 
mvn compile -Dsystemprop=blah
 
Setting in the above way is the only way in which I appear to be able to
access the file at a later stage from one of my MOJOs via
System.getProperty("systemprop") .
 
I don't want to have to set this at the command line because I want to
minimise what is typed each time mvn is run.
 
The other approaches I have tried are...
 
Within pom.xml
- <configuration>
    <systemprop>blah</systemprop>
  </configuration> 
 
also...
 
<configuration>
  <properties>
    <systemprop>blah</systemprop>
  <properties>
</configuration>
 
within settings.xml...
 
  <properties>
    <systemprop>blah</systemprop>
  <properties>
 
Any help would be greatly appreciated.
 
Regards,
 
Matt



The content of this e-mail is confidential and may be privileged. It may
be read, copied and used only by the intended recipient and may not be
disclosed, copied or distributed. If you received this email in error,
please contact the sender immediately by return e-mail or by telephoning
+44 20 7260 2000, delete it and do not disclose its contents to any
person. You should take full responsibility for checking this email for
viruses. Markit reserves the right to monitor all e-mail communications
through its network.
Markit and its affiliated companies make no warranty as to the accuracy
or completeness of any information contained in this message and hereby
exclude any liability of any kind for the information contained herein.
Any opinions expressed in this message are those of the author and do
not necessarily reflect the opinions of Markit.
For full details about Markit, its offerings and legal terms and
conditions, please see Markit's website at http://www.markit.com
<http://www.markit.com/> .



The content of this e-mail is confidential and may be privileged. It may
be read, copied and used only by the intended recipient and may not be
disclosed, copied or distributed. If you received this email in error,
please contact the sender immediately by return e-mail or by telephoning
+44 20 7260 2000, delete it and do not disclose its contents to any
person. You should take full responsibility for checking this email for
viruses. Markit reserves the right to monitor all e-mail communications
through its network.
Markit and its affiliated companies make no warranty as to the accuracy
or completeness of any information contained in this message and hereby
exclude any liability of any kind for the information contained herein.
Any opinions expressed in this message are those of the author and do
not necessarily reflect the opinions of Markit.
For full details about Markit, its offerings and legal terms and
conditions, please see Markit's website at http://www.markit.com
<http://www.markit.com/> .

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



DISCLAIMER
De informatie in deze e-mail is vertrouwelijk en uitsluitend bestemd
voor de geadresseerde. Indien u niet de geadresseerde bent, wordt u er
hierbij op gewezen, dat u geen recht heeft kennis te nemen van de rest
van deze e-mail, deze te gebruiken, te kopieren of te verstrekken aan
andere personen dan de geadresseerde. Indien u deze e-mail abusievelijk
hebt ontvangen, brengt u dan alstublieft de afzender op de hoogte,
waarbij u bij deze gevraagd wordt het originele bericht te vernietigen.
Politie Amsterdam-Amstelland is niet verantwoordelijk voor de inhoud van
deze e-mail en wijst iedere aansprakelijkheid af voor en/of in verband
met alle gevolgen en/of schade van een onjuiste of onvolledige
verzending ervan. Tenzij uitdrukkelijk het tegendeel blijkt, kunnen aan
dit bericht geen rechten worden ontleend. Het gebruik van Internet
e-mail brengt zekere risico's met zich. Daarom wordt iedere
aansprakelijkheid voor het gebruik van dit medium door de Politie
Amsterdam-Amstelland van de hand gewezen. 

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




The content of this e-mail is confidential and may be privileged. It may be 
read, copied and used only by the intended recipient and may not be disclosed, 
copied or distributed. If you received this email in error, please contact the 
sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete 
it and do not disclose its contents to any person. You should take full 
responsibility for checking this email for viruses. Markit reserves the right 
to monitor all e-mail communications through its network.
Markit and its affiliated companies make no warranty as to the accuracy or 
completeness of any information contained in this message and hereby exclude 
any liability of any kind for the information contained herein. Any opinions 
expressed in this message are those of the author and do not necessarily 
reflect the opinions of Markit.
For full details about Markit, its offerings and legal terms and conditions, 
please see Markit's website at http://www.markit.com <http://www.markit.com/> .

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

Reply via email to