Unable to locate logback.xml from scalatest
maxMidius opened this issue · comments
maxMidius commented
I am using scalatest-maven-plugin with a config which looks like this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- enable scalatest -->
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>MyProj_TestSuite.txt</filereports>
<forkMode>never</forkMode>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
I have a logback.xml in my src/test/resources which gets copied over to target/classes
Have spent a whole day to figure out why this is not being picked up -- using the following
<runpath> ${project.basedir}/target/classes </runpath>
If I run it like this
mvn test -Dlogback.configurationFile=./src/test/resources/logback.xml - it works
So I am wondering if you can please help me understand how to do this from inside the pom.xml
Thank you