There's no way you can avoid forking the JVM for jcoverage, it has to
be forked. You just need to pass the parameters.

On 10/3/05, Christoffer Sjöquist <[EMAIL PROTECTED]> wrote:
> Ok thanx for the explination. About why the eror is there.
>
> Now can some nice person point me in the right direction to fixing the
> problem.
> As i understand it there are 2 solutions.
> 1) pass the parameters
> 2) don't fork th JVM.
>
> Number 2 seems more "dangerous as i don't know the possible sidefects
> I have searched for a tutorial on using the jcoverage plugin to maven but
> cant find anything so i'm not 100% about where to
> change the settings.
> My best guesses are in
> .maven/maven-jcoverage-plugin-1.0.9/project.properties or project.xml
>
> Can some nice person point me towards a solution/tutorial/other here ?
>
> Thanx
> /Christoffer
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> > Behalf Of Carlos Sanchez
> > Sent: den 30 september 2005 17:38
> > To: Maven Users List
> > Subject: Re: Jcoverage and System.getProperties() problem.
> >
> > Hi,
> >
> > That's probably because you're running junit without forking the jvm
> > (all sysprops are there) and jcoverage runs in a new forked jvm (you
> > need to explicitly pass the sysprops). Take a look at the properties
> > of the test plugin, maven.junit.sysproperties,
> >
> > On 9/30/05, Christoffer Sjöquist
> > <[EMAIL PROTECTED]> wrote:
> > > We are building a project and using Maven junit and
> > jcoverage plugins.
> > > When we build first junit runs ok and all tests pass.
> > > Then the second run for jcoverage starts and now all tests
> > becomes errors.
> > > The reason seems to be that the system dosent find our
> > system property for
> > > where we place settings files
> > > (se below)
> > > Is there a way to explicitly add this to jcoverage ? (or
> > another workaround
> > > ?)
> > >
> > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<offending
> > > code>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > >     public static String getCOSSHomePath() {
> > >
> > >         if (cossHomePath == null) {
> > >             Properties props = System.getProperties();
> > >             if (props != null) {
> > >                 cossHomePath = (String)
> > props.getProperty("COSS_HOME");
> > >             }
> > >         }
> > >
> > >         return cossHomePath;
> > >     }
> > > <<<<<<<<<<<<<error shown
> > >
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > > Testcase:
> > >
> > testListSettingsEventHandlerOk(com.sonyericsson.r2r.coss.admin
> > .event.test.Te
> > > stEventHandlers):       Caused an ERROR
> > > Could not configure datastore from file: null\CoSS.hbm.xml
> > > org.hibernate.MappingException: Could not configure
> > datastore from file:
> > > null\CoSS.hbm.xml
> > >         at
> > org.hibernate.cfg.Configuration.addFile(Configuration.java:249)
> > >         at
> > <secret>.DBConfigTest.setToTestConfig(DBConfigTest.java:54)
> > >         at
> > >
> > <secret>coss.admin.event.test.TestEventHandlers.setUp(TestEven
> > tHandlers.java
> > > :41)
> > > Caused by: java.io.FileNotFoundException: null\CoSS.hbm.xml
> > (The system
> > > cannot find the path specified)
> > >         at java.io.FileInputStream.open(Native Method)
> > >         at java.io.FileInputStream.<init>(FileInputStream.java:106)
> > >         at
> > org.hibernate.cfg.Configuration.addFile(Configuration.java:245)
> > >
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > <<<<<<<<<<<<<<
> > > <<
> > > All the error files have the same type of errors where the
> > COSSHomePath is
> > > null.
> > >
> > > Tanx in advance
> > > /
> > > Christoffer S
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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]
> >
>
> ---------------------------------------------------------------------
> 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]

Reply via email to