You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jimbog <ja...@lvs.co.uk> on 2007/11/26 15:40:46 UTC

Surefire System Properties not set?

Hi,
Im trying to pass a system property into surefire to override a coherence
cluster address, I have my surefire plugin configured as per.. 

http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

<build>
				<plugins>
				<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>surefire-report-maven-plugin</artifactId>
				<configuration> 
				<systemProperties>
				<property>
				<name>tangosol.coherence.clusteraddress</name>
				<value>${tangosol.coherence.clusteraddress}</value>
				</property>
				<property>
				<name>tangosol.coherence.clusterport</name>
				<value>${tangosol.coherence.clusterport}</value>
				</property>
				</systemProperties>
				</configuration>
			</plugin>

And when my tests run, these properties are nowhere to be seen (see below),
causing my tests to fail.

Am I missing something here? I have tries setting the properties in
./m2/settings.xml and using -D at the mvn command line with no joy. Has
someone else overridden a coherence cluster address in maven run unit tests? 



<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="4" skipped="0" tests="4" time="5.463" failures="0"
name="com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest">
  <properties>
    <property value="Java(TM) 2 Runtime Environment, Standard Edition"
name="java.runtime.name"/>
    <property value="C:\Java\jdk1.5.0_12\jre\bin"
name="sun.boot.library.path"/>
    <property value="1.5.0_12-b04" name="java.vm.version"/>
    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
    <property value="http://java.sun.com/" name="java.vendor.url"/>
    <property value=";" name="path.separator"/>
    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
    <property value="sun.io" name="file.encoding.pkg"/>
    <property value="GB" name="user.country"/>
    <property value="SUN_STANDARD" name="sun.java.launcher"/>
    <property value="" name="sun.os.patch.level"/>
    <property value="Java Virtual Machine Specification"
name="java.vm.specification.name"/>
    <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
name="user.dir"/>
    <property value="1.5.0_12-b04" name="java.runtime.version"/>
    <property value="sun.awt.Win32GraphicsEnvironment"
name="java.awt.graphicsenv"/>
    <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
name="basedir"/>
    <property value="C:\Java\jdk1.5.0_12\jre\lib\endorsed"
name="java.endorsed.dirs"/>
    <property value="x86" name="os.arch"/>
    <property value="C:\Users\gustardj\AppData\Local\Temp\"
name="java.io.tmpdir"/>
    <property value="
" name="line.separator"/>
    <property value="Sun Microsystems Inc."
name="java.vm.specification.vendor"/>
    <property value="" name="user.variant"/>
    <property value="Windows Vista" name="os.name"/>
    <property value="Cp1252" name="sun.jnu.encoding"/>
    <property
value="C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\OpenSSH\bin;C:\Program
Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program
Files\TortoiseSVN\bin" name="java.library.path"/>
    <property value="Java Platform API Specification"
name="java.specification.name"/>
    <property value="49.0" name="java.class.version"/>
    <property value="HotSpot Client Compiler"
name="sun.management.compiler"/>
    <property value="6.0" name="os.version"/>
    <property value="C:\Users\gustardj" name="user.home"/>
    <property value="Europe/London" name="user.timezone"/>
    <property value="sun.awt.windows.WPrinterJob"
name="java.awt.printerjob"/>
    <property value="Cp1252" name="file.encoding"/>
    <property value="1.5" name="java.specification.version"/>
    <property value="gustardj" name="user.name"/>
    <property
value="C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Users\gustardj\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Users\gustardj\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Users\gustardj\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar"
name="java.class.path"/>
    <property value="1.0" name="java.vm.specification.version"/>
    <property value="32" name="sun.arch.data.model"/>
    <property value="C:\Java\jdk1.5.0_12\jre" name="java.home"/>
    <property value="Sun Microsystems Inc."
name="java.specification.vendor"/>
    <property value="en" name="user.language"/>
    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
    <property value="mixed mode" name="java.vm.info"/>
    <property value="1.5.0_12" name="java.version"/>
    <property value="C:\Java\jdk1.5.0_12\jre\lib\ext" name="java.ext.dirs"/>
    <property
value="C:\Java\jdk1.5.0_12\jre\lib\rt.jar;C:\Java\jdk1.5.0_12\jre\lib\i18n.jar;C:\Java\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\Java\jdk1.5.0_12\jre\lib\jsse.jar;C:\Java\jdk1.5.0_12\jre\lib\jce.jar;C:\Java\jdk1.5.0_12\jre\lib\charsets.jar;C:\Java\jdk1.5.0_12\jre\classes"
name="sun.boot.class.path"/>
    <property value="Sun Microsystems Inc." name="java.vendor"/>
    <property value="C:\Users\gustardj\.m2\repository"
name="localRepository"/>
    <property value="\" name="file.separator"/>
    <property value="http://java.sun.com/cgi-bin/bugreport.cgi"
name="java.vendor.url.bug"/>
    <property value="little" name="sun.cpu.endian"/>
    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
    <property value="windows" name="sun.desktop"/>
    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486
i386 i86" name="sun.cpu.isalist"/>
  </properties>
  <testcase time="3.639" name="runTestCRUD">
    <error type="(Wrapped" message="(Wrapped: Address=-2) -2: -2">(Wrapped:
Address=-2) java.net.UnknownHostException: -2: -2
	at java.net.InetAddress.getAllByName0(InetAddress.java:1128)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
	at java.net.InetAddress.getAllByName(InetAddress.java:1061)
	at java.net.InetAddress.getByName(InetAddress.java:958)
  
-- 
View this message in context: http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13950869
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Surefire System Properties not set?

Posted by ni...@planet.nl.
No, the surefire plugin runs your tests, and is by default enabled for most packagings, so if you want to pass in properties you have to override the configuration. The report plugin only does that, the reporting. It takes the results from target/surefire-reports and creates the html files from them.

With regards,

Nick Stolwijk

-----Original Message-----
From: Jimbog [mailto:james.gustard@lvs.co.uk]
Sent: Mon 11/26/2007 4:42 PM
To: users@maven.apache.org
Subject: RE: Surefire System Properties not set?
 

Hi,
yes, we were only using the reports plugin, ive added the
maven-surefire-plugin and the system properties get passed through, I would
have thought the reports plugin would pass them in.



nicklist wrote:
> 
> You are configuring the wrong plugin:
> 
> On the webpage:
> 
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
> 
> In your code:
> 
> 	<groupId>org.codehaus.mojo</groupId>
>         <artifactId>surefire-report-maven-plugin</artifactId>
> 
> Hth,
> 
> Nick Stolwijk
> 
> 
> -----Original Message-----
> From: Jimbog [mailto:james.gustard@lvs.co.uk]
> Sent: Mon 11/26/2007 3:40 PM
> To: users@maven.apache.org
> Subject: Surefire System Properties not set?
>  
> 
> Hi,
> Im trying to pass a system property into surefire to override a coherence
> cluster address, I have my surefire plugin configured as per.. 
> 
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html
> 
> <build>
> 				<plugins>
> 				<plugin>
> 				<groupId>org.codehaus.mojo</groupId>
> 				<artifactId>surefire-report-maven-plugin</artifactId>
> 				<configuration> 
> 				<systemProperties>
> 				<property>
> 				<name>tangosol.coherence.clusteraddress</name>
> 				<value>${tangosol.coherence.clusteraddress}</value>
> 				</property>
> 				<property>
> 				<name>tangosol.coherence.clusterport</name>
> 				<value>${tangosol.coherence.clusterport}</value>
> 				</property>
> 				</systemProperties>
> 				</configuration>
> 			</plugin>
> 
> And when my tests run, these properties are nowhere to be seen (see
> below),
> causing my tests to fail.
> 
> Am I missing something here? I have tries setting the properties in
> /m2/settings.xml and using -D at the mvn command line with no joy. Has
> someone else overridden a coherence cluster address in maven run unit
> tests? 
> 
> 
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <testsuite errors="4" skipped="0" tests="4" time="5.463" failures="0"
> name="com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest">
>   <properties>
>     <property value="Java(TM) 2 Runtime Environment, Standard Edition"
> name="java.runtime.name"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\bin"
> name="sun.boot.library.path"/>
>     <property value="1.5.0_12-b04" name="java.vm.version"/>
>     <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
>     <property value="http://java.sun.com/" name="java.vendor.url"/>
>     <property value=";" name="path.separator"/>
>     <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
>     <property value="sun.io" name="file.encoding.pkg"/>
>     <property value="GB" name="user.country"/>
>     <property value="SUN_STANDARD" name="sun.java.launcher"/>
>     <property value="" name="sun.os.patch.level"/>
>     <property value="Java Virtual Machine Specification"
> name="java.vm.specification.name"/>
>     <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
> name="user.dir"/>
>     <property value="1.5.0_12-b04" name="java.runtime.version"/>
>     <property value="sun.awt.Win32GraphicsEnvironment"
> name="java.awt.graphicsenv"/>
>     <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
> name="basedir"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\lib\endorsed"
> name="java.endorsed.dirs"/>
>     <property value="x86" name="os.arch"/>
>     <property value="C:\Users\gustardj\AppData\Local\Temp\"
> name="java.io.tmpdir"/>
>     <property value="
> " name="line.separator"/>
>     <property value="Sun Microsystems Inc."
> name="java.vm.specification.vendor"/>
>     <property value="" name="user.variant"/>
>     <property value="Windows Vista" name="os.name"/>
>     <property value="Cp1252" name="sun.jnu.encoding"/>
>     <property
> value="C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
> Files\Common Files\Roxio Shared\DLLShared\;C:\Program
> Files\OpenSSH\bin;C:\Program
> Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program
> Files\TortoiseSVN\bin" name="java.library.path"/>
>     <property value="Java Platform API Specification"
> name="java.specification.name"/>
>     <property value="49.0" name="java.class.version"/>
>     <property value="HotSpot Client Compiler"
> name="sun.management.compiler"/>
>     <property value="6.0" name="os.version"/>
>     <property value="C:\Users\gustardj" name="user.home"/>
>     <property value="Europe/London" name="user.timezone"/>
>     <property value="sun.awt.windows.WPrinterJob"
> name="java.awt.printerjob"/>
>     <property value="Cp1252" name="file.encoding"/>
>     <property value="1.5" name="java.specification.version"/>
>     <property value="gustardj" name="user.name"/>
>     <property
> value="C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Users\gustardj\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-container-default\10-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Users\gustardj\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Users\gustardj\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar"
> name="java.class.path"/>
>     <property value="1.0" name="java.vm.specification.version"/>
>     <property value="32" name="sun.arch.data.model"/>
>     <property value="C:\Java\jdk1.5.0_12\jre" name="java.home"/>
>     <property value="Sun Microsystems Inc."
> name="java.specification.vendor"/>
>     <property value="en" name="user.language"/>
>     <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
>     <property value="mixed mode" name="java.vm.info"/>
>     <property value="1.5.0_12" name="java.version"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\lib\ext"
> name="java.ext.dirs"/>
>     <property
> value="C:\Java\jdk1.5.0_12\jre\lib\rt.jar;C:\Java\jdk1.5.0_12\jre\lib\i18n.jar;C:\Java\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\Java\jdk1.5.0_12\jre\lib\jsse.jar;C:\Java\jdk1.5.0_12\jre\lib\jce.jar;C:\Java\jdk1.5.0_12\jre\lib\charsets.jar;C:\Java\jdk1.5.0_12\jre\classes"
> name="sun.boot.class.path"/>
>     <property value="Sun Microsystems Inc." name="java.vendor"/>
>     <property value="C:\Users\gustardj\.m2\repository"
> name="localRepository"/>
>     <property value="\" name="file.separator"/>
>     <property value="http://java.sun.com/cgi-bin/bugreport.cgi"
> name="java.vendor.url.bug"/>
>     <property value="little" name="sun.cpu.endian"/>
>     <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
>     <property value="windows" name="sun.desktop"/>
>     <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486
> i386 i86" name="sun.cpu.isalist"/>
>   </properties>
>   <testcase time="3.639" name="runTestCRUD">
>     <error type="(Wrapped" message="(Wrapped: Address=-2) -2:
> -2">(Wrapped:
> Address=-2) java.net.UnknownHostException: -2: -2
> 	at java.net.InetAddress.getAllByName0(InetAddress.java:1128)
> 	at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
> 	at java.net.InetAddress.getAllByName(InetAddress.java:1061)
> 	at java.net.InetAddress.getByName(InetAddress.java:958)
>   
> -- 
> View this message in context:
> http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13950869
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13951893
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



RE: Surefire System Properties not set?

Posted by Jimbog <ja...@lvs.co.uk>.
Hi,
yes, we were only using the reports plugin, ive added the
maven-surefire-plugin and the system properties get passed through, I would
have thought the reports plugin would pass them in.



nicklist wrote:
> 
> You are configuring the wrong plugin:
> 
> On the webpage:
> 
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
> 
> In your code:
> 
> 	<groupId>org.codehaus.mojo</groupId>
>         <artifactId>surefire-report-maven-plugin</artifactId>
> 
> Hth,
> 
> Nick Stolwijk
> 
> 
> -----Original Message-----
> From: Jimbog [mailto:james.gustard@lvs.co.uk]
> Sent: Mon 11/26/2007 3:40 PM
> To: users@maven.apache.org
> Subject: Surefire System Properties not set?
>  
> 
> Hi,
> Im trying to pass a system property into surefire to override a coherence
> cluster address, I have my surefire plugin configured as per.. 
> 
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html
> 
> <build>
> 				<plugins>
> 				<plugin>
> 				<groupId>org.codehaus.mojo</groupId>
> 				<artifactId>surefire-report-maven-plugin</artifactId>
> 				<configuration> 
> 				<systemProperties>
> 				<property>
> 				<name>tangosol.coherence.clusteraddress</name>
> 				<value>${tangosol.coherence.clusteraddress}</value>
> 				</property>
> 				<property>
> 				<name>tangosol.coherence.clusterport</name>
> 				<value>${tangosol.coherence.clusterport}</value>
> 				</property>
> 				</systemProperties>
> 				</configuration>
> 			</plugin>
> 
> And when my tests run, these properties are nowhere to be seen (see
> below),
> causing my tests to fail.
> 
> Am I missing something here? I have tries setting the properties in
> /m2/settings.xml and using -D at the mvn command line with no joy. Has
> someone else overridden a coherence cluster address in maven run unit
> tests? 
> 
> 
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <testsuite errors="4" skipped="0" tests="4" time="5.463" failures="0"
> name="com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest">
>   <properties>
>     <property value="Java(TM) 2 Runtime Environment, Standard Edition"
> name="java.runtime.name"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\bin"
> name="sun.boot.library.path"/>
>     <property value="1.5.0_12-b04" name="java.vm.version"/>
>     <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
>     <property value="http://java.sun.com/" name="java.vendor.url"/>
>     <property value=";" name="path.separator"/>
>     <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
>     <property value="sun.io" name="file.encoding.pkg"/>
>     <property value="GB" name="user.country"/>
>     <property value="SUN_STANDARD" name="sun.java.launcher"/>
>     <property value="" name="sun.os.patch.level"/>
>     <property value="Java Virtual Machine Specification"
> name="java.vm.specification.name"/>
>     <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
> name="user.dir"/>
>     <property value="1.5.0_12-b04" name="java.runtime.version"/>
>     <property value="sun.awt.Win32GraphicsEnvironment"
> name="java.awt.graphicsenv"/>
>     <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
> name="basedir"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\lib\endorsed"
> name="java.endorsed.dirs"/>
>     <property value="x86" name="os.arch"/>
>     <property value="C:\Users\gustardj\AppData\Local\Temp\"
> name="java.io.tmpdir"/>
>     <property value="
> " name="line.separator"/>
>     <property value="Sun Microsystems Inc."
> name="java.vm.specification.vendor"/>
>     <property value="" name="user.variant"/>
>     <property value="Windows Vista" name="os.name"/>
>     <property value="Cp1252" name="sun.jnu.encoding"/>
>     <property
> value="C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
> Files\Common Files\Roxio Shared\DLLShared\;C:\Program
> Files\OpenSSH\bin;C:\Program
> Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program
> Files\TortoiseSVN\bin" name="java.library.path"/>
>     <property value="Java Platform API Specification"
> name="java.specification.name"/>
>     <property value="49.0" name="java.class.version"/>
>     <property value="HotSpot Client Compiler"
> name="sun.management.compiler"/>
>     <property value="6.0" name="os.version"/>
>     <property value="C:\Users\gustardj" name="user.home"/>
>     <property value="Europe/London" name="user.timezone"/>
>     <property value="sun.awt.windows.WPrinterJob"
> name="java.awt.printerjob"/>
>     <property value="Cp1252" name="file.encoding"/>
>     <property value="1.5" name="java.specification.version"/>
>     <property value="gustardj" name="user.name"/>
>     <property
> value="C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Users\gustardj\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-container-default\10-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Users\gustardj\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Users\gustardj\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar"
> name="java.class.path"/>
>     <property value="1.0" name="java.vm.specification.version"/>
>     <property value="32" name="sun.arch.data.model"/>
>     <property value="C:\Java\jdk1.5.0_12\jre" name="java.home"/>
>     <property value="Sun Microsystems Inc."
> name="java.specification.vendor"/>
>     <property value="en" name="user.language"/>
>     <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
>     <property value="mixed mode" name="java.vm.info"/>
>     <property value="1.5.0_12" name="java.version"/>
>     <property value="C:\Java\jdk1.5.0_12\jre\lib\ext"
> name="java.ext.dirs"/>
>     <property
> value="C:\Java\jdk1.5.0_12\jre\lib\rt.jar;C:\Java\jdk1.5.0_12\jre\lib\i18n.jar;C:\Java\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\Java\jdk1.5.0_12\jre\lib\jsse.jar;C:\Java\jdk1.5.0_12\jre\lib\jce.jar;C:\Java\jdk1.5.0_12\jre\lib\charsets.jar;C:\Java\jdk1.5.0_12\jre\classes"
> name="sun.boot.class.path"/>
>     <property value="Sun Microsystems Inc." name="java.vendor"/>
>     <property value="C:\Users\gustardj\.m2\repository"
> name="localRepository"/>
>     <property value="\" name="file.separator"/>
>     <property value="http://java.sun.com/cgi-bin/bugreport.cgi"
> name="java.vendor.url.bug"/>
>     <property value="little" name="sun.cpu.endian"/>
>     <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
>     <property value="windows" name="sun.desktop"/>
>     <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486
> i386 i86" name="sun.cpu.isalist"/>
>   </properties>
>   <testcase time="3.639" name="runTestCRUD">
>     <error type="(Wrapped" message="(Wrapped: Address=-2) -2:
> -2">(Wrapped:
> Address=-2) java.net.UnknownHostException: -2: -2
> 	at java.net.InetAddress.getAllByName0(InetAddress.java:1128)
> 	at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
> 	at java.net.InetAddress.getAllByName(InetAddress.java:1061)
> 	at java.net.InetAddress.getByName(InetAddress.java:958)
>   
> -- 
> View this message in context:
> http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13950869
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13951893
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Surefire System Properties not set?

Posted by ni...@planet.nl.
You are configuring the wrong plugin:

On the webpage:

        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>

In your code:

	<groupId>org.codehaus.mojo</groupId>
        <artifactId>surefire-report-maven-plugin</artifactId>

Hth,

Nick Stolwijk


-----Original Message-----
From: Jimbog [mailto:james.gustard@lvs.co.uk]
Sent: Mon 11/26/2007 3:40 PM
To: users@maven.apache.org
Subject: Surefire System Properties not set?
 

Hi,
Im trying to pass a system property into surefire to override a coherence
cluster address, I have my surefire plugin configured as per.. 

http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

<build>
				<plugins>
				<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>surefire-report-maven-plugin</artifactId>
				<configuration> 
				<systemProperties>
				<property>
				<name>tangosol.coherence.clusteraddress</name>
				<value>${tangosol.coherence.clusteraddress}</value>
				</property>
				<property>
				<name>tangosol.coherence.clusterport</name>
				<value>${tangosol.coherence.clusterport}</value>
				</property>
				</systemProperties>
				</configuration>
			</plugin>

And when my tests run, these properties are nowhere to be seen (see below),
causing my tests to fail.

Am I missing something here? I have tries setting the properties in
/m2/settings.xml and using -D at the mvn command line with no joy. Has
someone else overridden a coherence cluster address in maven run unit tests? 



<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="4" skipped="0" tests="4" time="5.463" failures="0"
name="com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest">
  <properties>
    <property value="Java(TM) 2 Runtime Environment, Standard Edition"
name="java.runtime.name"/>
    <property value="C:\Java\jdk1.5.0_12\jre\bin"
name="sun.boot.library.path"/>
    <property value="1.5.0_12-b04" name="java.vm.version"/>
    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
    <property value="http://java.sun.com/" name="java.vendor.url"/>
    <property value=";" name="path.separator"/>
    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
    <property value="sun.io" name="file.encoding.pkg"/>
    <property value="GB" name="user.country"/>
    <property value="SUN_STANDARD" name="sun.java.launcher"/>
    <property value="" name="sun.os.patch.level"/>
    <property value="Java Virtual Machine Specification"
name="java.vm.specification.name"/>
    <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
name="user.dir"/>
    <property value="1.5.0_12-b04" name="java.runtime.version"/>
    <property value="sun.awt.Win32GraphicsEnvironment"
name="java.awt.graphicsenv"/>
    <property value="C:\dev\whbcs\whbcs-liability\whbcs-liability-core"
name="basedir"/>
    <property value="C:\Java\jdk1.5.0_12\jre\lib\endorsed"
name="java.endorsed.dirs"/>
    <property value="x86" name="os.arch"/>
    <property value="C:\Users\gustardj\AppData\Local\Temp\"
name="java.io.tmpdir"/>
    <property value="
" name="line.separator"/>
    <property value="Sun Microsystems Inc."
name="java.vm.specification.vendor"/>
    <property value="" name="user.variant"/>
    <property value="Windows Vista" name="os.name"/>
    <property value="Cp1252" name="sun.jnu.encoding"/>
    <property
value="C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\OpenSSH\bin;C:\Program
Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program
Files\TortoiseSVN\bin" name="java.library.path"/>
    <property value="Java Platform API Specification"
name="java.specification.name"/>
    <property value="49.0" name="java.class.version"/>
    <property value="HotSpot Client Compiler"
name="sun.management.compiler"/>
    <property value="6.0" name="os.version"/>
    <property value="C:\Users\gustardj" name="user.home"/>
    <property value="Europe/London" name="user.timezone"/>
    <property value="sun.awt.windows.WPrinterJob"
name="java.awt.printerjob"/>
    <property value="Cp1252" name="file.encoding"/>
    <property value="1.5" name="java.specification.version"/>
    <property value="gustardj" name="user.name"/>
    <property
value="C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Users\gustardj\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-container-default\10-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Users\gustardj\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Users\gustardj\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Users\gustardj\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Users\gustardj\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar"
name="java.class.path"/>
    <property value="1.0" name="java.vm.specification.version"/>
    <property value="32" name="sun.arch.data.model"/>
    <property value="C:\Java\jdk1.5.0_12\jre" name="java.home"/>
    <property value="Sun Microsystems Inc."
name="java.specification.vendor"/>
    <property value="en" name="user.language"/>
    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
    <property value="mixed mode" name="java.vm.info"/>
    <property value="1.5.0_12" name="java.version"/>
    <property value="C:\Java\jdk1.5.0_12\jre\lib\ext" name="java.ext.dirs"/>
    <property
value="C:\Java\jdk1.5.0_12\jre\lib\rt.jar;C:\Java\jdk1.5.0_12\jre\lib\i18n.jar;C:\Java\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\Java\jdk1.5.0_12\jre\lib\jsse.jar;C:\Java\jdk1.5.0_12\jre\lib\jce.jar;C:\Java\jdk1.5.0_12\jre\lib\charsets.jar;C:\Java\jdk1.5.0_12\jre\classes"
name="sun.boot.class.path"/>
    <property value="Sun Microsystems Inc." name="java.vendor"/>
    <property value="C:\Users\gustardj\.m2\repository"
name="localRepository"/>
    <property value="\" name="file.separator"/>
    <property value="http://java.sun.com/cgi-bin/bugreport.cgi"
name="java.vendor.url.bug"/>
    <property value="little" name="sun.cpu.endian"/>
    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
    <property value="windows" name="sun.desktop"/>
    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486
i386 i86" name="sun.cpu.isalist"/>
  </properties>
  <testcase time="3.639" name="runTestCRUD">
    <error type="(Wrapped" message="(Wrapped: Address=-2) -2: -2">(Wrapped:
Address=-2) java.net.UnknownHostException: -2: -2
	at java.net.InetAddress.getAllByName0(InetAddress.java:1128)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
	at java.net.InetAddress.getAllByName(InetAddress.java:1061)
	at java.net.InetAddress.getByName(InetAddress.java:958)
  
-- 
View this message in context: http://www.nabble.com/Surefire-System-Properties-not-set--tf4875574s177.html#a13950869
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org