Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to locate logback.xml from scalatest #52

Open
maxMidius opened this issue Feb 20, 2018 · 0 comments
Open

Unable to locate logback.xml from scalatest #52

maxMidius opened this issue Feb 20, 2018 · 0 comments

Comments

@maxMidius
Copy link

maxMidius commented Feb 20, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant