Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » How to import a non eclipse project?(Import non eclipse projects with oomph)
How to import a non eclipse project? [message #1696200] Fri, 22 May 2015 22:27 Go to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
So I have a repository, where not every of the developers use eclipse and there is no .project file in git. Is there a way to create the .project file after git clone and before the Import task?


Re: How to import a non eclipse project? [message #1696209 is a reply to message #1696200] Sat, 23 May 2015 04:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6693
Registered: July 2009
Senior Member
Am 23.05.2015 um 00:27 schrieb Aleksandar Toshovski:
> So I have a repository, where not every of the developers use eclipse and there is no .project file in git. Is there
> a way to create the .project file after git clone and before the Import task?
You can create files with Resource Creation tasks, but it sounds wrong to me that the information is not in the projects
(or folders). Is there nothing in the projects already that could be used to recognize then as projects?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: How to import a non eclipse project? [message #1696214 is a reply to message #1696209] Sat, 23 May 2015 08:03 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
There is only one project in the repository, so it won't be a problem to recognize it. I only need to generate .project and .cproject. I already tried to checkout the repository and create a file in the repository's location, but it doesn't work Sad The file doesn't get created.

Here is my playground setup file:
https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/
and the setups repository: https://github.com/toshovski/oomph-cdev.git

I try to checkout this repository: https://github.com/toshovski/dummy-project.git
Re: How to import a non eclipse project? [message #1696218 is a reply to message #1696214] Sat, 23 May 2015 09:09 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6693
Registered: July 2009
Senior Member
Am 23.05.2015 um 10:03 schrieb Aleksandar Toshovski:
> There is only one project in the repository, so it won't be a problem to recognize it. I only need to generate
> .project and .cproject. I already tried to checkout the repository and create a file in the repository's location,
> but it doesn't work :( The file doesn't get created.
>
> Here is my playground setup file:
> https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/
I get a 400: Invalid request ;-)

Can you plaste your XML here?

> and the setups repository: https://github.com/toshovski/oomph-cdev.git
>
> I try to checkout this repository: https://github.com/toshovski/dummy-project.git


Re: How to import a non eclipse project? [message #1696220 is a reply to message #1696218] Sat, 23 May 2015 10:36 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/org.eclipse.projects.setup
Re: How to import a non eclipse project? [message #1696221 is a reply to message #1696220] Sat, 23 May 2015 12:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Aleksandar,

This looks like a copy of the project catalog. Note that you can add
your own project to the "<user>" subproject of an existing catalog. You
can do that via drag and drop (onto the project catalog on the projects
page) or via the "+" icon on the projects page. Is there a specify
project setup you're trying to get working?


On 23/05/2015 12:36 PM, Aleksandar Toshovski wrote:
> https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/org.eclipse.projects.setup
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to import a non eclipse project? [message #1696224 is a reply to message #1696221] Sat, 23 May 2015 14:22 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Sorry Sad I passed the wrong link. I used the the original file as a reference.
https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/de.abas.cdev.projects.setup

I want to control the eclipse releases available for our developers and to provide only specific projects. That's why I need a custom catalog.
Re: How to import a non eclipse project? [message #1696239 is a reply to message #1696224] Sun, 24 May 2015 10:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Aleksandar,

This is also a project catalog, not a project. The extensibility
features of Oomph allows one to (locally) add a project to an existing
project catalog. A project has a feature, "Logical Project Container"
which you can set to point up to the catalog in which you will place the
project (either the Eclipse one or the Github one), so that the outline
view shows the expanded state of your setup relative to that context so
you can ensre that when you locally add it to that project catalog that
it will work as expected. That seems to me the best place to start.

Support for overriding the entire index and all the catalogs in it is
much trickier, and seems like not the best way to start...


On 23/05/2015 4:22 PM, Aleksandar Toshovski wrote:
> Sorry :( I passed the wrong link. I used the the original file as a
> reference.
> https://raw.githubusercontent.com/toshovski/oomph-cdev/master/setups/de.abas.cdev.projects.setup
>
>
> I want to control the eclipse releases available for our developers
> and to provide only specific projects. That's why I need a custom
> catalog.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to import a non eclipse project? [message #1696240 is a reply to message #1696239] Sun, 24 May 2015 10:57 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
What I achieved so far works with the custom catalogs/projects. The only problem I have is creating of files in the downloaded repository before importing them into eclipse. Can you give me some hints how to make this work?
1. Download repository
2. Add files into the repository (.project and .cproject)
3. Import repository projects

Here is my view about support:
I don't like the approach with adding of projects in the projects catalog for every user. If I have a C-Project and the developer choose Eclipse Classic Package, the project configuration won't work at all. So I need a way map project to eclipse package and also I need to be sure, that the configuration works with this package. That's way i chose to use a own product catalog with custom project catalog. So I can control remotely the possible combinations between eclipse package and a project.
Re: How to import a non eclipse project? [message #1696244 is a reply to message #1696240] Sun, 24 May 2015 11:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Aleksandar,

Comments below.

On 24/05/2015 12:57 PM, Aleksandar Toshovski wrote:
> What I achieved so far works with the custom catalogs/projects. The
> only problem I have is creating of files in the downloaded repository
> before importing them into eclipse. Can you give me some hints how to
> make this work? 1. Download repository
> 2. Add files into the repository (.project and .cproject)
I see you have this:

<setupTask
xsi:type="setup:ResourceCreationTask"
id="project"
excludedTriggers="STARTUP MANUAL"
content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;projectDescription>&#xA;&#x9;&lt;name>project&lt;/name>&#xA;&#x9;&lt;comment>&lt;/comment>&#xA;&#x9;&lt;projects>&#xA;&#x9;&lt;/projects>&#xA;&#x9;&lt;buildSpec>&#xA;&#x9;&#x9;&lt;buildCommand>&#xA;&#x9;&#x9;&#x9;&lt;name>org.eclipse.cdt.managedbuilder.core.genmakebuilder&lt;/name>&#xA;&#x9;&#x9;&#x9;&lt;triggers>clean,full,incremental,&lt;/triggers>&#xA;&#x9;&#x9;&#x9;&lt;arguments>&#xA;&#x9;&#x9;&#x9;&lt;/arguments>&#xA;&#x9;&#x9;&lt;/buildCommand>&#xA;&#x9;&#x9;&lt;buildCommand>&#xA;&#x9;&#x9;&#x9;&lt;name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder&lt;/name>&#xA;&#x9;&#x9;&#x9;&lt;triggers>full,incremental,&lt;/triggers>&#xA;&#x9;&#x9;&#x9;&lt;arguments>&#xA;&#x9;&#x9;&#x9;&lt;/arguments>&#xA;&#x9;&#x9;&lt;/buildCommand>&#xA;&#x9;&lt;/buildSpec>&#xA;&#x9;&lt;natures>&#xA;&#x9;&#x9;&lt;nature>org.eclipse.cdt.core.cnature&lt;/nature>&#xA;&#x9;&#x9;&lt;nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature&lt;/nature>&#xA;&#x9;&#x9;&lt;nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature&lt;/nature>&#xA;&#x9;&lt;/natures>&#xA;&lt;/projectDescription>"
targetURL="${git.clone.gitcentral.erp}/.project"
encoding="UTF-8">
<description>Create .project file</description>

So of course targetURL expands to the

So of course the targetURL expands to the web-hosted location of the
repository. Here's an example from the Platform.setup (in which one
needs to copy one of the many .classpath_* files to be the one
.classpath file that matches the current windowing system:

<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCopyTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
excludedTriggers="BOOTSTRAP"
sourceURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath_${osgi.ws}"
targetURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath"/>

I.e., so in your case, you would use
${git.clone.gitcentral.erp.location|uri} to specify the file URI for the
clone's local disk location.

> 3. Import repository projects
>
> Here is my view about support:
> I don't like the approach with adding of projects in the projects
> catalog for every user.
No, that's why we maintain a catalog. You can ask for your projects to
be included in the Eclipse catalog if it's an Eclipse project or in the
Github catalog if it's a Github project that is no also an Eclipse project.
> If I have a C-Project and the developer choose Eclipse Classic
> Package, the project configuration won't work at all.
That should not be the case. Your project description should include
the high level features that it needs. So it should specify it needs
CDT and then no matter what product is chosen CDT will be added to it.
(Note how the product catalog even has a bare bones Eclipse Platform
product, which does not include Egit, JDT, PDE, or really anything
useful for much of anything at all. You should design your project
description so that it ensures the necessary features are installed,
rather than assuming a certain product (with the dependencies implied by
the product) will be chosen first.
> So I need a way map project to eclipse package
No, it's best to avoid that.
> and also I need to be sure, that the configuration works with this
> package. That's way i chose to use a own product catalog with custom
> project catalog. So I can control remotely the possible combinations
> between eclipse package and a project.
I think this is the wrong approach. Better would be to author your
project so it works with the Eclipse Platform product as a starting
point, and when you get that right, it should be possible for the end
user to choose any product and still end up with a result that contains
what your project needs and that contains what that end-user also
wants. E.g., someone might want to work with Java projects and C
projects, and of course that's possible with Eclipse, so best if you
enable that rather than try to constrain what's possible...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to import a non eclipse project? [message #1696248 is a reply to message #1696244] Sun, 24 May 2015 13:18 Go to previous messageGo to next message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member


Ed Merks wrote on Sun, 24 May 2015 07:55


On 24/05/2015 12:57 PM, Aleksandar Toshovski wrote:
> What I achieved so far works with the custom catalogs/projects. The
> only problem I have is creating of files in the downloaded repository
> before importing them into eclipse. Can you give me some hints how to
> make this work? 1. Download repository
> 2. Add files into the repository (.project and .cproject)
I see you have this:

<setupTask
xsi:type="setup:ResourceCreationTask"
id="project"
excludedTriggers="STARTUP MANUAL"
content="......"
targetURL="${git.clone.gitcentral.erp}/.project"
encoding="UTF-8">
<description>Create .project file</description>

So of course the targetURL expands to the web-hosted location of the
repository. Here's an example from the Platform.setup (in which one
needs to copy one of the many .classpath_* files to be the one
.classpath file that matches the current windowing system:

<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCopyTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
excludedTriggers="BOOTSTRAP"
sourceURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath_${osgi.ws}"
targetURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath"/>

I.e., so in your case, you would use
${git.clone.gitcentral.erp.location|uri} to specify the file URI for the
clone's local disk location.


I see know how to fix it. One more question. What are the excluded Triggers? They doesn't appear on the Property Page?


Ed Merks wrote on Sun, 24 May 2015 07:55


> 3. Import repository projects
>
> Here is my view about support:
> I don't like the approach with adding of projects in the projects
> catalog for every user.
No, that's why we maintain a catalog. You can ask for your projects to
be included in the Eclipse catalog if it's an Eclipse project or in the
Github catalog if it's a Github project that is no also an Eclipse project.


Unfortunately It's not an open source project and the settings are very specific with the development environment.



Ed Merks wrote on Sun, 24 May 2015 07:55

> If I have a C-Project and the developer choose Eclipse Classic
> Package, the project configuration won't work at all.
That should not be the case. Your project description should include
the high level features that it needs. So it should specify it needs
CDT and then no matter what product is chosen CDT will be added to it.
(Note how the product catalog even has a bare bones Eclipse Platform
product, which does not include Egit, JDT, PDE, or really anything
useful for much of anything at all. You should design your project
description so that it ensures the necessary features are installed,
rather than assuming a certain product (with the dependencies implied by
the product) will be chosen first.


Now I understand the idea. Is it possible to pass only the project catalog in oomph.ini as parameter?

Ed Merks wrote on Sun, 24 May 2015 07:55

> So I need a way map project to eclipse package
No, it's best to avoid that.
> and also I need to be sure, that the configuration works with this
> package. That's way i chose to use a own product catalog with custom
> project catalog. So I can control remotely the possible combinations
> between eclipse package and a project.
I think this is the wrong approach. Better would be to author your
project so it works with the Eclipse Platform product as a starting
point, and when you get that right, it should be possible for the end
user to choose any product and still end up with a result that contains
what your project needs and that contains what that end-user also
wants. E.g., someone might want to work with Java projects and C
projects, and of course that's possible with Eclipse, so best if you
enable that rather than try to constrain what's possible...


Yes, this is a better approach. By the way woudn't be better to choose the project, without the eclipse package, when I have to define all dependencies on project level?

Re: How to import a non eclipse project? [message #1696253 is a reply to message #1696248] Sun, 24 May 2015 14:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Aleksandar,

Comments below

On 24/05/2015 3:18 PM, Aleksandar Toshovski wrote:
>
>
> Ed Merks wrote on Sun, 24 May 2015 07:55
>> On 24/05/2015 12:57 PM, Aleksandar Toshovski wrote:
>> > What I achieved so far works with the custom catalogs/projects. The
>> > only problem I have is creating of files in the downloaded
>> repository > before importing them into eclipse. Can you give me some
>> hints how to > make this work? 1. Download repository
>> > 2. Add files into the repository (.project and .cproject)
>> I see you have this:
>>
>> <setupTask
>> xsi:type="setup:ResourceCreationTask"
>> id="project"
>> excludedTriggers="STARTUP MANUAL"
>> content="......"
>> targetURL="${git.clone.gitcentral.erp}/.project"
>> encoding="UTF-8">
>> <description>Create .project file</description>
>>
>> So of course the targetURL expands to the web-hosted location of the
>> repository. Here's an example from the Platform.setup (in which one
>> needs to copy one of the many .classpath_* files to be the one
>> .classpath file that matches the current windowing system:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <setup:ResourceCopyTask
>> xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
>> excludedTriggers="BOOTSTRAP"
>> sourceURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath_${osgi.ws}"
>>
>> targetURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath"/>
>>
>>
>> I.e., so in your case, you would use
>> ${git.clone.gitcentral.erp.location|uri} to specify the file URI for
>> the clone's local disk location.
>
>
> I see know how to fix it. One more question. What are the excluded
> Triggers? They doesn't appear on the Property Page?
You have to unfilter to show advanced properties. There you'll see a
"Triggers" property, which makes it look like you're specifying the
triggers, but you can only specify combinations of the valid triggers
which are determined by annotations on the EClass for the task. E.g., a
git clone task must run in the IDE, it cannot be performed at bootstrap
time. It's actually saved in the excludedTriggers feature, which
excludes things from the set of valid triggers...

So you'll want this creation task to run after the clone task has
completed so you probably won't want it to be triggered at bootstrap
time because the clone will not yet exist...
>
>
> Ed Merks wrote on Sun, 24 May 2015 07:55
>> > 3. Import repository projects
>> >
>> > Here is my view about support:
>> > I don't like the approach with adding of projects in the projects >
>> catalog for every user. No, that's why we maintain a catalog. You
>> can ask for your projects to be included in the Eclipse catalog if
>> it's an Eclipse project or in the Github catalog if it's a Github
>> project that is no also an Eclipse project.
>
>
> Unfortunately It's not an open source project and the settings are
> very specific with the development environment.
I see. (But don't want to spend much time given free help for things
that won't be freely available.)
>
>
>
> Ed Merks wrote on Sun, 24 May 2015 07:55
>> > If I have a C-Project and the developer choose Eclipse Classic >
>> Package, the project configuration won't work at all. That should not
>> be the case. Your project description should include the high level
>> features that it needs. So it should specify it needs CDT and then
>> no matter what product is chosen CDT will be added to it. (Note how
>> the product catalog even has a bare bones Eclipse Platform product,
>> which does not include Egit, JDT, PDE, or really anything useful for
>> much of anything at all. You should design your project description
>> so that it ensures the necessary features are installed, rather than
>> assuming a certain product (with the dependencies implied by the
>> product) will be chosen first.
>
>
> Now I understand the idea. Is it possible to pass only the project
> catalog in oomph.ini as parameter?
No. But lots of things are possible with -Doomph.redirection.* VM
options for redirection one URI location to another. Also keep in mind
that ~/.eclipse/org.eclipse.oomph.setup/setups/com.github.projects.setup
contains the things you've added manually to the "user" product of the
Github product catalog so a user only needs to add it once and it will
stay there...
> Ed Merks wrote on Sun, 24 May 2015 07:55
>> > So I need a way map project to eclipse package
>> No, it's best to avoid that.
>> > and also I need to be sure, that the configuration works with this
>> > package. That's way i chose to use a own product catalog with
>> custom > project catalog. So I can control remotely the possible
>> combinations > between eclipse package and a project.
>> I think this is the wrong approach. Better would be to author your
>> project so it works with the Eclipse Platform product as a starting
>> point, and when you get that right, it should be possible for the end
>> user to choose any product and still end up with a result that
>> contains what your project needs and that contains what that end-user
>> also wants. E.g., someone might want to work with Java projects and
>> C projects, and of course that's possible with Eclipse, so best if
>> you enable that rather than try to constrain what's possible...
>
>
> Yes, this is a better approach. By the way woudn't be better to choose
> the project, without the eclipse package, when I have to define all
> dependencies on project level?
It's not so clear whom that would be better for... The Eclipse packages
(mapped to products in the catalog) provide convenient groups of
features for users, and project selection is an optional activity.
Oomph's simple installer works just to create installations, without
anything special in the workspace. But yes, other alternative designs
are possible...
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to import a non eclipse project? [message #1696336 is a reply to message #1696253] Mon, 25 May 2015 20:05 Go to previous message
Aleksandar Toshovski is currently offline Aleksandar ToshovskiFriend
Messages: 78
Registered: December 2011
Member
Thank you for your help.

It works now. I changed the path and I added the git clone as Predecessor.

      <setupTask
          xsi:type="setup:ResourceCreationTask"
          id="project"
          excludedTriggers="BOOTSTRAP"
          predecessor="git.clone.gitcentral.erp"
          content="......"
          targetURL="${git.clone.gitcentral.erp.location|uri}/.project"
          encoding="UTF-8">
        <description>Create .project file</description>
      </setupTask>

[Updated on: Mon, 25 May 2015 21:49]

Report message to a moderator

Previous Topic:[SOLVED] Oomph was not installed in a proper way from a setup
Next Topic:[SOLVED] Startup trigger not executed
Goto Forum:
  


Current Time: Thu Dec 26 14:46:11 GMT 2024

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

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

Back to the top