Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph launching with preselected product and project(Launching oomph with a preselected product and a preslected project.setup file)
Oomph launching with preselected product and project [message #1814026] Mon, 02 September 2019 05:18 Go to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
Hello Oomph-Team,

i have written a setup-file for oomph, which let the user select any allready cloned maven project.


<?xml version="1.0" encoding="UTF-8"?>
<setup:Project
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:git="http://www.eclipse.org/oomph/setup/git/1.0"
xmlns:maven="http://www.eclipse.org/oomph/setup/maven/1.0"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xsi:schemaLocation="http://www.eclipse.org/oomph/setup/git/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Git.ecore http://www.eclipse.org/oomph/setup/maven/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Maven.ecore"
name="mavenimport"
label="MavenImport">
<setupTask
xsi:type="setup:VariableTask"
name="github.fork.name"
defaultValue="devonfw-forge"
storageURI="scope://Workspace"
label="Fork Name"/>
<setupTask
xsi:type="setup:VariableTask"
name="github.repo.name"
defaultValue="jump-the-queue-v2"
storageURI="scope://Workspace"
label="Repository Name"/>
<setupTask
xsi:type="setup:VariableTask"
name="github.remote.uri"
storageURI="scope://Workspace"
label="Remote URL (HTTPS/SSH)">
<choice
value="https://github.com/${github.fork.name}/${github.repo.name}.git"
label="HTTPS"/>
<choice
value="ssh://github.com/${github.fork.name}/${github.repo.name}.git"
label="SSH"/>
</setupTask>
<setupTask
xsi:type="maven:MavenImportTask">
<sourceLocator
rootFolder="${git.clone.location}/java/"
locateNestedProjects="true"/>
<description>Imports Maven projects contained in the cloned Repo.</description>
</setupTask>
<stream name="master"
label="Master">
<description>Branch to check out.</description>
</stream>
<logicalProjectContainer
xsi:type="setup:ProjectCatalog"
href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
<description>This imports any project.</description>
</setup:Project>

I would like to launch these project using the commandline with the product (2019-06), but i do not want to click the first two selection in the wizard.
Is there some sort of modification to these setup-file and some sort of command line parameter i can use to do that, so that the eclipse-installer selects these two choices automatically without me having to select and submit my choices in the wizard?

Best Regards
Re: Oomph launching with preselected product and project [message #1814030 is a reply to message #1814026] Mon, 02 September 2019 07:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This can be accomplished with a Configuration:

https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations

You can find several examples of those in use:

https://ci.eclipse.org/emf/
https://ci.eclipse.org/oomph/
https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning#Apply_the_Platform_SDK_Configuration

Configuration URIs specified on the command line will be processed automatically the same as if you dragged and dropped it onto the installer.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph launching with preselected product and project [message #1814036 is a reply to message #1814030] Mon, 02 September 2019 09:09 Go to previous messageGo to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
Thank you for your help.

I wrote a small configuration, choosing automatically the 2019-06 product. But now i am a bit lost (i am pretty new to this). Maybe you could help me out again?

<?xml version="1.0" encoding="UTF-8"?>
<setup:Configuration
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
label="Target Platform Latest Released">
<installation
name="eclipse.target.platform.latest.released.installation"
label="Latest Release (2019-06) Installation">
<productVersion
href="index:/org.eclipse.setup#//@productCatalogs[name='org.eclipse.products']/@products[name='epp.package.java']/@versions[name='latest.released']"/>
<description>The Java (2019-06) development environment installation provides the full development environment for working Java.</description>
</installation>


<description>THe Java Development Environment configuration provides the full development environment for working on Maven project.</description>
</setup:Configuration>

Now i would like to import my project.setup file and nothing i tried worked. Could you provide me with a good link or tip, how to get that done?

Kind Regards
Re: Oomph launching with preselected product and project [message #1814037 is a reply to message #1814036] Mon, 02 September 2019 09:15 Go to previous messageGo to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
I may should add that i am executing it with:

call eclipse-inst -vm "C:\Users\software\java\bin" https://raw.githubusercontent.com/dhelmke/NewAsciidocFiles/master/setups/my.automated.products.setup

and it workes by choosing the right product.
Re: Oomph launching with preselected product and project [message #1814040 is a reply to message #1814037] Mon, 02 September 2019 09:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Your configuration doesn't have a workspace. The wizard for creating a configuration creates both an installation and a workspace. In the workspace you can reference the projects stream(s). Like the EMF one does:
<?xml version="1.0" encoding="UTF-8"?>
<setup:Configuration
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    label="EMF Development Environment">
  <installation
      name="emf.development.environment.installation"
      label="EMF Development Environment Installation">
    <productVersion
        href="index:/org.eclipse.setup#//@productCatalogs[name='org.eclipse.products']/@products[name='epp.package.committers']/@versions[name='latest']"/>
    <description>The EMF development environment installation provides the full development environment for working with EMF and XSD.</description>
  </installation>
  <workspace
      name="emf.development.environment.workspace"
      label="EMF Development Environment Workspace">
    <setupTask
        xsi:type="setup:VariableTask"
        name="eclipse.target.platform"
        value="2019-09"/>
    <stream
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='emf']/@projects[name='core']/@streams[name='master']"/>
    <stream
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='emf']/@projects[name='gwt']/@streams[name='master']"/>
    <stream
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='emf']/@projects[name='rap']/@streams[name='master']"/>
    <stream
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='emf']/@projects[name='xcore']/@streams[name='master']"/>
    <stream
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='xsd']/@streams[name='master']"/>
    <description>The EMF/XSD development environment workspace includes the Core, RAP, GWT, Xcore, ODA, Releng, and XSD.</description>
  </workspace>
  <description>THe EMF Development Environment configuration provides the full development environment for working on EMF.</description>
</setup:Configuration>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph launching with preselected product and project [message #1814043 is a reply to message #1814040] Mon, 02 September 2019 09:58 Go to previous messageGo to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
Thank your for your quick reply. I came across that source myself, but that is more for allready existing projects. I did not found a scource how to import a new project into the eclise-installer?
Sorry for asking again. I copied the workspace and it runs without exception and i used the line:

<project href="https://raw.githubusercontent.com/dhelmke/NewAsciidocFiles/master/setups/MavenImport.setup#/"/>

to import my project, but it is not that easy. Do you have maybe another source, where i culd look that one up?

Best Regards
Re: Oomph launching with preselected product and project [message #1814052 is a reply to message #1814043] Mon, 02 September 2019 10:33 Go to previous messageGo to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
I hope you don't get tiered of me, it's all new to me. I am now so far that my setup-file looks like-,

<?xml version="1.0" encoding="UTF-8"?>
<setup:Configuration
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
label="Target Platform Latest Released">
<installation
name="eclipse.target.platform.latest.released.installation"
label="Latest Release (2019-06) Installation">
<productVersion
href="index:/org.eclipse.setup#//@productCatalogs[name='org.eclipse.products']/@products[name='epp.package.java']/@versions[name='latest.released']"/>
<description>The Java (2019-06) development environment installation provides the full development environment for working Java.</description>
</installation>
<setup:WorkspaceTask
id="workspace"/>
<workspace
name="clipse.target.platform.latest.released.workspace"
label="Latest Release (2019-06) Workspace">
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.target.platform"
value="2019-06"
<setupTask/>
<setupTask
xsi:type="setup:ResourceCreationTask"
content="MAX_RECENT_WORKSPACES=5&#xD;&#xA;RECENT_WORKSPACES=${workspace.location|property}&#xD;&#xA;RECENT_WORKSPACES_PROTOCOL=3&#xD;&#xA;SHOW_WORKSPACE_SELECTION_DIALOG=true&#xD;&#xA;eclipse.preferences.version=1"
targetURL="configuration:/.settings/org.eclipse.ui.ide.prefs"/>
<project href="https://raw.githubusercontent.com/dhelmke/NewAsciidocFiles/master/setups/MavenImport.setup#/"/>
<stream
href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='epp']/@projects[name='MavenImport']/@streams[name='master']"/>
<description>The EMF/XSD development environment workspace includes the Core, RAP, GWT, Xcore, ODA, Releng, and XSD.</description>
</workspace>


<description>THe Java Development Environment configuration provides the full development environment for working on Maven project.</description>
</setup:Configuration>

But my project is not imported. What iam doing wrong here?

Any help is welcome.
Re: Oomph launching with preselected product and project [message #1814056 is a reply to message #1814052] Mon, 02 September 2019 12:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
How are you editing this file? A workspace can't contain a project so what is this doing in there?
<project href="https://raw.githubusercontent.com/dhelmke/NewAsciidocFiles/master/setups/MavenImport.setup#/"/>

Best to edit with the Seutp Editor so that you create valid content. You'd use Load Resource... from the context menu to load you MavenImport.setup using the URI like you have, and then you can edit the Workspace's stream property to add the reference to that Project's Stream. (I think you can drag the stream and drop it on the Workspace too.)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph launching with preselected product and project [message #1814062 is a reply to message #1814056] Mon, 02 September 2019 15:15 Go to previous messageGo to next message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
Thank you for your reply-.

I think these topic is interesting, I will continue to work on it.

Best Regards
Re: Oomph launching with preselected product and project [message #1814319 is a reply to message #1814062] Mon, 09 September 2019 12:21 Go to previous message
Daniel Helmke is currently offline Daniel HelmkeFriend
Messages: 9
Registered: August 2019
Junior Member
It works now.

Kind regards
Previous Topic:Hosting own index
Next Topic:Defining source and Javadoc location for JRE task
Goto Forum:
  


Current Time: Thu Apr 25 17:21:11 GMT 2024

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

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

Back to the top