maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoffer Sjöquist <Christoffer.Sjoqu...@tss.teleca.se>
Subject Jcoverage and System.getProperties() problem.
Date Fri, 30 Sep 2005 13:48:41 GMT
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(TestEventHandlers.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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message