Hi all,

I've spent many hours trying to figure this out, and am writing the list as
a last resort.  I have a copy-resources goal configured to move some stuff
from an external directory during a build.  It works fine when I do a mvn
install or mvn jetty:run.  The trouble comes when I try to run the goal on
its own.  If I call mvn resources:copy-resources from the command line, I
get the following error:

[0] Inside the definition for plugin 'maven-resources-plugin' specify the
following:

<configuration>
  ...
  <outputDirectory>VALUE</outputDirectory>
</configuration>.

[1] Inside the definition for plugin 'maven-resources-plugin' specify the
following:

<configuration>
  ...
  <resources>VALUE</resources>
</configuration>.


Of course these values are in fact specified in my pom, as evidenced by the
fact that the copy-resources goal is executed successfully when I run a
build.  However, nothing I have tried seems to be able to get maven to
recognize this when I run the goal on its own.  I even went so far as to
remove everything else from my pom.  Here's the trimmed-down version:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>pose</groupId>
  <artifactId>posnet</artifactId>
  <packaging>war</packaging>
  <version>1.1.1-SNAPSHOT</version>
  <name>Positive Energy Web</name>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>src/main/webapp/clients/pse</outputDirectory>
              <resources>
                <resource>

<directory>/opt/pose/main/clients/pse/trunk/src/main/resources/webclientconfig/clients/pse/assets/</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

If I run mvn resources:copy-resources with the above pom, I get the same
error, asking for outputDirectory and resources, both of which are plainly
specified above.

I've consulted every coworker with any maven experience, and they're all
mystified.  Can anyone offer any insight?  I'm at my wits' end on this one!

Thanks in advance!

Reply via email to