cuizhennan / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
1 stars 0 forks source link

mvn test failed as it misses src/test/resources #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Download the lastes source code (or unzipped) the compressed file,
run mvn test
It will failed with many tests as it can't load .yml files located in 
src/test/resources folder.

It needs to have following configured in pom.xml file:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.18.1</version>
    <configuration>
        <additionalClasspathElements>
            <additionalClasspathElement>src/test/resources</additionalClasspathElement>
        </additionalClasspathElements>
        <argLine>-Xmx512m</argLine>
        <includes>
            <include>**/*Test.java</include>
        </includes>
        <excludes>
            <exclude>**/StressTest.java</exclude>
            <exclude>**/ParallelTest.java</exclude>
        </excludes>
    </configuration>
</plugin>

Adding these lines resolves the problem.
    <configuration>
        <additionalClasspathElements>
            <additionalClasspathElement>src/test/resources</additionalClasspathElement>
        </additionalClasspathElements>
    ...
    </configuration>

Original issue reported on code.google.com by jyang733...@gmail.com on 14 Apr 2015 at 6:28

GoogleCodeExporter commented 9 years ago
What is your Maven version ? Can you please run Maven with the debug option and 
attach the output here?
We run the tests loading resources from src/test/resources folder with Maven 2 
and Maven 3, under Linux, Mac and Windows. No problem so far.

Original comment by py4fun@gmail.com on 14 Apr 2015 at 8:08

GoogleCodeExporter commented 9 years ago
>Download the lastes source code (or unzipped) the compressed file,
what do you mean by "the compressed file" ? What is the file ? Where do you get 
it from ?

Original comment by py4fun@gmail.com on 17 Apr 2015 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 20 Apr 2015 at 9:46