Update to new version from Eclipse Ivy

Hi,

How update to a new version from Eclipse Ivy?

best regards Leif W

If you are using the vaadin-generated ivy.xml file, then there is a vaadin.version parameter at the top of the file. Simply change that to the version you want (e.g. 7.0.0.rc2) and save the file, Ivy will start downloading the JARs automatically.

A follow-up to hopefully save some of you the hour I just wasted figuring this out…

The good old days of the Vaadin 6 plug-in are gone. Using a quick click of the mouse to see a list of Vaadin versions, choosing to update that list, choosing a version, or asking for the latest beta version to automatically be used – all that is gone.

As if wrestling with Eclipse is not already enough trouble, now in Vaadin 7 we have another layer of complexity slathered on top:
Apache Ivy
. Yippee! More XML files to edit.

Thomas Mattsson’s reply above is technically correct, but is not so simple.

If you did use the Vaadin 7 Eclipse plugin to create your project, you should see not one but
two
“ivy.xml” items on the left, in the
Package Explorer
pane/tab. The first “ivy.xml” can be expanded to see the list of currently downloaded Vaadin-related jars. The second exposes the Ivy configuration XML file parsed as a tree. Unfortunately, neither of these can be used to get a new version of Vaadin 7.

The solution is indeed found in the ivy.xml file, but unfortunately Eclipse’s parsed tree editor fails to expose the XML we actually need to edit. You need to open the ivy.xml using a plain text editor. I did so with an external app (
TextWrangler
for Mac OS X). Later I noticed the “Source” tab at the bottom of Eclipse’s XML parsed tree tool. Either way, you need to find the “ENTITY” defined up top as part of the DOCTYPE tag.

What is an “ENTITY” in XML? I don’t know! I read
this
. An entity is kinda like a variable. Just like "
character entities
" are single characters which can be referred to by name or number surrounded by an ampersand and a semicolon, an entity is a multiple character value that can be referred to by a name surrounded by an ampersand and a semicolon.

Here’s a screen shot showing the useless Eclipse XML parsed-tree tool with a useful XML text editor above it.

But the fun doesn’t end here. How to make Eclipse and Ivy actually fetch the new version of Vaadin, download, and install it in your project? I don’t know! But I found that after restarting Eclipse, and trying to run my Vaadin project, I got this dialog telling me to wait. Apparently Ivy is doing its downloads from the Vaadin servers.

After that download process finishes, I got an error about failure due to referring to an old version of Java no longer present on my Mac. I had indeed delete the old Java SE 7 update 13 & 15 from my Mac. I have no idea where Eclipse or Ivy was finding this reference to the old version. I poked around the
Package Explorer
and the project properties. All seemed well. So, when all fails, quit and restart. Restart fixed it. My project now runs again.

To verify that Ivy actually obtained fresh jars, open that first “ivy.xml” item in
Package Explorer
. The jar files have their version number embedded in their name.

Update: The Book of Vaadin 7 documents this in section 2.4.4,
Updating the Vaadin Libraries
.

–Basil

No Basil, it really is as simple as Thomas said.

I just tested it myself and it worked like a charm.

Don’t complicate things please.

How would it be if I want ivy update the version from the hard drive of my PC and not from Internet ?, where and how to tell Ivy, the address of the folder on my PC?
The problem is that I have full Internet access, only a quota of 200 MB per week and need access to the Internet economy.

Best regards.

How would it be if I want ivy update the version from the hard drive of my PC and not from Internet ?, where and how to tell Ivy, the address of the folder on my PC?
The problem is that I have full Internet access, only a quota of 200 MB per week and need access to the Internet economy.

Best regards.