최근에 Vaadin 7을 Vaadin 8로 업데이트했습니다.이 구성 요소 중 하나가 작동하지 않았으며 오늘 문제를 분석 할 때 Vaadin 7 , 그리고 미스 매치. 그래서 Vaadin 8 (아직 모든 .v7
라이브러리를 사용하고 있지만 UI 클래스에 @Widgetset("com.vaadin.v7.Vaadin7WidgetSet")
을 추가하고 vaadin-compatibility-client-compiled
maven 종속성을 추가했습니다.)
이 구성 요소의 테스트 WAR은 그대로 작동합니다. 이 새로운 버전을 Nexus에 배포했습니다 (실제로 모든 Vaadin 7 및 Viritin 구성 요소를 Vaadin 8로 업데이트 할 수 있습니다). pom.xml
에서 버전을 업데이트했으나 이전과 같은 오류가 발생하여 구성 요소의 UI 클래스에 @Widgetset
을 추가했습니다. 주 프로젝트에는 이미 사용자 정의 Widgetset이 포함 된 @Widgetset
이 있습니다. com.vaadin.v7.Vaadin7WidgetSet
으로 <inherits>
으로이 Widgetset.gwt.xml
우리의 주요 프로젝트의 파일,하지만 내가 할 때 저장, 일부 Maven 플러그인을 자동으로 원래대로 그것을 다시 설정합니다.Vaadin Widgetset.gwt.xml 컴파일시 상속 태그가 자동으로 제거됨
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.DefaultWidgetSet" />
<stylesheet src="resetbuttonfortextfield/styles.css" />
</module>
그리고이 두 줄을 추가 할 때 :
<!-- TODO: Remove following inherit after Templates Component has been migrated to Vaadin 8 -->
<inherits name="com.vaadin.v7.Vaadin7WidgetSet" />
만 TODO-댓글이 저장 한 후 남아
이 우리의 Widgetset.gwt.xml
현재 모습입니다. 이 프로젝트의 동료들은 모두 현재 저녁에있는 세계의 다른 쪽에서 살고 있기 때문에 실제로 도움을 청할 수는 없으므로 대신 StackOverflow를 사용합니다. 여기
pom.xml
이고, 나는 그것을 저장 한 후 여기에 뭔가를 재설정
Widgetset.gwt.xml
발생 생각 :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>our.project</groupId>
<artifactId>web-parent</artifactId>
<version>develop-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>web2-widgetset</artifactId>
<name>web2-widgetset</name>
<packaging>jar</packaging>
<dependencies>
<!-- Versions for these are configured in the parent POM -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<configuration>
<extraJvmArgs>-Xmx1024M -Xss2048k</extraJvmArgs>
<webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
<draftCompile>true</draftCompile>
<compileReport>false</compileReport>
<!-- Change to PRETTY (or possibly DETAILED) to get unobfuscated client side stack traces. A better approach for debugging is to use Super Dev Mode -->
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<goals>
<goal>update-widgetset</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Vaadin-Package-Version>1</Vaadin-Package-Version>
<Vaadin-Widgetsets>our.project.Widgetset</Vaadin-Widgetsets>
</manifestEntries>
</archive>
<!-- Exclude some unnecessary files generated by the GWT compiler. -->
<excludes>
<exclude>VAADIN/gwt-unitCache/**</exclude>
<exclude>VAADIN/widgetsets/WEB-INF/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
나는 vaadin-maven-plugin
와 함께 있으리라 믿고있어를 <goal>update-widgetset</goal>
입니다 내 <inherits>
-tag을 제거하기위한 책임 Widgetset.gwt.xml
하지만 완전히 확신 할 수는 없습니다. 나는 아직도 일반적으로 Maven에 비교적 새로운 편이다.
하지만 맞다면 pom.xml
을 어떻게 수정해야합니까? <inherits>
태그가 필요합니까?
TL; DR : 어떻게 영구적으로 (우리의 메이븐 pom.xml
에서 일부 플러그인이 수동으로 변경 덮어 쓰기를하지 않고) 내 Widgetset.gwt.xml
에 추가 <inherits>
-tag를 추가하려면?
편집 : 나는 Widgetset.gwt.xml
더 이상 업데이트되지 않습니다 <goal>update-widgetset</goal>
을 주석, 그러나 pom.xml
에서 오류를주는 경우 : 이미 오른쪽 방향으로 큰 단계입니다
GWT Module com.vaadin.v7.Vaadin7WidgetSet not found in project sources or resources. (com.vaadin:vaadin-maven-plugin:8.0.6:compile:default:process-classes)
org.apache.maven.plugin.MojoExecutionException: GWT Module com.vaadin.v7.Vaadin7WidgetSet not found in project sources or resources.
at org.codehaus.mojo.gwt.shell.CompileMojo.compilationRequired(CompileMojo.java:701)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:567)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:435)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:182)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at com.vaadin.integration.eclipse.maven.VaadinMojoExecutionBuildParticipant.build(VaadinMojoExecutionBuildParticipant.java:87)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.codehaus.mojo.gwt.utils.GwtModuleReaderException: GWT Module com.vaadin.v7.Vaadin7WidgetSet not found in project sources or resources.
at org.codehaus.mojo.gwt.AbstractGwtModuleMojo.readModule(AbstractGwtModuleMojo.java:209)
at org.codehaus.mojo.gwt.GwtModule.getLocalInherits(GwtModule.java:189)
at org.codehaus.mojo.gwt.GwtModule.getInherits(GwtModule.java:149)
at org.codehaus.mojo.gwt.GwtModule.getEntryPoints(GwtModule.java:114)
at org.codehaus.mojo.gwt.shell.CompileMojo.compilationRequired(CompileMojo.java:615)
... 36 more
<inherits>
이 자동으로 제거 된 원인. 내가 올바르게 이해하면 관련 종속성을 파악하고 pom.xml
에 추가해야하는 것 같습니다.
시도 했습니까? https://github.com/vaadin/framework8-migration-tool (궁금합니다) – petey
@petey 아, 아니요. 이 구성 요소가 아닙니다. 나는 우리 동료가 주 프로젝트를 Vaadin 8로 옮겼을 때 그것을 사용했다고 생각합니다. 그래도 나는 그것을 볼 수 있습니다 ... 그 자식의 readme에서 당신은 "_ 도구가 없으면, 나는 'vaadin-client'와 'vaadin-client-compiled'를 수동으로 'compatibility'버전으로 변경해야한다. 몇 시간이 지나면 이전 git 태그로 돌아가서 구성 요소를 사용해보십시오. 수동 변경 사항과 다른 점을 확인하십시오. –