So, are the tests being forked?

On 2/10/06, Davis Ford <[EMAIL PROTECTED]> wrote:
> Hello Dion,
>
> Thanks for responding.  I should clarify -- the unit tests I am
> running are testing some code that use
> System.getProperty("java.class.path") -- and this code depends on the
> fact that the call to System.getProperty("java.class.path") will
> include "." which is the current directory - wherever that may be.
> So, when maven overrides that system property, my tests fail.
>
> Regards,
> Davis
>
> On 2/9/06, Dion Gillard <[EMAIL PROTECTED]> wrote:
> > Why does your test need the classpath of the app that is running it?
> >
> > The java.class.path property is set by the JVM when it's launched.
> >
> > Are you forking your tests?
> >
> > On 2/10/06, Davis Ford <[EMAIL PROTECTED]> wrote:
> > > Hi, I searched high and low on google, etc. and the mailing list
> > > archives.  This means either my problem is unique, or I'm just doing
> > > something very dumb.  I know maven is supposed to handle dependencies
> > > like jar files with the xml, but this is a case where:
> > >
> > > A unit test is run that introspects the current classpath.  The test
> > > fails b/c maven seems to override the classpath...at least through
> > > System.getProperty("java.class.path")
> > >
> > > I tried adding the following to project.properties
> > >
> > > maven.junit.jvmargs=-classpath C:\some\dir\path
> > >
> > > but that had no effect.  My guess is that I can maybe fix this via
> > > over-riding the right property, but the number of property key/value
> > > pairs for all the plugins is a bit over-whelming.  Can someone provide
> > > a hint?
> > >
> > > Thanks,
> > > Davis
> > >
> > > > Hi, I wrote some code that uses the class path string from:
> > > >
> > > > System.getProperty("java.class.path");
> > > >
> > > > When I build with Maven on the command line it, this code:
> > > >
> > > > System.out.println(System.getProperty ("java.class.path");
> > > >
> > > > produces this output:
> > > >
> > > > C:\Program Files\Apache Software Foundation\Maven
> > > > 1.0.2\lib\forehead-1.0-beta-5.jar
> > > >
> > > > When I run the same code from inside Eclipse, it produces the output I
> > > > expect which is a long string of file directories separated by ';' -- 
> > > > this
> > > > is what I need.
> > > >
> > > > Why doesn't it work with maven cmd line build?
> > > > Why does maven seem to override that system property?
> > > > Is there some easy fix?
> > > >
> > > > Regards,
> > > > Davis
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > http://www.multitask.com.au/people/dion/
> > "If I close my eyes it doesn't seem so dark." - SpongeBob SquarePants
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
http://www.multitask.com.au/people/dion/
"If I close my eyes it doesn't seem so dark." - SpongeBob SquarePants

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

Reply via email to