2011-12-04 35 views
0

我正在寫一個聲納GWT插件,並且由於封裝結構的變化,插件不再編譯。我改變了結構從聲納插件沒有編譯後,包結構變化

jku.se.drilldown.ui.client 

jku.se.drilldown.client.ui 

我適應我的pom.xml這個,也是gwt.xml文件,但我總是得到這個錯誤:

[INFO] [ERROR] Unable to find type 'jku.se.drilldown.client.ui.BenchmarkViewerPanel' 
[INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable 
[INFO] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source 

路徑條目正確

這是我的pom.xml,並在文件夾下的文件BenchmarkViewer.gwt.xml reso urces/JKU/SE /鑽取/客戶端。該插件位於jku.se.drilldown包中,客戶端下方的查看器以及ui下面的實際gwt面板。

http://maven.apache.org/maven-v4_0_0.xsd「> 4.0.0 jku.se.drilldown 聲納基準-插件 聲納插件 0.1-SNAPSHOT 聲納基準插件

<properties> 
    <sonar.buildVersion>2.11</sonar.buildVersion> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>org.codehaus.sonar</groupId> 
     <artifactId>sonar-plugin-api</artifactId> 
     <version>${sonar.buildVersion}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.codehaus.sonar</groupId> 
     <artifactId>sonar-gwt-api</artifactId> 
     <version>${sonar.buildVersion}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.codehaus.sonar</groupId> 
     <artifactId>sonar-core-gwt</artifactId> 
     <version>${sonar.buildVersion}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.codehaus.sonar</groupId> 
     <artifactId>sonar-ws-client</artifactId> 
     <version>${sonar.buildVersion}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.google.gwt</groupId> 
     <artifactId>gwt-user</artifactId> 
     <version>2.0.1</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.google.gwt</groupId> 
     <artifactId>gwt-incubator</artifactId> 
     <version>2.0.1</version> 
     <scope>provided</scope> 
    </dependency> 

    <!-- unit tests --> 
    <dependency> 
     <groupId>org.codehaus.sonar</groupId> 
     <artifactId>sonar-testing-harness</artifactId> 
     <version>${sonar.buildVersion}</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.8.2</version> 
     <scope>test</scope> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.codehaus.sonar</groupId> 
      <artifactId>sonar-packaging-maven-plugin</artifactId> 
      <version>1.1</version> 
      <extensions>true</extensions> 
      <configuration> 
       <pluginClass>jku.se.drilldown.BenchmarkPlugin</pluginClass> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>gwt-maven-plugin</artifactId> 
      <version>1.2</version> 
      <executions> 
       <execution> 
        <configuration> 
         <modules> 
          <module>jku.se.drilldown.client.BenchmarkViewer</module> 
         </modules> 
         <webappDirectory>${project.build.directory}/classes</webappDirectory> 
         <extraJvmArgs>-Xmx512m</extraJvmArgs> 
        </configuration> 
        <goals> 
         <goal>compile</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.0.2</version> 
      <configuration> 
       <source>1.5</source> 
       <target>1.5</target> 
       <encoding>UTF-8</encoding> 
      </configuration> 
     </plugin> 
    </plugins> 

    <pluginManagement> 
     <plugins> 
      <plugin> 
       <groupId>org.eclipse.m2e</groupId> 
       <artifactId>lifecycle-mapping</artifactId> 
       <version>1.0.0</version> 
       <configuration> 
        <lifecycleMappingMetadata> 
         <pluginExecutions> 
          <pluginExecution> 
           <pluginExecutionFilter> 
            <groupId>org.codehaus.mojo</groupId> 
            <artifactId>gwt-maven-plugin</artifactId> 
            <versionRange>[1.2,)</versionRange> 
            <goals> 
             <goal>compile</goal> 
            </goals> 
           </pluginExecutionFilter> 
           <action> 
            <execute /> 
           </action> 
          </pluginExecution> 
          <pluginExecution> 
           <pluginExecutionFilter> 
            <groupId>org.codehaus.sonar</groupId> 
            <artifactId>sonar-packaging-maven-plugin</artifactId> 
            <versionRange>[1.1,)</versionRange> 
            <goals> 
             <goal>check-dependencies</goal> 
            </goals> 
           </pluginExecutionFilter> 
           <action> 
            <execute /> 
           </action> 
          </pluginExecution> 


         </pluginExecutions> 
        </lifecycleMappingMetadata> 
       </configuration> 
      </plugin> 
     </plugins> 
    </pluginManagement> 

</build> 

<inherits name='com.google.gwt.user.User' /> 
<inherits name="org.sonar.Sonar" /> 

<entry-point class='jku.se.drilldown.client.ui.BenchmarkViewerPanel' /> 

<extend-property name="locale" values="en" /> 
<extend-property name="locale" values="fr" /> 

我正在用maven構建。希望有人對我有幫助,謝謝!

回答

0

如果BenchmarkViewer.gwt.xml….client,那麼你就必須添加<source path="ui"/><source path=""/>,因爲源路徑默認爲client子包。

要麼或移動BenchmarkViewer.gwt.xml向上一個LEVE(使得client一個子包)