[ http://jira.codehaus.org/browse/MNG-1345?page=comments#action_49468 ]
Mark Donszelmann commented on MNG-1345:
---------------------------------------
Maven 2.0
maven-resources-plugin 2.1
checked on unix:
one cannot do:
ls non-existing-directory/../existing-directory
or even
mkdir non-existing-directory/../new-directory
though
mkdir -p non-existing-directory/../new-directory works.
below the real output:
--
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error copying resources
Embedded error:
/afs/slac.stanford.edu/u/ec/duns/w8/freehep-m2/freehep-tools/freehep-aid/target/classes/../generated-sources/filte$
[INFO]
----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error copying resources
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error copying
resources
at
org.apache.maven.plugin.resources.ResourcesMojo.copyResources(ResourcesMojo.java:176)
at
org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:100)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
... 16 more
Caused by: java.io.FileNotFoundException:
/afs/slac.stanford.edu/u/ec/duns/w8/freehep-m2/freehep-tools/freehep-aid/target/classes/$
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:73)
at
org.apache.maven.plugin.resources.ResourcesMojo.copyFile(ResourcesMojo.java:228)
at
org.apache.maven.plugin.resources.ResourcesMojo.copyResources(ResourcesMojo.java:172)
... 19 more
[INFO]
----------------------------------------------------------------------------
> "No such file or directory" when resource targetdirectory contains "../" and
> target/classes does not exist.
> -----------------------------------------------------------------------------------------------------------
>
> Key: MNG-1345
> URL: http://jira.codehaus.org/browse/MNG-1345
> Project: Maven 2
> Type: Bug
> Components: maven-resources-plugin
> Versions: 2.0
> Environment: Linux fails, Windows is fine.
> Reporter: Mark Donszelmann
> Assignee: Edwin Punzalan
> Priority: Minor
> Fix For: 2.0.1
>
>
> "No such file or directory" when resource targetdirectory contains "../" and
> target/classes does not exist.
> example:
> <resource>
> <targetPath>../generated-sources/filter</targetPath>
> <filtering>true</filtering>
> <directory>${basedir}/src/main/java</directory>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> since the targetdirectory is relative to "target/classes" (or whatever the
> setting is to put the class files)
> the plugin fails with a
> "No such file or directory:
> ....target/classes/../generated-sources/filter/....."
> if target/classes does not exist.
> On Windows it works fine, on Unix it fails.
> Workaround: copy some resources to target/classes first, so that
> target/classes exists.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]