I’ve unsuccessfully tried to add this add-on to an existing Vaading project using maven.
Does this add-on have the correct structure to be added in such a way?
There are many threads in the forum regarding maven add-on/widgetset problems. Is there a step-by-step procedure I can follow?
Somewhere under src/main/java directory in your project add a GWT module descriptor file
For example make a package called org.your.group.gwt and then in there make a SomethingWidgetSet.gwt.xml
In this file add something like the following
<module>
<!--
This file is automatically updated based on new dependencies by the
goal "vaadin:update-widgetset".
Running the goals "gwt:clean gwt:compile" may be required to compile
the widgetset until http://jira.codehaus.org/browse/MGWT-148 is
resolved.
-->
<!--
This is needed because of a bug in gwt-maven-plugin 1.2
(http://jira.codehaus.org/browse/MGWT-147):
modules without entry points are never compiled.
-->
<entry-point class="com.vaadin.terminal.gwt.client.DefaultWidgetSet" />
<!-- Inherit DefaultWidgetSet -->
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<!-- WidgetSet default theme -->
<!-- <stylesheet src="colorpicker/styles.css"/> -->
</module>
In the web.xml file for your project, something like the following should be present (this might not be strictly necessary, but doesn’t hurt either)
If you made your project with the vaadin-archetype-sample, your pom file is more or less ready.
If you made your project with vaadin-archetype-clean then you have to uncomment the commented code.
It is probably a good idea to change vaadin dependency to 6.3 (it defaults to 6.2 at time of writing)
and gwt-user to 2.0.3 (it defaults to 1.7.1 at time of writing).
Also add a dependency to the addOn that we mavenized in step 3
Something like
I did not test this procedure, but overall it looks correct to me.
Note that steps 4-6 are only needed the first time, not when adding other add-ons to a project after the first. Furthermore, steps 4-5 are already done in the vaadin-archetype-sample, although redoing them (perhaps just copying files) to change the name of the widgetset might be useful.
So when adding a second add-on to a project, the steps are something like:
a) download the add-on and run mvn install:install-file to install the add-on to your local repository
b) add a dependency to the add-on
c) mvn clean vaadin:update-widgetset
d) refresh the project and use the add-on
A new version (1.2.0) of the archetypes are out and they now default to Vaadin 6.3.1 and GWT 2.0.3.
I used the following process to verify that add-ons work with Maven and the new archetype:
I can confirm that these steps worked for me and solved the problem I was having with trying to get an Add-On working. I was able to get this playingcards add on working and then was also able to get the VaadinVisualizations addon working as well in the same test project - which I had previously been struggling to get working.
One odd thing was that the first time I built this project I only did mvn install and got an error (which I didn’t save sorry), but once I did mvn vaadin:update-widgetset install everything started to work properly. The other part to this that I can’t explain is that when I tried to replicate the earlier problem by doing mvn clean install it didn’t fail. So I’m not sure what’s happening here but thought it might be worth mentioning that mvn vaadin:update-widgetset install is a good thing to try if you are having problems.
I updated to Vaadin 6.4.0 and ran into problems with the WidgetSet.
I saw in the vaadin-archetype-sample that gwt-maven-plugin version has been changed from 1.2 to 1.3 and that the is no longer needed in the .gwt.xml file
You can see my gwt.xml file in my earlier post.
Is it correct that it now should only have the following:
What problems - or is it just that the instructions are not clear?
Some errors during widgetset compilation? Your widgets not getting included in the widgetset?
This looks correct to me as the content of a widgetset. As you said, the entry point line should be removed (it was redundant already earlier, only needed as a workaround for a Maven GWT plugin bug) and you should use the 1.3-SNAPSHOT version of the Maven GWT plugin.
This is only for very special cases where you do need to override functionality in the widgetset class.
If you don’t know why you would need to do that, you probably don’t need to do it.
Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.24:run (default-cli) on project myProject: Unable to parse configuration of mojo org.mortbay.jetty:maven-jetty-plugin:6.1.24:run for parameter baseResource: Setter org.mortbay.resource.ResourceCollection.setResourcesAsCSV( java.lang.Class ) threw exception when called with parameter 'src/main/webapp,/home/benny/heliosWorkspace/myProject/target/myProject-1-SNAPSHOT': java.lang.IllegalArgumentException: file:/home/benny/heliosWorkspace/myProject/target/myProject-1-SNAPSHOT is not an existing directory. InvocationTargetException
I understand this is more a maven problem than a vaadin problem, but perhaps you’ve seen it before
It seems like it is the 1.3-SNAPSHOT version of gwt-maven-plugin that does not compile the widgetset, and that is why I get that error I mentioned before (since the path …myProject/target/myProject-1-SNAPSHOT is never made).
When using 1.2-SNAPSHOT the output is:
.
.
.
--- maven-resources-plugin:2.4.1:resources (default-resources) @ myProject ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /home/bhj/heliosWorkspace/myProject/src/main/resources
[INFO]
[INFO]
--- gwt-maven-plugin:1.2-SNAPSHOT:resources (default) @ myProject ---
[INFO]
auto discovered modules [broadway.myProject.gwt.myProjectWidgetSet]
[INFO]
1 source files copied from GWT module broadway.myProject.gwt.myProjectWidgetSet
[INFO]
[INFO]
--- maven-compiler-plugin:2.0.2:compile (default-compile) @ myProject ---
[INFO]
Nothing to compile - all classes are up to date
[INFO]
[INFO]
--- gwt-maven-plugin:1.2-SNAPSHOT:compile (default) @ myProject ---
[INFO]
using GWT jars from project dependencies : 2.0.3
[INFO]
auto discovered modules [broadway.myProject.gwt.myProjectWidgetSet]
[INFO]
establishing classpath list (scope = compile)
[INFO]
Compiling module broadway.myProject.gwt.myProjectWidgetSet
[INFO]
Scanning for additional dependencies: jar:file:/home/bhj/.m2/repository/com/vaadin/vaadin/6.3.4/vaadin-6.3.4.jar!/com/vaadin/terminal/gwt/client/DefaultWidgetSet.java
[INFO]
Computing all possible rebind results for 'com.vaadin.terminal.gwt.client.WidgetMap'
[INFO]
Rebinding com.vaadin.terminal.gwt.client.WidgetMap
[INFO]
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@88d1f2
[INFO]
Detecting Vaadin components in classpath to generate WidgetMapImpl.java ...
[INFO]
Widget set will contain implementations for following components:
[INFO]
com.vaadin.ui.AbsoluteLayout
[INFO]
com.vaadin.ui.Accordion
[INFO]
com.vaadin.ui.Button
[INFO]
com.vaadin.ui.CheckBox
[INFO]
com.vaadin.ui.ComboBox
.
.
.
When using 1.3-SNAPSHOT the output is:
.
.
.
[INFO]
--- maven-resources-plugin:2.4.1:resources (default-resources) @ myProject ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /home/bhj/heliosWorkspace/myProject/src/main/resources
[INFO]
[INFO]
--- gwt-maven-plugin:1.3-SNAPSHOT:resources (default) @ myProject ---
[INFO]
auto discovered modules [broadway.myProject.gwt.myProjectWidgetSet]
[INFO]
1 source files copied from GWT module broadway.myProject.gwt.myProjectWidgetSet
[INFO]
[INFO]
--- maven-compiler-plugin:2.0.2:compile (default-compile) @ myProject ---
[INFO]
Nothing to compile - all classes are up to date
[INFO]
[INFO]
--- vaadin-maven-plugin:1.0.0:update-widgetset (default) @ myProject ---
[INFO]
auto discovered modules [broadway.myProject.gwt.myProjectWidgetSet]
[INFO]
Updating widgetset broadway.myProject.gwt.myProjectWidgetSet
[INFO]
establishing classpath list (scope = compile)
[ERROR]
Jul 15, 2010 3:28:51 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
INFO: Widgetsets found from classpath:
[ERROR]
org.vaadin.henrik.refresher.RefresherApplicationWidgetset in jar:file:/home/bhj/.m2/repository/vaadin/addon/refresher/1.0/refresher-1.0.jar!/
[ERROR]
broadway.myProject.gwt.myProjectWidgetSet in file:/home/bhj/heliosWorkspace/myProject/src/main/java
[ERROR]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/home/bhj/.m2/repository/com/vaadin/vaadin/6.4.0/vaadin-6.4.0.jar!/
[ERROR]
org.vaadin.risto.stepper.widgetset.StepperWidgetset in jar:file:/home/bhj/.m2/repository/vaadin/addon/stepper/0.3/stepper-0.3.jar!/
[ERROR]
[INFO]
[INFO]
--- maven-resources-plugin:2.4.1:testResources (default-testResources) @ myProject ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /home/bhj/heliosWorkspace/myProject/src/test/resources
[INFO]
[INFO]
--- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ myProject ---
[INFO]
Nothing to compile - all classes are up to date
[INFO]
[INFO]
--- maven-jetty-plugin:6.1.24:run (default-cli) @ myProject ---
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD FAILURE
.
.
.
Notice that in the latter output, the widgetset is found, but not compiled. And It prints vaadin-maven-plugin:1.0.0:update-widgetset instead of gwt-maven-plugin:1.2-SNAPSHOT:compile
I cannot use version 1.2-SNAPSHOT with vaadin 6.4.0 either. It fails with the following output:
.
.
.
[INFO]
--- gwt-maven-plugin:1.2-SNAPSHOT:compile (default) @ playbill ---
[INFO]
using GWT jars from project dependencies : 2.0.3
[INFO]
auto discovered modules [broadway.playbill.gwt.PlaybillWidgetSet]
[INFO]
establishing classpath list (scope = compile)
[INFO]
Compiling module broadway.playbill.gwt.PlaybillWidgetSet
[INFO]
Finding entry point classes
[INFO]
[ERROR]
Unable to find type 'com.vaadin.terminal.gwt.client.DefaultWidgetSet'
[INFO]
[ERROR]
Hint: Check that the type name 'com.vaadin.terminal.gwt.client.DefaultWidgetSet' is really what you meant
[INFO]
[ERROR]
Hint: Check that your classpath includes all required source roots
.
.
[ERROR]
Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:1.2-SNAPSHOT:compile (default) on project playbill: Command
.
.
.
.
Could it be that when you used 1.2, it left the timestamps of the compiled widgetset such that 1.3 thinks nothing has changed. If so, you could try
mvn clean , or maybe touching the widgetset.gwt.xml file or manually removing the compiled widgetset.
I put this problem on hold for a while, but tried again now with Vaadin 6.4.1, still without luck.
It works like a charm when running
mvn install
or
clean vaadin:update-widgetset install jetty:run
… etc
as long as you have the install goal, it compiles the widgetsets.
But when the install goal is used, the hot-deploy in the maven-jetty-plugin (scanIntervalSeconds) doesn’t work. So it becomes rather tedious to write UI code.
When using Vaadin 6.3.4 (or earlier) and gwt-maven-plugin version 1.2-SNAPSHOT I just did a jetty:run and code+widgetsets were compiled and put in the target directory, where the maven-jetty-plugin picks it up.
Vaadin 6.4 and newer seems to be require gwt-maven-plugin 1.3-SNAPSHOT.
But version 1.3-SNAPSHOT must work slightly differently, because it does not compile and produce a war file in the target directory when doing jetty:run. And hence, the maven-jetty-plugin failes with an IllegalArgumentException: file:/blah/somedir/target/projectName-1-SNAPSHOT is not an existing directory.
The question:
Why is Vaadin 6.4+ not compatible with gwt-maven-plugin version 1.2-SNAPSHOT which was working fine? (At least with the entry-point in the gwt.xml file)
Or even better, if you can figure out why gwt-maven-plugin 1.3-SNAPSHOT doesn’t build the war file unless you run the install goal, that would be fantastic.
This is more of a Maven issue than a Vaadin issue, but the Vaadin archetypes could be updated at some point if there are better ways to do things.
Does it work if you use
mvn vaadin:update-widgetset package jetty:run
or
mvn vaadin:update-widgetset gwt:compile package jetty:run
You can also tell the jetty plugin to monitor additional directories with the scanTargets and scanTargetPatterns parameters etc. - see the plugin documentation.
The plugin version 1.2 also had some other problems, e.g. not recompiling the widgetset if only the GWT module file had changed. On the other hand, 1.3-SNAPSHOT (and probably also 1.2) does seem to be too aggressive in recompiling the widgetset in Vaadin projects when only server-side code changes - this needs to be investigated in more detail.
In Vaadin 6.4, the entry point (which was deprecated already a long time ago in Vaadin widgetsets) is no longer supported the way it used to be.
It is no longer possible to simply run jetty:run. You must do gwt:compile jetty:run
In the vaadin-sample archetype there is an error in the gwt-maven-plugin configuration. The tag and its contents should not be enclosed in . When it is there, the is simply ignored, and vaadin cannot find the widgetsets.
So it should look something like this
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.3-SNAPSHOT</version>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<modules>
<module>path.to.my.gwt.WidgetSet</module>
</modules>
<webappDirectory>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</webappDirectory>
<!-- On Mac running Snow Leopard, add "-d32" -->
<!-- This causes error messages (but build works) in phase "package":
two processes would use the same debug port -->
<!--extraJvmArgs>-Xmx512M -Xss1024k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998</extraJvmArgs -->
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>playbill</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8080</port>
<soyc>false</soyc>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
Do that, run the above command and voila. Widgetsets and hotdeploy works.
I’m using the following configuration within the pom file of this project (this is not a web project, but a utility jar, so the project.build.directory is actually target):
[font=Courier New]
<build>
<plugins>
<!-- Compiles your custom GWT components with the GWT compiler -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.3-SNAPSHOT</version>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<modules>
<module>com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet</module>
</modules>
<webappDirectory>${project.build.directory}/classes/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>clean</runTarget>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Updates Vaadin widgetset definitions based on project dependencies. -->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<configuration>
<!-- If you don't specify any modules, the plugin will find them. -->
<modules>
<module>com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet</module>
</modules>
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>6.4.4</version>
</dependency>
<dependency>
<groupId>org.vaadin.henrik</groupId>
<artifactId>refresher</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.0.4</version>
</dependency>
</dependencies>
[/font]
Building the project using ‘mvn clean install’ works fine when running under Windows: the generated files are compiled to target/classes/VAADIN/widgetsets and they are also packaged in the final jar file being build.
However, when I run the build on our linux build server (which does an ‘mvn deploy’), the compilation of the widget fails with a message:
GWT Module src.main.java.com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet not found in project sources or resources
When I go back to Vaadin jar 6.3.4 and gwt version 2.0.3, it both compiles under windows and linux.
Any idea why this is going wrong under linux using Vaadin jar version higher than 6.3.4? It seems that Vaadin jar adds the src/main/java source folder in front of the package, which I think it should not do.
Is there a work around to get this working under linux?
I assume “mvn clean vaadin:update-widgetset gwt:compile” on the linux server does not help.
For GWT compilation to work, the source folder has to be on the classpath. The Vaadin Maven plugin can create a widgetset if it does not exist, but creates it in the first directory on the classpath - if the widgetset already exists, the order of the classpath does not matter for it.
Why this directory is added as a part of the package path is not clear to me, and might have something to do with having the root of the project on the classpath before the source directory - but how to control this, and why it stopped working? The changes in WidgetSetBuilder, at least, are quite small between these versions, and you seem to be using the same version of the Vaadin Maven plugin.
At what phase does this problem occur? Updating the widgetset or compiling it?
If it is related to the widgetset update, you could try moving the configuration section outside of the executions section. You could also try to isolate this by changing only the Vaadin version or only the GWT version, and checking what breaks this.
So it seems the plugin is working OK.
I haven’t been able to debug the WidgetSetBuilder or any of the other classes withing the Vaadin.jar yet because the plugin excutes it in a separate process.
The root of the project doesn’t seem to be on the classpath.
It looks like it is failing in the compilation phase.
The output of maven is as follows:
[tomcat@NLGHOL04 374e58a11dfb42db]
$ mvnDebug clean install -Denforcer.skip=true -Dmaven.test.skip=true
Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000
[INFO]
Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO]
Building Technical Component: Vaadin Framework
[INFO]
task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
[INFO]
[clean:clean {execution: default-clean}]
[INFO]
Deleting directory /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/target
[INFO]
Deleting directory /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/target/classes
[INFO]
Deleting directory /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/target/test-classes
[INFO]
Deleting directory /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/target/site
[INFO]
[enforcer:enforce {execution: default}]
[INFO]
Skipping Rule Enforcement.
[INFO]
[build-helper:add-source {execution: add-source}]
[INFO]
Source directory: /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/src/main/generated added.
[INFO]
[utils:executePlugin {execution: ejb-versionif-execution}]
[INFO]
Executing goal updateVersion within execution updateVersionIF for plugin Plugin [com.tnt.maven.plugins:maven-versionif-plugin]
[INFO]
[versionif:updateVersion {execution: updateVersionIF}]
[INFO]
[resources:resources {execution: default-resources}]
[INFO]
Using default encoding to copy filtered resources.
[INFO]
[gwt:resources {execution: default}]
[INFO]
auto discovered modules [com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet]
[INFO]
1 source files copied from GWT module com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet
[INFO]
[compiler:compile {execution: default-compile}]
[INFO]
Compiling 32 source files to /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/target/classes
[INFO]
[utils:executePlugin {execution: aspectJ-weaving-execution}]
[INFO]
[vaadin:update-widgetset {execution: default}]
[INFO]
auto discovered modules [com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet]
[INFO]
Updating widgetset com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet
[INFO]
establishing classpath list (scope = compile)
[ERROR]
Sep 24, 2010 10:11:11 AM [b]
com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[/b][ERROR]
INFO: Widgetsets found from classpath:
[ERROR]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/home/tomcat/.m2/repository/com/vaadin/vaadin/6.4.4/vaadin-6.4.4.jar!/
[ERROR]
org.vaadin.henrik.refresher.RefresherApplicationWidgetset in jar:file:/home/tomcat/.m2/repository/org/vaadin/henrik/refresher/1.0.0/refresher-1.0.0.jar!/
[ERROR]
[b]
src.main.java.
[/b]com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet in file:/usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db
[ERROR]
target.classes.com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet in file:/usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db
[ERROR]
com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet in file:/usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/src/main/java
[ERROR]
[b]
src.main.resources
[/b].com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet in file:/usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db
[ERROR]
[INFO]
[resources:testResources {execution: default-testResources}]
[INFO]
Using default encoding to copy filtered resources.
[INFO]
[compiler:testCompile {execution: default-testCompile}]
[INFO]
Not compiling test sources
[INFO]
[surefire:test {execution: default-test}]
[INFO]
Tests are skipped.
[INFO]
[gwt:compile {execution: default}]
[INFO]
using GWT jars from project dependencies : 2.0.4
[INFO]
auto discovered modules [com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet]
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
------------------------------------------------------------------------
[ERROR]
BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO]
GWT Module src.main.java.com.tnt.vaadin.widgetset.RefresherApplicationWidgetSet not found in project sources or resources.
[INFO]
------------------------------------------------------------------------
[INFO]
For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO]
Total time: 28 seconds
[INFO]
Finished at: Fri Sep 24 08:11:15 UTC 2010
[INFO]
Final Memory: 31M/253M
[INFO]
------------------------------------------------------------------------
I’ve moved the configuration outside the execution tags, but that doesn’t help.
I left Vaadin version 6.3.4 and changed GWT version to 2.0.3 and 2.0.4. No problem.
Changing to Vaadin version 6.4.4 fails (both with version 2.0.3 or 2.0.4 of GWT version).
In the updateWidgetSet method in the WidgetSetBuilder class, the following code is executed:
It seems that the getAvailableWidgetSets has been significantly changed between the two versions. Could something be going wrong here? Maybe in this part it adds src.main.java before the package when it runs under Linux?
As you are running the compile using “/bin/sh -c” the shell will try to replace ${sourceDirectory} with the sourceDirectory variable. As it is not defined it will be replaced by an empty string and the result is that you have
/usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/
on the classpath and the extra directories will therefore also be scanned.
You should also be able to verify this by increasing the log level and looking at the “classpathLocations values:” output logged by ClassPathExplorer. This contains the actual classpath that it uses.
Thanks for looking into this.
We received a vaadin-6.4.6.dev20101005.jar with the ClassPathExplorer from the 6.3 branch, and this seemed to work for us. But I think this is just because the order of scanning the class folders is different in this version.
So what we need to do is setup a sourceDirectory variable for our buildplan in TeamCity I guess?
Or is this something we should configure in the pom file for the gwt-maven-plugin or vaadin-maven-plugin? Which one is establishing this classpath.
I’ve run the build in debug mode, and it seems that sourceDirectory is resolved to /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/src/main/java, which seems OK to me.
But GWT SDK execution classpath contains /usr/local/TeamCity/buildAgent2/work/374e58a11dfb42db/${sourceDirectory}:
Question is though: if we explicitly define in our pom which modules (widgetsets) need to be compiled, why does the plugin still try to scan other directories.