Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » setup with git clone and project import of non-Eclipse project(setup with git clone and project import of non-Eclipse project)
setup with git clone and project import of non-Eclipse project [message #1750221] Sun, 18 December 2016 23:51 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Hi,

I'm using Eclipse in a large programming course using java, and the installation they are supposed to use includes e(fx)clipse and some custom features I've made. In addition, they need to create a standard java project with an extra library jar in the class path. Later they need to download and import junit tests for the exercises.

In previous years I've made a detailed setup guide explaining which Eclipse variant to download and install, how to add the necessary additional plugins and then configure the java project, but this year I thought I'd use Oomph to 1) install the custom Eclipse and 2) clone a git repo and import a pre-configured java project.

It was pretty easy to create a product setup file including the necessary features, but I have problems with the project setup file. The symptom is that nothing seems to happen after the new eclipse instance has started up. The workspace is empty, while I thought that the git clone and project import tasks would be triggered automatically, so the workspace would contain all the projects in the newly clones git repo.

Currently, the project setup (also attached) just includes a stream node with a git clone task and a project import task. The git clone task uses ${user.home/git} as git clone location and a github repo of mine as the URI. The project import has a source locator that refers to the newly cloned repo using ${tdt4100.clone.location} where tdt4100.clone is the id of the clone task.

So, what haven't I understood correctly?
Re: setup with git clone and project import of non-Eclipse project [message #1750230 is a reply to message #1750221] Mon, 19 December 2016 07:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
The working tree for https://github.com/hallvard/tdt4100-2017 has only the README.MD file. There are no folder with a .project file so there are no projects that can be imported from this repository.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: setup with git clone and project import of non-Eclipse project [message #1750236 is a reply to message #1750230] Mon, 19 December 2016 08:33 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
You're right, I forgot to push! However, pushing didn't help...

Where should I look to see if and what setup tasks happen after initial startup? Currently I see no signs that anything happens. I don't see any repositories listed in the Git Repo view either?
Re: setup with git clone and project import of non-Eclipse project [message #1750238 is a reply to message #1750236] Mon, 19 December 2016 08:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
It worked for me... I.e., the clone s in the repo view and the project is now in the workspace.

Navigate -> Open Setup Log will show the log from the tasks that have been performed. During startup, you'll see in the status area the icon for the wizard while it is running. If it's successful (no errors encountered while performing tasks) this icon will disappear after a short while (30 seconds I think). In any case, you should be able to do Help -> Perform Setup Tasks... to perform the tasks again.

Perhaps you're seeing different behavior because the clone folder already exists so no clone task is performed (and hence to clone is not added to the view). And then because the clone already exists, nothing does a pull, so the old state of the clone is still there and there are still no projects to import... Perhaps for an tutorial type of setup, it might be better to place the clone in the workspace, or relative to the installation, rather than in some more global location...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: setup with git clone and project import of non-Eclipse project [message #1750250 is a reply to message #1750238] Mon, 19 December 2016 10:22 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
There is no icon for the wizard during startup or no Navigate -> Open Setup Log or Help -> Perform Setup Tasks menu entries. My guess is that the product.setup I use is missing some essential Oomph things. When using an existing Eclipse setup from the Catalog, like Eclipse IDE for Java Developers it works for me, too! Hm, perhaps I need to add org.eclipse.oomph.setup to the list of features? Yes, that seemed to do the trick! Perhaps there could be a warning about that this feature is missing?

Your suggestion that I should clone into the workspace or relative to the location, is about the Git Clone Task's location attribute, right? Currently it's set to ${user.home/git/tdt4100-2017} (which BTW does not overlap with my own git folder). Your suggestion is to use something like ${installation.location/git}?

Oomph seems to be a game-changing feature, thank you so much for the effort! My next task is to learn how to add custom tasks...
Re: setup with git clone and project import of non-Eclipse project [message #1750262 is a reply to message #1750250] Mon, 19 December 2016 11:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Our product catalogs include this task at the root of the catalog so all product versions will include the Oomph setup feature.
<?xml version="1.0" encoding="UTF-8"?>
<setup.p2:P2Task
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0">
  <requirement
      name="org.eclipse.oomph.setup.feature.group"/>
  <repository
      url="${oomph.update.url}"/>
</setup.p2:P2Task>

It's not necessary for a product to include any Oomph features, but of course if you want your product to have the setup feature, you must define it that way...

We generally leave the location empty and then the attribute rules for where to locate it are used which choices such as these:
${installation.location/git/}${@id.remoteURI|gitRepository}
${workspace.location/.git/}${@id.remoteURI|gitRepository}

The later locates the clone in the workspace...

When we prepare an Oomph tutorial, we of course have an Oomph setup for setting up the tutorial environment. And do all kinds of tricks to ensure that the tutorial will work without internet access. I.e., we mirror various repos and create local clones and use redirections to ensure these locally distributed things are used for the tutorial environment.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Extending 'Eclipse IDE for Java EE Developers' brings in fewer features than expected
Next Topic:no match; click to configure
Goto Forum:
  


Current Time: Sun Dec 08 00:16:47 GMT 2024

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

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

Back to the top