You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by martin krüger <br...@googlemail.com> on 2011/01/25 09:10:20 UTC
How to loose the "/target/..."
Hi everyone,
currently I try to copy some files with the "maven-resources-plugin". Is
there any chance to get rid of the "/target/" folder during the copy of
files? I'm using the following lines:
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/site</directory>
<targetPath>${staging.dir}/bin</targetPath>
</resource>
and it results always in something like /target/myFolder/file.
Or even better. Is there a chance to loose the whole folder structure during
the copy action? If the source is something like
+src
+-main
+--a.file
+--b.file
+--c.file
---> result
+mytarget
+-a.file
+-b.file
+-c.file
Re: How to loose the "/target/..."
Posted by Antonio Petrelli <an...@gmail.com>.
2011/1/25 martin krüger <br...@googlemail.com>:
> currently I try to copy some files with the "maven-resources-plugin". Is
> there any chance to get rid of the "/target/" folder during the copy of
> files? I'm using the following lines:
>
> <resource>
> <filtering>true</filtering>
> <directory>${basedir}/src/site</directory>
> <targetPath>${staging.dir}/bin</targetPath>
> </resource>
> and it results always in something like /target/myFolder/file.
Strange, it should work. Are you sure your files are under src/site?
Did you try using only:
<directory>src/site</directory>
> Or even better. Is there a chance to loose the whole folder structure during
> the copy action? If the source is something like
> +src
> +-main
> +--a.file
> +--b.file
> +--c.file
> ---> result
> +mytarget
> +-a.file
> +-b.file
> +-c.file
If the resource is correctly configured, this is the way it should work.
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to loose the "/target/..."
Posted by Marc Rohlfs <po...@googlemail.com>.
Looks a little strange to me, trying to do this kind of copy action
using the POMs build resources configuration. I'd suggest to use the
'resources:copy-resources' goal:
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html.
The 'outputDirectory' parameter should be configurable with any path,
even outside of the 'target' directory - You'd have to try it, I didn't
double-check ...
On 25/01/11 09:10, martin krüger wrote:
> Hi everyone,
>
> currently I try to copy some files with the "maven-resources-plugin". Is
> there any chance to get rid of the "/target/" folder during the copy of
> files? I'm using the following lines:
>
> <resource>
> <filtering>true</filtering>
> <directory>${basedir}/src/site</directory>
> <targetPath>${staging.dir}/bin</targetPath>
> </resource>
> and it results always in something like /target/myFolder/file.
>
> Or even better. Is there a chance to loose the whole folder structure during
> the copy action? If the source is something like
> +src
> +-main
> +--a.file
> +--b.file
> +--c.file
> ---> result
> +mytarget
> +-a.file
> +-b.file
> +-c.file
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org