Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Automatically install features?
Automatically install features? [message #484884] Wed, 09 September 2009 15:39 Go to next message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
Quick question (having just lost my 30-min post to a buggy preview post button I don't feel like making this long)

I want to install the Eclipse Modelling Framework automatically (via the command line) on top of my existing Eclipse 3.5 CDT distribution from a local site archive (emf-xsd-Update-2.5.0.zip).

When I run
java -cp startup.jar org.eclipse.core.launcher.Main
    -application  org.eclipse.update.core.standaloneUpdate
    -command addSite
    -from emf-xsd-Update-2.5.0.zip 


I get

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/launcher/Main


Help!
Re: Automatically install features? [message #484900 is a reply to message #484884] Wed, 09 September 2009 16:21 Go to previous messageGo to next message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
Ok, so I was being a bit of a noob and using the 3.2 documentation instead of the 3.5 documentation ( http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/misc/update_standalone.html) and the command line stuff has changed from startup.jar to the plugins/equinox stuff.

So now it runs and I can add a local site from an extracted emf update site. However, I'm struggling to add the features - when I try to add them I get an error that the feature could not be found at the location.

So I did
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
    -application  org.eclipse.update.core.standaloneUpdate
    -command addSite
    -from my_extracted_emf_dir


And that worked and it said the site had been added.

However, I then tried to add a feature.

java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
    -application  org.eclipse.update.core.standaloneUpdate
    -command install
    -featureId emf_feature_name
    -version 2.5.0_blah
    -from my_extracted_emf_dir


But that borked out, saying that there was no rasource type on the -from url. Fine, so I added file:/ to the front of the absolute directory path to the extracted site update. However, that now fails saying that it cannot find the feature.

Going back into eclipse and checking the update UI, the local site doesn't even show up, so I'm now worndering if that even worked.

Any help would be greatly appreciated - has anyone done this or is there a quicker way to install all the features out of a site .zip archive? I am going to need to do this for EMF, GEF and the Linuxtools packages, all of which are distributed as these site .zip files.
Re: Automatically install features? [message #484908 is a reply to message #484884] Wed, 09 September 2009 16:28 Go to previous messageGo to next message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
So I'm still being a noob and not reading the massive warning at the top of that help page that the method is deprecated and I should be using the p2 director instead: http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/p2_director.html

Will give that a bash and might come back if I still have problems...

"RTF(correct)M Tom"!
Re: Automatically install features? [message #485008 is a reply to message #484884] Thu, 10 September 2009 09:01 Go to previous messageGo to next message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
Ok, so I think I'm slowly getting there...

I have got the P2 director looking at a local site for fetaures, but I'm now running into a problem. If I point the remote site url at

file:/path/to/emf-site.zip


java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
    -application org.eclipse.update.core.standaloneUpdate
    -command mirror
    -from file:/path/to/emf-site.zip
    -to .


Then it tries to open the file

/path/to/emf-site.zip/site.xml


So it doesn't seem to understand a zipped site. That's fine, but if I unzip the site manually and pass the p2 director:

file:/path/to/emf-site-extracted


Then it analyses the features ok, but when it comes to install them it bombs out with a file not found error. This seems to be caused by the plugins in the extracted site zip being .jar.pack.gz files, but the site.xml refers to the plugins as plain .jar files. Any ideas how to fix this?

[Updated on: Thu, 10 September 2009 09:12]

Report message to a moderator

Re: Automatically install features? [message #485015 is a reply to message #484884] Thu, 10 September 2009 09:13 Go to previous messageGo to next message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
Moved discussion to Eclispe Platform forum:

http://www.eclipse.org/forums/index.php?t=msg&th=154010
Re: Automatically install features? [message #485345 is a reply to message #484884] Fri, 11 September 2009 13:00 Go to previous message
Tom Dalton is currently offline Tom DaltonFriend
Messages: 12
Registered: September 2009
Junior Member
RESOLVED : http://www.eclipse.org/forums/index.php?t=msg&th=154020
Previous Topic:Mac snow leopard and subclipse
Next Topic:web page editor
Goto Forum:
  


Current Time: Mon Dec 22 17:07:35 GMT 2014

Powered by FUDForum. Page generated in 0.01805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software