Resources Not Copied by Maven2 Build Runner

I am running TeamCity        Professional Version 4.5 on a Linux box with Java 6 and Maven 2.2.1.


I have a Maven2 project that runs perfectly on my Windows machine but not quite so perfectly on TeamCity. The main difference is that files are not being copid as defined in the Maven Resources Plugin.

Here is the configuration:

<plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>src/test/resources/META-INF</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources/META-INF</directory>
                                    <excludes>
                                        <exclude>persistence.xml</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
</plugin>

This works on my Windows machine but fails on the Linux machine where TeamCity runs. As a result, there are test failures.

Any insight into why the copy fails is appreciated.

Thanks.

1 comment
Comment actions Permalink

Hello, Neil

Did you try to run it manually on the same linux machine under the agent's user? The problem may relate to improper local Maven configuration.

If the manual execution succeeds please provide the full log of the failed build.

Thank you.

--
Sergey

0

Please sign in to leave a comment.