Forum Discussion

dennenboom's avatar
dennenboom
Occasional Contributor
12 years ago

Surefire Junit reports

All

I'm trying to get my junit reports to run on a maven. However the reports run, but shows 0 for all of them, but I get success on jenkins everything publishes.

I think it's a reference to the reports as it looks like the surefire plugin looks at the folder in relation to /target/site so /target/surefire-reports. However the surefire reports are generating into /target/classes/surefire-reports.

My pom.xml has outputfolder set to ./target/surefire-reports however it goes into classes/target/surefire-reports, so something is telling it to start in target/classes. Has anyone experienced this?


</projectProperties>
<printReport>true</printReport>
<settingsFile>.soapui-settings.xml</settingsFile>
<outputFolder>./target/surefire-reports</outputFolder>

2 Replies

  • dennenboom's avatar
    dennenboom
    Occasional Contributor
    Okay I think I fixed it by using ${basedir} in the POM


    <outputFolder>${basedir}/target/surefire-reports</outputFolder>


    I'm still not sure why, as I have another project that doesn't use that basedir and it works.
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi,
    the maven plugin does not manage relative path correctly, so sometimes you have issue like yours depending the directory from where the build is launched.
    So, I suggest you to always use absolute path in the plugin configuration