maven - Vaadin Widgetset.gwt.xml inherits-tag automatically removed on compile -


recently updated vaadin 7 vaadin 8. 1 of our components wasn't working, , when analyzing problem today found due still being vaadin 7, , having mismatches. updated component vaadin 8 (although still using .v7 libraries now, , added @widgetset("com.vaadin.v7.vaadin7widgetset") on ui class, added vaadin-compatibility-client-compiled maven dependency.
our test-war of component working should again, , deployed new version our nexus (with todo update vaadin 7 , viritin components vaadin 8).

now in our main project (where use component) i've updated it's version in pom.xml, when running gave same error before added @widgetset component's ui-class. our main project has @widgetset custom widgetset of ours. figured i'd add com.vaadin.v7.vaadin7widgetset <inherits> widgetset.gwt.xml file of our main project, when , save, maven plugin autmatically resets was.

this our widgetset.gwt.xml looks like:

<?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> 

and when try add these 2 lines:

<!-- todo: remove following inherit after templates component has been migrated vaadin 8 --> <inherits name="com.vaadin.v7.vaadin7widgetset" /> 

only todo-comment remains after saving. since co-workers project live on other side of world it's evening, can't contact them help, resort stackoverflow instead.

here our pom.xml reference, , think here causes widgetset.gwt.xml reset after save it:

<?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 these configured in 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 pretty (or possibly detailed) unobfuscated client side stack traces. better approach debugging 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 unnecessary files generated gwt compiler. -->           <excludes>             <exclude>vaadin/gwt-unitcache/**</exclude>             <exclude>vaadin/widgetsets/web-inf/**</exclude>           </excludes>         </configuration>       </plugin>     </plugins>   </build>  </project> 

i'm assuming vaadin-maven-plugin <goal>update-widgetset</goal> responsible removing <inherits>-tag in widgetset.gwt.xml, i'm not entirely sure. i'm still relatively new maven in general.
if i'm right, how modify pom.xml add <inherits>-tag need?

tl;dr: how permanently add additional <inherits>-tag in widgetset.gwt.xml (without having plugin in our maven pom.xml overwrite these manual changes)?


edit: if comment out <goal>update-widgetset</goal> widgetset.gwt.xml isn't updated anymore, giving error in 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.     @ org.codehaus.mojo.gwt.shell.compilemojo.compilationrequired(compilemojo.java:701)     @ org.codehaus.mojo.gwt.shell.compilemojo.compile(compilemojo.java:567)     @ org.codehaus.mojo.gwt.shell.compilemojo.doexecute(compilemojo.java:435)     @ org.codehaus.mojo.gwt.shell.abstractgwtshellmojo.execute(abstractgwtshellmojo.java:182)     @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:134)     @ org.eclipse.m2e.core.internal.embedder.mavenimpl.execute(mavenimpl.java:331)     @ org.eclipse.m2e.core.internal.embedder.mavenimpl$11.call(mavenimpl.java:1362)     @ org.eclipse.m2e.core.internal.embedder.mavenimpl$11.call(mavenimpl.java:1)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:112)     @ org.eclipse.m2e.core.internal.embedder.mavenimpl.execute(mavenimpl.java:1360)     @ org.eclipse.m2e.core.project.configurator.mojoexecutionbuildparticipant.build(mojoexecutionbuildparticipant.java:52)     @ com.vaadin.integration.eclipse.maven.vaadinmojoexecutionbuildparticipant.build(vaadinmojoexecutionbuildparticipant.java:87)     @ org.eclipse.m2e.core.internal.builder.mavenbuilderimpl.build(mavenbuilderimpl.java:137)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder$1.method(mavenbuilder.java:172)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder$1.method(mavenbuilder.java:1)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod$1$1.call(mavenbuilder.java:115)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:112)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod$1.call(mavenbuilder.java:105)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:151)     @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:99)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod.execute(mavenbuilder.java:86)     @ org.eclipse.m2e.core.internal.builder.mavenbuilder.build(mavenbuilder.java:200)     @ org.eclipse.core.internal.events.buildmanager$2.run(buildmanager.java:734)     @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42)     @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:205)     @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:245)     @ org.eclipse.core.internal.events.buildmanager$1.run(buildmanager.java:300)     @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42)     @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:303)     @ org.eclipse.core.internal.events.buildmanager.basicbuildloop(buildmanager.java:359)     @ org.eclipse.core.internal.events.buildmanager.build(buildmanager.java:382)     @ org.eclipse.core.internal.events.autobuildjob.dobuild(autobuildjob.java:144)     @ org.eclipse.core.internal.events.autobuildjob.run(autobuildjob.java:235)     @ 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.     @ org.codehaus.mojo.gwt.abstractgwtmodulemojo.readmodule(abstractgwtmodulemojo.java:209)     @ org.codehaus.mojo.gwt.gwtmodule.getlocalinherits(gwtmodule.java:189)     @ org.codehaus.mojo.gwt.gwtmodule.getinherits(gwtmodule.java:149)     @ org.codehaus.mojo.gwt.gwtmodule.getentrypoints(gwtmodule.java:114)     @ org.codehaus.mojo.gwt.shell.compilemojo.compilationrequired(compilemojo.java:615)     ... 36 more 

which great step in right direction of caused <inherits> removed automatically. seems need figure out relevant dependency , add pom.xml if understand correctly.

ok, fixed. came across post of else migrating vaadin 7 8 , having issues widgetset: https://vaadin.com/forum/#!/thread/15031831/15036434

and first reply (which quote here) solved problem:

hi, know enjoying new version :) check following:

  • you have replace vaadin-server dependency vaadin-compatibility-server.
  • if using default widgetset (you not compiling yourself):
    • replace vaadin-client-compiled dependency vaadin-compatibility-client-compiled.
    • add @widgetset("com.vaadin.v7.vaadin7widgetset") ui implementations.
  • if using custom widgetset:
    • replace vaadin-client dependency vaadin-compatibility-client.
    • recompile it.

so changed vaadin-client vaadin-compatibility-client in our widgetset's pom.xml , <inherits>-tag remains.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -