resources:copy-resources

2009-04-20 Thread Sean Owen
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
  ...
  outputDirectoryVALUE/outputDirectory
/configuration.

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

configuration
  ...
  resourcesVALUE/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;
  modelVersion4.0.0/modelVersion
  groupIdpose/groupId
  artifactIdposnet/artifactId
  packagingwar/packaging
  version1.1.1-SNAPSHOT/version
  namePositive Energy Web/name

  build
plugins
  plugin
artifactIdmaven-resources-plugin/artifactId
executions
  execution
phasevalidate/phase
goals
  goalcopy-resources/goal
/goals
configuration
  outputDirectorysrc/main/webapp/clients/pse/outputDirectory
  resources
resource

directory/opt/pose/main/clients/pse/trunk/src/main/resources/webclientconfig/clients/pse/assets//directory
  filteringtrue/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!


Re: resources:copy-resources

2009-04-20 Thread jieryn
Hi Sean,

On Fri, Apr 17, 2009 at 7:08 PM, Sean Owen
sean.o...@positiveenergyusa.com wrote:

 ?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;
  modelVersion4.0.0/modelVersion
  groupIdpose/groupId
  artifactIdposnet/artifactId
  packagingwar/packaging
  version1.1.1-SNAPSHOT/version
  namePositive Energy Web/name

  build
    plugins
      plugin
        artifactIdmaven-resources-plugin/artifactId
        executions
          execution
            phasevalidate/phase
            goals
              goalcopy-resources/goal
            /goals
            configuration
              outputDirectorysrc/main/webapp/clients/pse/outputDirectory
              resources
                resource

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

Strictly, you've configured a single execution of the
resources:copy-resources goal. You then attached that configuration to
the build in the validate life cycle phase. You have no configuration
defined for any default resources:copy-resources goal.

 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.

No doubt! Try just copy and pasting your configuration for this plugin
into buildpluginManagementpluginsplugin.. then
re-run your direct execution via mvn resources:copy-resources.

 I've consulted every coworker with any maven experience, and they're all
 mystified.

Yikes! That's kind of discouraging... I'm sorry.

Good luck,
-jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org