Maven gwt:test无法编译并运行GWTTestCase类

时间:2011-07-07 12:18:16

标签: gwt maven

在我们的multimodule maven项目中,我们有一个域项目和一个webapp项目。

我们的GWTTestCase实例 - GwtTestMultipleSelect.java在包含be.applusrtd.metis.client的src / test / java下可用,模块名称引用

@Override
public String getModuleName() {
    return "be.applusrtd.metis.Metis";
}

我们的Metis.gwt.xml在src / main / java下的be.applusrtd.metis包中可用,看起来这个模块文件被正确找到(如果我们将名称更改为一个不存在的位置,它就失败了)

我们也可以从Eclipse(Helios)执行我们的GWT测试,但是使用mvn gwt:test运行它们会失败并显示以下错误日志:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running be.applusrtd.metis.client.GwtTestMultipleSelect
[ERROR] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
[ERROR] log4j:WARN Please initialize the log4j system properly.
[ERROR] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] Validating newly compiled units
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ClientFactory.java'
[INFO]       [ERROR] Line 14: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/test/java/be/applusrtd/metis/client/GwtTestMultipleSelect.java'
[INFO]       [ERROR] Line 12: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/activity/PartyDetailsActivity.java'
[INFO]       [ERROR] Line 27: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]       [ERROR] Line 31: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]       [ERROR] Line 55: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/activity/PartyListActivity.java'
[INFO]       [ERROR] Line 22: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]       [ERROR] Line 24: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/service/PartyServiceAsync.java'
[INFO]       [ERROR] Line 19: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/EnumRenderer.java'
[INFO]       [ERROR] Line 10: No source code is available for type be.applusrtd.metis.client.EnumTranslations; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/PartyDetailsView.java'
[INFO]       [ERROR] Line 13: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/DesktopClientFactoryImpl.java'
[INFO]       [ERROR] Line 27: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/party/PartyDetailsViewImpl.java'
[INFO]       [ERROR] Line 40: No source code is available for type     be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-    webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/party/PartyListViewColumnDefinitions.java'
[INFO]       [ERROR] Line 17: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]       [ERROR] Line 26: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 19.648 sec <<< FAILURE!
[INFO] testAddButtonClicked(be.applusrtd.metis.client.GwtTestMultipleSelect)  Time elapsed:     19.635 sec  <<< ERROR!
[INFO] com.google.gwt.junit.JUnitFatalLaunchException: The test classs 'be.applusrtd.metis.client.GwtTestMultipleSelect' had compile errors; check log for details
[INFO]  at     com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:743)
[INFO]  at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1346)
[INFO]  at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
[INFO]  at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:650)
[INFO]  at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
[INFO]  at junit.framework.TestCase.runBare(TestCase.java:134)
[INFO]  at junit.framework.TestResult$1.protect(TestResult.java:110)
[INFO]  at junit.framework.TestResult.runProtected(TestResult.java:128)
[INFO]  at junit.framework.TestResult.run(TestResult.java:113)
[INFO]  at junit.framework.TestCase.run(TestCase.java:124)
[INFO]  at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
[INFO]  at junit.framework.TestSuite.runTest(TestSuite.java:243)
[INFO]  at junit.framework.TestSuite.run(TestSuite.java:238)
[INFO]  at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun(MavenTestRunner.java:105)
[INFO]  at junit.textui.TestRunner.start(TestRunner.java:180)
[INFO]  at org.codehaus.mojo.gwt.test.MavenTestRunner.main(MavenTestRunner.java:63)

任何想法都会非常受欢迎。 提前致谢

0 个答案:

没有答案