The following issue has been updated:

    Updater: dion gillard (mailto:[EMAIL PROTECTED])
       Date: Tue, 2 Sep 2003 8:43 PM
    Changes:
             timeoriginalestimate changed from 0
             timeestimate changed from 0 minutes
             Fix Version changed to 1.1
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-726&page=history

---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-726


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-726
    Summary: test plug-in and jndi.properties
       Type: Bug

     Status: Assigned
   Priority: Minor

 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             plugin-test
   Fix Fors:
             1.1

   Assignee: james strachan
   Reporter: 

    Created: Tue, 14 Jan 2003 3:50 AM
    Updated: Tue, 2 Sep 2003 8:43 PM
Environment: Not relevant for this issue

Description:
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>


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to