[ http://jira.codehaus.org/browse/MSUREFIRE-80?page=comments#action_61350 ] 

Dan Tran commented on MSUREFIRE-80:
-----------------------------------

It appears that you are using the snapshot copy of the plugin based on what you 
show me in your local repo.  To use the officiall release,
you need to specify the version in you pom, but you will lose the new added 
feature in the snapshot.

I, personally, cut the release internally ( after testing it) so that changes 
in maven snapshot do not affect my team.

If you get the latest from svn and build, this problem will go away.

I also notice that maven plugin snapshot repo has the latest one ( 
http://svn.apache.org/maven-snapshot-repository )
not sure if it is permanent since there are lots of work going on to reorganize 
the snapshots  repo locations

Hope it helps





> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Priority: Blocker

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         
> <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at 
> org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at 
> org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this 
> get turned into a null?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to