Netbeans 8.1, Maven and Updating Vaadin ?

I’m using Netbeans 8.1 w/ Vaddin added through Maven. Currently using the 7.6.2 Vaddin API in my project and it works great. However, how do I update my project through Netbeans/Maven to use the latest Vaadin release 7.6.5 ? When I search for Vaadin under Maven (through the Netbeans UI) the most recent version for Vaadin is 7.6.2. Is there something I need to refresh ? Additionally, there are several Vaadin JARs (dependencies), is there a way to update them all without needing to do each one individually (and their dependencies) ?

Anyone ?

Sometimes IDE’s just don’t update their version indexes properly. You can always find the latest version of Vaadin from
vaadin.com/framework/get-started
. Just update the version in your maven properties or bom declaration to get all the latest features and bugfixes!

cheers,
matti

I also use NetBeans 8.1 and I already did an update twice. First (to be sure) make a backup of your project then go to Tools->Options->Java->Vaadin
and check Vaadin Versions Download - you can switch it to Download on each IDE start, restart the IDE to make sure you have the latest version.

Then right-click your project and select properties->Vaadin.
There you can change the Vaadin version to be used.
After changing the version and clicking ok you will see "[unloadable]
" next to the project name. You may then need to restart the IDE but then you should get a message telling about the problem and offering to automatically resolve. Or maybe you need to choose “Resolve problems…” (or something like this) from the context menu (right-clicking on the project, I do not remember exactly how it behaved the last time I did the update).
However, after a clean and build everything is then fine.

on my 2 updates (but always staying with 7.*) I never had to change a single line of code - so everything remained fully compatible.

HTH, Martin.

Additional note: If you have another lib project that you are using (I have created a common vaadinutils lib for example), then you should switch that also to the current version.

Best regards, Martin.

This doesn’t exist in Netbeans 8.1:

Tools->Options->Java->Vaadin

Ah, you must be using the Windows version of NB. I’m using the Mac version and those settings can be found under under
Netbeans->Preferences->Java->Vaadin

It looks like those settings are already set, but have no effect on updating Vaadin, my version remains 7.6.2.

The Vaadin Dependencies are added automatically when I go to create a new Netbeans Project. The project type is Vaadin->Vaadin Web Application Project.

Does this make a difference when trying to update the dependencies?

If I create a
new
Vaadin Project the dependencies are the latest 7.6.6 – but as mentioned, my previous project remains at 7.6.2.

I think I fingured it out:

Under
Project Files
there’s a file called
pom.xml
. In that file we have:

<properties>
    [b]
<vaadin.version>7.6.6</vaadin.version>
[/b]
    <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
    <jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

If I change
<vaadin.version>
to
7.6.6
(as I did above), it looks like all my deps have updated to 7.6.6 as well. Please let me know if this is correct? Everything appears to run fine, but I want to know if it actually updated or simply appended the 7.6.6 version numbers to the Vaadin deps (without updating; if thats even possible)?

Yes, that’s an easy way to update your vaadin version. Everything should run perfectly now! And no, it’s not possible that it’s simply append 7.6.6 to the Vaadin deps.

@Jason: I am using NetBeans under Linux, but I was not aware of Menu differences in the different operating systems.

And changing the vaadin.version property in the pom.xml is the same what changing the version in the GUI does. I am not a Maven expert, but if there are changes in dependencies, Maven should updated these on build due to this entry in pom.xml which declares automatic dependency import for the appropriate artifact group:

<dependencyManagement> <dependencies> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-bom</artifactId> <version>${vaadin.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> which I guess is present also in your case.
25917.png
25918.png