2017-08-28 86 views
0

Im使用vaadin-maven-plugin:8.1.2因为我想有不同的widgetset比默认的。 当我编译视窗元件(由Vaadin Eclipse插件)我得到这样的:Vaadin的widgetset编译故障

[INFO] No widgetsets found - generating AppWidgetset if necessary. 
[INFO] Updating widgetset AppWidgetset 
[INFO] Adding resource directory to command classpath: 
C:\Users\myUser\eclipse-workspace\jpex\src\main\resources 
[INFO] Adding resource directory to command classpath: 
C:\Users\myUser\eclipse-workspace\jpex\src\main\resources 
[INFO] Adding resource directory to command classpath: 
C:\Users\myUser\eclipse-workspace\jpex\target\generated-resources\gwt 
[INFO] Using com.vaadin:vaadin-client version 8.1.2 
[INFO] Using com.vaadin:vaadin-client-compiler version 8.1.2 
[INFO] Widgetsets found from classpath: 
[INFO] org.vaadin.sliderpanel.WidgetSet in jar:file:C:/Users/myUser/.m2/repository/org/vaadin/addons/vaadin-sliderpanel/2.0.0/vaadin-sliderpanel-2.0.0.jar!/ 
[INFO] com.vaadin.DefaultWidgetSet in jar:file:C:/Users/myUser/.m2/repository/com/vaadin/vaadin-client/8.1.2/vaadin-client-8.1.2.jar!/ 
[INFO] Addon styles found from classpath: 
[INFO] 
[INFO] Search took 10ms 
[INFO] 
[INFO] --- vaadin-maven-plugin:8.1.2:compile (default-cli) @ jpex --- 
[INFO] auto discovered modules [AppWidgetset] 
[INFO] Using com.vaadin:vaadin-client version 8.1.2 
[INFO] Using com.vaadin:vaadin-client-compiler version 8.1.2 
[INFO] Loading inherited module 'AppWidgetset' 
[INFO] [ERROR] Unable to find 'AppWidgetset.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 4.298 s 
[INFO] Finished at: 2017-08-28T14:31:51+02:00 
[INFO] Final Memory: 30M/448M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.1.2:compile (default-cli) on project jpex: Command [[ 
[ERROR] C:\Program Files\Java\jre1.8.0_141\bin\java -Xmx512M -Xss1024k -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Users\myUser\eclipse-workspace\jpex\target\classes\VAADIN\widgetsets -localWorkers 8 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Users\myUser\eclipse-workspace\jpex\target\.generated AppWidgetset 
[ERROR] ]] failed with status 1 

首先我想问我怎么能强迫插件来用这个的:org.vaadin.sliderpanel.WidgetSet?它总是试图编译com.vaadin:vaadin-client version AppWidgetset.gwt.xml是在target/generated-resources/gwt中自动创建的,具有我实际需要的生成的继承,但不知何故插件无法找到它。

这里是我的web.xml文件:

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> 
    <display-name>jpex</display-name> 

    <servlet> 
    <servlet-name>Servlet</servlet-name> 
    <servlet-class>com.vaadin.spring.server.SpringVaadinServlet</servlet-class> 
    <init-param> 
     <param-name>UI</param-name> 
     <param-value>com.myProject.jpex.ui.JpexUI</param-value> 
    </init-param> 
    <init-param> 
     <param-name>widgetset</param-name> 
     <param-value>org.vaadin.sliderpanel.WidgetSet</param-value> 
    </init-param> 
    </servlet> 
    <welcome-file-list> 
    <welcome-file>index.html</welcome-file> 
    <welcome-file>index.htm</welcome-file> 
    <welcome-file>index.jsp</welcome-file> 
    <welcome-file>default.html</welcome-file> 
    <welcome-file>default.htm</welcome-file> 
    <welcome-file>default.jsp</welcome-file> 
    </welcome-file-list> 

</web-app> 

构建部分从pom.xml的

<build> 
    <pluginManagement> 
     <plugins> 
      <plugin> 
       <groupId>com.vaadin</groupId> 
       <artifactId>vaadin-maven-plugin</artifactId> 
       <version>${vaadin.plugin.version}</version> 

       <configuration> 
        <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> 
        <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory> 
        <draftCompile>false</draftCompile> 
        <compileReport>false</compileReport> 
        <style>OBF</style> 
        <strict>true</strict> 
       </configuration> 

       <executions> 
        <execution> 
         <goals> 
          <goal>update-theme</goal> 
          <goal>update-widgetset</goal> 
          <goal>compile</goal> 
          <goal>compile-theme</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
</build> 

回答

0

我花就像对付它几个小时,当它正要推杆产生AppWidgetset。 gwt.xml文件到src/main/resources。