I think what you see is related to MAGNOLIA-2593. There is a workaround for this issue shown for example at TransactionalSyndicatorTest.initDefaultImplementations() method.
The reason why this doesn't fail in eclipse is that you don't have completely clean environment there. HTH, Jan On Wed, 2010-04-14 at 10:37 +0200, Matteo Pelucco wrote: > Hi all, > I'm going to introduce in a project some basic repository-based Unit Test. > > I've started reading here: > http://wiki.magnolia-cms.com/display/DEV/Testing+Magnolia > > and I am now able to run correctly some basic test with JUnit in Eclipse. > > But an external execution of mvn clean test fail with the attached > surefire report. The exception is: > > *info.magnolia.module.ModuleManagementException: No module definition* > > Anybody can help me? > The strange thing is that in Eclipse everything works fine... > > Thanks in advance.. > Matteo > > > *** > ------------------------------------------------------------------------------- > Test set: testing.MockRepoTest > ------------------------------------------------------------------------------- > Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.025 > sec <<< FAILURE! > testRepoIsReady(testing.MockRepoTest) Time elapsed: 0.005 sec <<< ERROR! > java.lang.RuntimeException: > info.magnolia.module.ModuleManagementException: No module definition was > found. > at > info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:131) > at > info.magnolia.test.MgnlTestCase.initDefaultImplementations(MgnlTestCase.java:110) > at info.magnolia.test.MgnlTestCase.setUp(MgnlTestCase.java:73) > at junit.framework.TestCase.runBare(TestCase.java:128) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:120) > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) > Caused by: info.magnolia.module.ModuleManagementException: No module > definition was found. > at > info.magnolia.module.ModuleManagerImpl.loadDefinitions(ModuleManagerImpl.java:126) > at > info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:128) > ... 23 more > Caused by: info.magnolia.module.ModuleManagementException: No module > definition was found. > at > info.magnolia.module.ModuleManagerImpl.loadDefinitions(ModuleManagerImpl.java:126) > at > info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:128) > ... 23 more > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
