You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ha...@jpmchase.com on 2006/02/08 13:08:01 UTC

SV: [m2]How to get files into test classpath?

Kaare

I have a similar issue where I want to add a jar to the test classpath, 
before running the tests.
The jar is generated dynamically (at runtime), so I can't make a static 
declaration in the pom.

I need to do something like:

<testResources>
        <testResource>
                <directory>lib/</directory>
                <includes>
                        <include>*.jar</include>
                </includes>
        </testResource>
</testResources>


But it doesn't work when I try.

-Sajjad




Bengt-Erik Fröberg <Be...@ki.se>
24/01/2006 15:01
Please respond to "Maven Users List"

 
        To:     "'Maven Users List'" <us...@maven.apache.org>
        cc: 
        Subject:        SV: [m2]How to get files into test classpath?


Lovely, thanks!

/B-E

-----Ursprungligt meddelande-----
Från: Kaare Nilsen [mailto:kaare.nilsen@gmail.com] 
Skickat: den 24 januari 2006 15:56
Till: Maven Users List
Ämne: Re: [m2]How to get files into test classpath?

You could do like this in your pom:
<build>
...
<testResources>
                                                 <testResource>
 
<directory>/accesscontro/srcl/WEB-INF</directory>
 <includes>
  <include>*.xml</include>
 </includes>
                                                 </testResource>
                                 </testResources>
...
</build>

But rememeber then you need to add your current test resources in
there also.. like .e.g.

<build>
...
<testResources>
                                                 <testResource>
 
<directory>/accesscontro/srcl/WEB-INF</directory>
 <includes>
  <include>*.xml</include>
 </includes>
                                                 </testResource>
                                                 <testResource>
 <directory>src/test/resources</directory>
 <includes>
  <include>*.*</include>
 </includes>
                                                 </testResource>
                                 </testResources>
...
</build>


/Kaare



On 24/01/06, Bengt-Erik Fröberg <Be...@ki.se> wrote:
> Hi
>
>
>
> I want to add the path /accesscontro/srcl/WEB-INF/*.xml to the test
> classpath.
>
> There I have a sping configuration file.
>
> How do I do it?
>
>
>
> Regards,
>
>
>
> /B-E
>
>
>
>
>
> ======================================
>
> Bengt-Erik Fröberg, Databasadministratör
>
> Institutionen för Epidemiologi och Biostatistik (MEB)
>
> Karolinska Institutet
>
> Box 281
>
> 171 77 Stockholm
>
> Tel: (08)-524 823 76
>
> Internet:  <http://www.meb.ki.se/> http://www.meb.ki.se/
>
>
>
>
>

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




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