My tests need to access the templates in WEB-INF/freemarker

If I configure my directory with the standard

src/main/java
src/main/webapp/WEB-INF/freemarker/myTemplate.ftl
src/main/resources/applicationContext.xml
test/main/resouces/--nothing here--


My tests that require applicationContext.xml work fine, but the ones that
require myTemplate.ftl do not. Super, I just need to add a resource
location, right? I tried the additions below, but it didn't seem to do
anything. Is mvn -X -Dtest=mytest  the best way to get debug output/sort
these things out?

<build>
        <resources>
                <resource>
                        <directory>
                                src/main/resources
                        </directory>
                </resource>
                <resource>
                        <directory>
                                ${warSourceDirectory}
                        </directory>
                </resource>
        </resources>
 </build> 

So I'd like a solution like the above, but if that fails, My 2nd attempt was
making a:
src/main/resources/WEB-INF/freemarker/myTemplate.ftl

This wasn't found either and my app (well actually the freemarkerViewLoader)
looks like it's only checking:  test-classes/

Lastly I tried:
test/main/resources/WEB-INF/freemarker/myTemplate.ftl

and the template is found. 


What I'd really like is some variation on the first option I tried. Is this
incorrect?

2ndly I'm confused as to why the tests find:

src/main/resources/applicationContext.xml
but not 
src/main/resources/WEB-INF/freemarker/myTemplate.ftl

An issue in the way the Spring/Freemarker template loading is happening?

Any ideas? Thanks,
-j
--
View this message in context: 
http://www.nabble.com/WEB-INF+resources+in+test-t1677440.html#a4548550
Sent from the Maven - Users forum at Nabble.com.


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

Reply via email to