2013-01-13 40 views
1

當試圖從運行Maven的命令行我們的GWT應用程序,我得到以下錯誤:runTarget缺失或無效 - 在GWT Maven項目

參數「runTarget」爲目標org.codehaus.mojo:GWT-行家-plugin:2.4.0:運行丟失或無效。

但是,這是在pom.xml如下:

<plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>gwt-maven-plugin</artifactId> 
      <!-- <version>2.5.0</version> 2.1.0-1 --> 
      <version>${gwt.version}</version> 
      <configuration> 
       <configuration> 
        <runTarget>com.magick.webtrader/Webtrader.html</runTarget> 
        <buildOutputDirectory>${project.build.outputDirectory}</buildOutputDirectory> 
        <generateDirectory>${project.build.directory}/generated-sources/gwt</generateDirectory> 
        <hostedWebapp>${webappDirectory}</hostedWebapp> 
        <copyWebApp>true</copyWebApp> 
        <draftCompile>true</draftCompile> 
        <webXml>${basedir}/war/WEB-INF/web.xml</webXml> 
       </configuration> 

      </configuration> 

      <executions> 
       <execution> 
        <goals> 
         <goal>compile</goal> 
         <goal>test</goal> 
         <goal>generateAsync</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

什麼是我做錯了?

感謝

回答

1

我不認爲你需要嵌套那些<Configuration>元素即<Configuration>內的另一個<Configuration>。嘗試解決這個問題,看看它是否有效。在附註中,如果您使用默認值,則不需要明確指定參數<buildOutputDirectory>

0

如果您使用的是eclipse和m2e,請在pom編輯器中打開pom文件,它會在您的POM.xml中顯示錯誤。

一個這樣的錯誤是在您的Conifugration標記。確保您放棄額外的配置標籤。

而且經常檢查你的pom.xml w.r.t品嚐來自GWT團隊的 -

1)Validation

2)Dynatablerf

3)Mobilewebapp

相關問題