You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gulhan <gu...@gmail.com> on 2006/09/15 17:29:49 UTC

test resource problem


Hi all,

I am using maven1.0.2 to run my projects unit tests'. The src/java which
contains my source classes has a folder that keeps the resource files  and
the test classes use this directory.
I have tried to add this directory as resource in project.xml file but it
does not see this directory and does not find resources during unit test
execution.

The build part of my project.xml is :

<build>
       <sourceDirectory>src/java</sourceDirectory>
       <unitTestSourceDirectory>src/UnitTest</unitTestSourceDirectory>
       <resources>
             <resource>
                      <directory>src/UnitTest</directory>
             </resource>
             <resource>
                      <directory>src/java</directory>
             </resource>
       </resources>
      <unitTest>
       <resources>
             <resource>
                      <directory>src/UnitTest</directory>
             </resource>
             <resource>
                      <targetPath>resource</targetPath>
                      <directory>src/java/resource</directory>
             </resource>
       </resources>
      <includes>
              <include>**/*AllTests.java</include>
      </includes>
      </unitTest>
</build>

How can I resolve this problem? Is there anyway to show this directory as
resource during unit test execution?

Thanks,
  
-- 
View this message in context: http://www.nabble.com/test-resource-problem-tf2278271.html#a6327642
Sent from the Maven - Users forum at Nabble.com.


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


Re: test resource problem

Posted by manoj kaushik <ma...@daffodildb.com>.
hi
you can try this:
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
    <!-- Unit test classes -->
    <unitTest>
      <includes>
        <include>**/Test*.java</include>
      </includes>
    </unitTest>

On 9/15/06, gulhan <gu...@gmail.com> wrote:
>
>
>
> Hi all,
>
> I am using maven1.0.2 to run my projects unit tests'. The src/java which
> contains my source classes has a folder that keeps the resource files  and
> the test classes use this directory.
> I have tried to add this directory as resource in project.xml file but it
> does not see this directory and does not find resources during unit test
> execution.
>
> The build part of my project.xml is :
>
> <build>
>        <sourceDirectory>src/java</sourceDirectory>
>        <unitTestSourceDirectory>src/UnitTest</unitTestSourceDirectory>
>        <resources>
>              <resource>
>                       <directory>src/UnitTest</directory>
>              </resource>
>              <resource>
>                       <directory>src/java</directory>
>              </resource>
>        </resources>
>       <unitTest>
>        <resources>
>              <resource>
>                       <directory>src/UnitTest</directory>
>              </resource>
>              <resource>
>                       <targetPath>resource</targetPath>
>                       <directory>src/java/resource</directory>
>              </resource>
>        </resources>
>       <includes>
>               <include>**/*AllTests.java</include>
>       </includes>
>       </unitTest>
> </build>
>
> How can I resolve this problem? Is there anyway to show this directory as
> resource during unit test execution?
>
> Thanks,
>
> --
> View this message in context:
> http://www.nabble.com/test-resource-problem-tf2278271.html#a6327642
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>