You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wim Deblauwe <wi...@gmail.com> on 2006/05/16 14:36:55 UTC

[m2] Surefire working directory?

Hi,

I use the dependency-maven-plugin to copy a dll that is needed for my unit
tests. I got it working for "mvn install" by using this configuration:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dependency-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.mycomp.utils</groupId>
                                    <artifactId>utils-os</artifactId>
                                    <version>1.0-SNAPSHOT</version>
                                    <type>dll</type>
                                    <outputDirectory>${project.directory
}</outputDirectory>
                                    <destFileName>utils-os.dll
</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

This copies the dll into the root directory of the project and that makes
the tests run fine. However, when I do "mvn site", the tests do not run
anymore. Is surefire using a different working directory when used via the
'site' goal?

regards,

Wim