problems with setting up eclipse and vaadin

Hi,
i am new to vaadin and encountered some problems in setting up eclipse. However I managed to solve them but I had to use some workarounds and I don’t know if they are “good”. So first of all I tried to use the vaadin eclipse plugin.
Therefore I installed the plugin and tried to create a new vaadin project but the following “Problem occurred” “An internal error occurred during: “IvyDE resolve”.
org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String”
This seems to be caused by the following eclipse bug: https://issues.apache.org/jira/browse/IVY-1487 and can be fixed with a solution also presented in the vaadin forums: https://vaadin.com/forum#!/thread/8272738/8468435 by installing the Appache IvyIDE Library from https://builds.apache.org/job/IvyDE-updatesite/lastSuccessfulBuild/artifact/trunk/build/

My Problem with this solution is that it seems to be an alpha version and if something is marked as alpha it’s mostly for a reason and therefore I don’t want to use it :confused: However the bug is already fixed but the fix will be rolled out no until February with the new eclipse version 4.4.2.

Therefore I tried using Maven and followed the following tutorial: https://vaadin.com/wiki/-/wiki/Main/Creating+an+Eclipse+Project

However the first problem occurred directly in the first step:

““File → New → Project…” and select “Maven Project”. When clicking “Next” two times you will see a list of available archetypes. Write “vaadin” in the filter field and select “vaadin-archetype-application”.”

There aren’t any entries from vaadin and it is only possible to manually add the archetyp: “com.vaadin vaadin-archetype-application 7.3.4“ or to add a remote archetype catalog for “http://repo1.maven.org/maven2/archetype-catalog.xml” in preferences → Maven.
So my questions to this solution is: why isn’t this catalog added by default in eclipse or is it a bad thing and manually adding the archetype is the way which should be preferred?

Afterwards I tried to compile the widget set, which is included by default when creating a new project with com.vaadin vaadin-archetype-application, by creating a new Maven Build configuration under “Run Configurations → New Name: Compile Widgets Base directory: ${workspace_loc:/Test} Goals: vaadin:compile” (like shown here: https://vaadin.com/wiki/-/wiki/Main/Creating+an+Eclipse+Project ). However some problems occurred during compilation :confused: here is the console output:

[INFO]
 Scanning for projects...
[WARNING]

[WARNING]
 Some problems were encountered while building the effective model for user:Test:war:0.0.1-SNAPSHOT
[WARNING]
 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 96, column 12
[WARNING]
 'build.plugins.plugin.version' for org.mortbay.jetty:jetty-maven-plugin is missing. @ line 169, column 12
[WARNING]

[WARNING]
 It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]

[WARNING]
 For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]

[INFO]

[INFO]
 Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
                                                                         
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Building Vaadin Web Application 0.0.1-SNAPSHOT
[INFO]
 ------------------------------------------------------------------------
[INFO]

[INFO]
 >>> vaadin-maven-plugin:7.3.4:compile (default-cli) @ Test >>>
[INFO]

[INFO]
 --- vaadin-maven-plugin:7.3.4:update-theme (default) @ Test ---
[INFO]
 Updating theme VAADIN/themes/mytheme
[INFO]
 Widgetsets found from classpath:
[INFO]
     user.Test.AppWidgetSet in file:/home/thorsten/java/workspace/Test/target/classes
[INFO]
     com.vaadin.DefaultWidgetSet in jar:file:/home/thorsten/.m2/repository/com/vaadin/vaadin-client/7.3.4/vaadin-client-7.3.4.jar!/
[INFO]
 Addon styles found from classpath:
[INFO]

[INFO]
 Search took 11ms
[INFO]
 Theme "VAADIN/themes/mytheme" updated
[INFO]

[INFO]
 --- vaadin-maven-plugin:7.3.4:compile-theme (default) @ Test ---
[INFO]
 Updating theme VAADIN/themes/mytheme
[INFO]
 Theme "VAADIN/themes/mytheme" compiled
[INFO]

[INFO]
 --- maven-resources-plugin:2.6:resources (default-resources) @ Test ---
[INFO]
 Using 'UTF-8' encoding to copy filtered resources.
[INFO]
 skip non existing resourceDirectory /home/thorsten/java/workspace/Test/src/main/resources
[INFO]

[INFO]
 --- vaadin-maven-plugin:7.3.4:resources (default) @ Test ---
[INFO]
 auto discovered modules [user.Test.AppWidgetSet]

[INFO]
 1 source files from GWT module user.Test.AppWidgetSet
[INFO]

[INFO]
 <<< vaadin-maven-plugin:7.3.4:compile (default-cli) @ Test <<<
[INFO]

[INFO]
 --- vaadin-maven-plugin:7.3.4:compile (default-cli) @ Test ---
[INFO]
 auto discovered modules [user.Test.AppWidgetSet]

[WARNING]
 Failed to retrieve com.vaadin:vaadin-client-compiler based on project POM
[INFO]
 Using com.vaadin:vaadin-client-compiler version 7.3.4
[INFO]
 user.Test.AppWidgetSet is up to date. GWT compilation skipped
[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD SUCCESS
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time: 5.152 s
[INFO]
 Finished at: 2014-11-10T17:24:55+01:00
[INFO]
 Final Memory: 11M/228M
[INFO]
 ------------------------------------------------------------------------

If I run the project on a tomcat 8, the following error occurs as notification pop up: Failed to load the widgetset: ./VAADIN/widgetsets/user.Test.AppWidgetSet/user.Test.AppWidgetSet.nocache.js?1415637205678

If I remove the “widgetset = “user.test.AppWidgetSet”” in @VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class, widgetset = “user.test.AppWidgetSet”) and run it on the tomcat all seems to work fine.

Could someone please tell how to do these things right? Personally I would prefer a solution with Maven+Eclipse.
Thank you very much!

I’m using the latest greatest Eclpse + Vaadin, and everything works fine.



settings.xml


Do you have mirrors configured in your settings.xml?

I don’t use the default Eclipse Maven or configurations, but install Maven separately and use installed settings.xml

My Eclpse-Maven install is configured similar to
https://sites.google.com/site/joerecipes/install/maven-setup



New Eclipse maven project


When you get to the
New Maven Project
screen in Eclipse, did you
unselect
the Show the lastest version of Archetype only?

Unselecting Show the lastest version will display all the versions, which is required for 7.3.4.

no, i have no mirros configured and just use the default settings.xml. Moreover i unselected “show the latest version” but it didn’t show anything until i added http://repo1.maven.org/maven2/archetype-catalog.xml like described above.

However, thanks a lot for the hint with a seperate maven installation! That worked flawlessly!