Hello , > You may want to provide a dummy > applicationContext.xml for your app module It means that the applicationContext.xml in app module is a copy(similar) of that in web module.
Additionally, if the XML file is also in web module, I think that still is a trouble. Because applicationContext.xml should in src/mainwebapp/WEB-INF(or its sub-directory), but Java codes are in src/main/java or src/test/java. In the case, Java programs cannot get applicationContext.xml at developing-time, unless the programs use different path from that in final real war file. a cup of Java, cheers! Sha Jiang franz see wrote: > > Good day to you, Sha Jiang, > > You may want to provide a dummy applicationContext.xml for your app > module, wherein it contains only the essential things that you need to > test your app module. > > Cheers, > Franz > > > jiangshachina wrote: >> >> Hi guys, >> I'm using Spring, Struts and Hibernate, and have to deal with so many >> configuration or resource files. >> Then some troubles come out. >> >> Assuming, there is two projects app and web. >> Project app focuses on Simple Application; Project web focuses on Web >> Application. >> Generally, the configuration files(e.g. applicationContext.xml) are in >> web project. >> Now, a JUnit program in app project want to test an application program >> in the same project. >> But the application program depends on applicationContext.xml. >> JUnit program doesn't touch the file, because they are in different >> projects. >> How to solve the problem(excepts for copying the file to app project >> directly)? >> >> In fact, we must encounter too many similar cases in real-world projects. >> >> a cup of Java, cheers! >> Sha Jiang >> > > -- View this message in context: http://www.nabble.com/JUnit-Test-among-multi-projects--tf2635154s177.html#a7415116 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
