You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Carlos Sanchez (JIRA)" <ji...@codehaus.org> on 2005/08/05 02:30:57 UTC

[jira] Closed: (MPTEST-7) test plug-in and jndi.properties

     [ http://jira.codehaus.org/browse/MPTEST-7?page=all ]
     
Carlos Sanchez closed MPTEST-7:
-------------------------------

    Resolution: Cannot Reproduce

> test plug-in and jndi.properties
> --------------------------------
>
>          Key: MPTEST-7
>          URL: http://jira.codehaus.org/browse/MPTEST-7
>      Project: maven-test-plugin
>         Type: Bug
>  Environment: Not relevant for this issue
>     Assignee: james strachan
>     Priority: Minor

>
>
> My setup is as follows: an EJB and a JUnit test case to test the EJB. The standard j2ee.jar is in the dependency classpath. I have a jndi.properties file in a directory "test/data" and have declared:
>  <build>
>         ...
>         <unitTest>
>           ...
>           <resources>
>             <resource>
>               <directory>test/data</directory>
>               <includes>
>                 <include>*.*</include>
>               </includes>
>             </resource>
>           </resources>
>         </unitTest>
>  </build>
> When I run the test:test goal, the plug-in puts dependencies and then test resources in the classpath. As a consequence, the jndi.properties from j2ee.jar is loaded when the unit test code creates a new initial context. Hence, my local jndi.properties has no effect. 
> The obvious work-around is to not rely on the standard jndi.properties naming convention.
> However this inconvenience is easy to fix by changing the order of the classpath in plugin.jelly to:
> <classpath>
>     <pathelement location="${maven.test.dest}"/>
>     <path refid="maven.dependency.classpath"/>
>     <pathelement location="${maven.build.dest}"/>
>     <pathelement path="${plugin.getDependencyPath('junit')}"/>
> </classpath>

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org