maven - Breaking out Vaadin widgetset compilation -
in order save time compiling, i'm trying break out compilation of widgetsets teamcity build project of own, we're using nexus repo. vaadin "base project" contain dependency widgetset artifact fetch current version. i'm sure has been done before.
the widgetset project builds fine in teamcity. jars , poms correctly uploaded nexus. have unpacked jars make sure in place. far good.
in eclipse, base project fetch widgetset artifact , contain in library. seems good.
however, when "mvn clean package" on base project eclipse , run on tomcat, following error in web browser:
failed load widgetset: ./vaadin/widgetsets/com.example.somerandomapp.web.appwidgetset/com.example.somerandomapp.web.appwidgetset.nocache.js?1376642850734 when check project structure, find no vaadin/widgetset-folder under target folder. additionally, in maven dependency jar-file, there 1 vaadin folder containing gwt-unitcache , 1 vaadin.widgetsets-folder containing widgetset-goodies, - in error message above - mentioned file.
i cannot head around this. i'm no maven pro, may have missed trivial there. i'm no vaadin pro, might have missed trivial there.
i hope there out there me ship in water. appreciate it!
vaadin version: 7.1.1 maven version: 3.0.4
my base project's pom.xml (leaving out stuff brevity):
<dependencies> <!-- random app - commons --> <dependency> <groupid>com.example.somerandomapp.common</groupid> <artifactid>somerandomapp-common-widgetset</artifactid> <version>0.0.5-snapshot</version> </dependency> <!-- vaadin --> <dependency> <groupid>com.vaadin</groupid> <artifactid>vaadin-server</artifactid> <version>${vaadin.version}</version> </dependency> <dependency> <groupid>com.vaadin</groupid> <artifactid>vaadin-client-compiled</artifactid> <version>${vaadin.version}</version> </dependency> <dependency> <groupid>com.vaadin</groupid> <artifactid>vaadin-client</artifactid> <version>${vaadin.version}</version> <scope>provided</scope> </dependency> <dependency> <groupid>com.vaadin</groupid> <artifactid>vaadin-push</artifactid> <version>${vaadin.version}</version> </dependency> <dependency> <groupid>com.vaadin</groupid> <artifactid>vaadin-themes</artifactid> <version>${vaadin.version}</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <version>${javax-servlet-api.version}</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>${maven-war-plugin.version}</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin> </plugins> </build> my widgetset-pom (leaving out stuff brevity):
<!-- same vaadin-plugins in "base project" --> <!-- maven compiler, release, javadoc, deploy , source artifacts --> <plugin> <artifactid>maven-clean-plugin</artifactid> <version>${maven-clean-plugin.version}</version> <configuration> <filesets> <fileset> <directory>src/main/webapp/vaadin/widgetsets</directory> </fileset> </filesets> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>${maven-jar-plugin.version}</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> <excludes> <exclude>vaadin/widgetsets/web-inf/**</exclude> </excludes> </configuration> </plugin> <plugin> <groupid>com.vaadin</groupid> <artifactid>vaadin-maven-plugin</artifactid> <version>${vaadin-plugin.version}</version> <configuration> <extrajvmargs>-xmx512m -xss1024k</extrajvmargs> <!-- <runtarget>mobilemail</runtarget> --> <!-- doing "inplace" subdir vaadin/widgetsets. way compatible vaadin eclipse plugin. --> <webappdirectory>${project.build.outputdirectory}/vaadin/widgetsets</webappdirectory> <hostedwebapp>${project.build.outputdirectory}/vaadin/widgetsets</hostedwebapp> <noserver>true</noserver> <!-- remove draftcompile when project ready --> <draftcompile>false</draftcompile> <compilereport>true</compilereport> <style>obf</style> <strict>true</strict> <runtarget>http://localhost:8080/</runtarget> </configuration> <executions> <execution> <goals> <goal>clean</goal> <goal>resources</goal> <goal>update-theme</goal> <goal>update-widgetset</goal> <goal>compile-theme</goal> <goal>compile</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginmanagement> <plugins> <!--this plugin's configuration used store eclipse m2e settings only. has no influence on maven build itself. --> <plugin> <groupid>org.eclipse.m2e</groupid> <artifactid>lifecycle-mapping</artifactid> <version>1.0.0</version> <configuration> <lifecyclemappingmetadata> <pluginexecutions> <pluginexecution> <pluginexecutionfilter> <groupid>com.vaadin</groupid> <artifactid>vaadin-maven-plugin</artifactid> <versionrange>[7.1.1,)</versionrange> <goals> <goal>update-theme</goal> <goal>resources</goal> <goal>compile-theme</goal> <goal>update-widgetset</goal> </goals> </pluginexecutionfilter> <action> <ignore /> </action> </pluginexecution> </pluginexecutions> </lifecyclemappingmetadata> </configuration> </plugin> </plugins> </pluginmanagement> </build> update: have setup mainui class this:
@webservlet(value = {"/foo/*", "/vaadin/*"} , asyncsupported = true) @vaadinservletconfiguration(productionmode = false, ui = mainui.class, widgetset = "com.example.somerandomapp.common.widgetset.appwidgetset") i realised has , changed correct widgetset. still same error:
failed load widgetset: ./vaadin/widgetsets/com.example.somerandomapp.common.widgetset.appwidgetset/com.example.somerandomapp.common.widgetset.appwidgetset.nocache.js?1376662202437 now, error shows correct path nocache-file in classpath, makes me confused, because file there, in lib folder. hope didn't confuse further....
update 2: adequate:
@webservlet(value = "/*", asyncsupported = true) @vaadinservletconfiguration(productionmode = false, ui = mainui.class, widgetset = "com.example.somerandomapp.common.widgetset.appwidgetset")
the change see after update of op missing.
i'm not sure why vaadin didn't find resources @ first, after wiped "base project" disk , re-fetched svn, did project clean , maven update on it, tomcat working directory clean, magically worked. guess there cached content laying around. hope can else wants break out vaadin widgetsets project of own!
Comments
Post a Comment