Good day,

In addition, there's a difference between

<resource>
  <directory>src/main/resources/</directory>
  <includes>
    <include>foo/bar.xml</include>
  </includes>
</resource>

And

<resource>
  <directory>src/main/resources/foo</directory>
  <includes>
    <include>bar.xml</include>
  </includes>
</resource>

The first one would result to a

target/classes/foo/bar.xml

while the second, to a

target/classes/bar.xml

Thus, if you want a certain directory copied to target\classes ( or
target\test-classes for test resources ), specify in your
<resource><directory/></resource> the path to that certain directory.

Cheers,
Franz


Rod Mclaughlin wrote:
> 
> Thanks again, guys. Plus you can specify where the files come from if 
> you don't want to put them in src/main/resources:
> 
>  <resources>
>                 <resource>
>                 <targetPath>foo</targetPath>
>                 <directory>${basedir}/src/main/java/foo</directory>
>                 <includes>
>                     <include>*.xml</include>
>                 </includes>
>                 </resource>
> ...
> </resources>
> 
> ------------------------------------------------
> Two ways:
> 
> * First is to save the bar.xml into src/main/resources/foo/bar.xml so you
> don't have to configure anything.
> 
> * Second is to use <targetPath>foo</targetPath> in <resource>
> 
> 
> On 4/10/07, Rod Mclaughlin <[EMAIL PROTECTED]> wrote:
> 
> I know how to make Maven copy a buncha files into the classpath, but
> does anyone know how to make it copy into a particular folder? Eg. I want
> src/main/java/foo/bar.xml to go in
> target/classes/foo/
> next to bar.class?
> 
> Thanks for any assistance. I have of course googled for it, to no avail.
> 
>        <resources>
>                <resource>
>                <directory>${basedir}/war/WEB-INF</directory>
>                <includes>
>                    <include>*.properties</include>
>                    <include>*.xml</include>
>                </includes>
>                </resource>
>        </resources>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-NOT-include-test-resources-in-jar-tf3553707s177.html#a9931972
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to