ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Bibb <richard.b...@aimhedge.com>
Subject Maven and iBatis 3.0 - Excuse me for the stupid question
Date Thu, 27 Aug 2009 07:53:02 GMT

I'm probably being silly here as I don't seem to be able to figure out where
to put my sqlMap XML files in my Maven project.

Everything works fine when I just use iBatis in the main code but when I try
to ise iBatis in the unit test code iBatis cannot find the xml files for the
modules under test.

My current directory structure looks like this

       |          config
       |            |
       |          java......
       |            |             core
       |            |                |
       |            |             data
       |            |                      sqlmaps
       |          resources
                     |            core
                     |              |
                     |            data
                     |                     sqlmaps

The sqlmap files go in the obvious directories. These files are located
using the <mappers> section in the config file.

<mapper resource="sqlmaps/someMapper.xml"/>

The problem is, when under test how do I distinguish between the Mappers
under test and those being used to do the testing? At the moment I only seem
to be able to get things to work if I put all the Mapper.xml files in the
test sqlmaps directory. Clearly this isn't good.

Can someone offer advice to a maven/iBatis novice?

View this message in context: http://www.nabble.com/Maven-and-iBatis-3.0---Excuse-me-for-the-stupid-question-tp25167237p25167237.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message