Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing a configuration #6

Closed
jgsuess opened this issue Mar 31, 2023 · 9 comments
Closed

Installing a configuration #6

jgsuess opened this issue Mar 31, 2023 · 9 comments

Comments

@jgsuess
Copy link

jgsuess commented Mar 31, 2023

What are the parameters to install a Configuration? Can this be done with this installer?

@a-langer
Copy link
Owner

Hello.

This installer is the same as the original one and supports all tasks of the oomph installation model with "Bootstrap" launch type, see #4 (comment). Here are examples of some of the tasks that you can perform during installation:

  • PreferenceTask - change eclipse plugin preference (property in .prefs files).
  • ResourceCreationTask - create configuration file (xml, prefs or other).
  • EclipseIniTask - change or adding property in eclipse.ini.

Unfortunately, I do not really understand what "Configuration" means, can you provide an XML example of such a setup model?

@jgsuess
Copy link
Author

jgsuess commented Mar 31, 2023

from the [webpage](https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations}:

As of Oomph 1.6, released with Neon.2, there is support for Configurations. A Configuration is not a Scope (is not a container for setup tasks) but rather a container for an Installation and a Workspace; each is optional, but a Configuration with neither is in effect useless. The Installation and Workspace of a Configuration are effectively used as a template to initialize the Installation and Workspace created by the Eclipse Installer, i.e., the setup resources that you can open with Navigate → Open Setup → Installation and Navigate → Open Setup → Workspace in your IDE. So you can specialize the installation with additional installation-specific tasks, e.g., a p2 task to install additional features, and you can specialize the workspace with workspace-specific tasks, e.g., a variable task to specify the value of a variable so you won't be prompted for that value.

Configurations are not only useful for specifying installation-specific and workspace-specific tasks but also for automating the selection process in the setup wizards, including the installer. The Configuration's Installation can reference a specific Product Version and the Configuration's Workspace can optionally reference several specific Project Streams. Both the simple mode and the advanced mode of the installer support dragging and dropping a Configuration to the title area. You can drag to the title area either a file (i.e., a file from the file system or from an Eclipse IDE), a URL (i.e., a link from a browser), or a copy of a Configuration's XMI serialization. This will apply the Configuration to the wizard with the effect that the Installation's Product Version is selected in the wizard and the wizard advances to the next page. Similarly, the Workspace's Project Streams are selected in the wizard and the wizard advances to the next page. If you apply a Configuration with a Workspace to the simple mode of the installer, you will be prompted to switch to advanced mode because only the advanced mode supports Project selection. So in simple mode, applying a Configuration advances to the final page, and in advanced mode, applying a Configuration with an Installation and a Workspace advances to the Variables page.

As an alternative to drag and drop support, rather than dragging a file, link, or XMI serialization, you can copy it to the clipboard and apply the clipboard contents to the wizard. In simple mode this is done via the Apply Configuration menu item. In advanced mode this is done via the Apply Configuration toolbar button on the Product or Project page; the menu item or toolbar item is visible only if the clipboard contains applicable content.

The installer application supports command line arguments so you could also specify a Configuration's file path or URL link on the command line to apply it automatically.

@jgsuess
Copy link
Author

jgsuess commented Mar 31, 2023

archive contains an example. Archive because filetype not acceptable.
RdtiConfiguration.zip

@jgsuess
Copy link
Author

jgsuess commented Mar 31, 2023

spelt out:

Click me
<?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"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    label="rdti">
  <installation
      name="rdti">
    <setupTask
        xsi:type="setup.p2:P2Task"
        label="Epsilon">
      <requirement
          name="org.eclipse.platform.feature.group"/>
      <requirement
          name="org.eclipse.pde.feature.group"/>
      <requirement
          name="org.eclipse.egit.feature.group"/>
      <requirement
          name="org.eclipse.platform.ide"/>
      <requirement
          name="org.eclipse.help.feature.group"/>
      <requirement
          name="org.eclipse.epp.mpc.feature.group"/>
      <requirement
          name="org.eclipse.rcp.feature.group"/>
      <requirement
          name="org.eclipse.jdt.feature.group"/>
      <requirement
          name="org.eclipse.emf.feature.group"/>
      <requirement
          name="org.eclipse.emf.doc.feature.group"/>
      <requirement
          name="org.eclipse.emf.common.feature.group"/>
      <requirement
          name="org.eclipse.emf.ecore.feature.group"/>
      <requirement
          name="org.eclipse.emf.edit.feature.group"/>
      <requirement
          name="org.eclipse.emf.edit.ui.feature.group"/>
      <requirement
          name="org.eclipse.emf.ecore.edit.feature.group"/>
      <requirement
          name="org.eclipse.emf.emfatic.feature.group"/>
      <requirement
          name="org.eclipse.emf.transaction.feature.group"/>
      <requirement
          name="org.eclipse.emf.workspace.feature.group"/>
      <requirement
          name="org.eclipse.emf.query.feature.group"/>
      <requirement
          name="org.eclipse.emf.validation.feature.group"/>
      <requirement
          name="org.eclipse.emf.validation.doc.feature.group"/>
      <requirement
          name="org.eclipse.emf.compare.feature.group"/>
      <requirement
          name="org.eclipse.emf.compare.diagram.gmf.feature.group"/>
      <requirement
          name="org.eclipse.emf.compare.egit.feature.group"/>
      <requirement
          name="org.eclipse.emf.compare.ide.ui.feature.group"/>
      <requirement
          name="org.eclipse.emf.databinding.feature.group"/>
      <requirement
          name="org.eclipse.emf.databinding.edit.feature.group"/>
      <requirement
          name="org.eclipse.emf.mapping.ecore.feature.group"/>
      <requirement
          name="org.eclipse.emf.mapping.ecore.editor.feature.group"/>
      <requirement
          name="org.eclipse.xsd.feature.group"/>
      <requirement
          name="org.eclipse.gmf.feature.group"/>
      <requirement
          name="org.eclipse.gmf.runtime.notation.feature.group"/>
      <requirement
          name="org.eclipse.gmf.tooling.feature.group"/>
      <requirement
          name="org.eclipse.gmf.tooling.runtime.feature.group"/>
      <requirement
          name="org.eclipse.gmf.runtime.sdk.feature.group"/>
      <requirement
          name="org.eclipse.gmf.sdk.feature.group"/>
      <requirement
          name="org.eclipse.gef.feature.group"/>
      <requirement
          name="org.eclipse.gef.sdk.feature.group"/>
      <requirement
          name="org.eclipse.m2m.qvt.oml.feature.group"/>
      <requirement
          name="org.eclipse.m2m.qvt.oml.runtime.feature.group"/>
      <requirement
          name="org.eclipse.m2m.qvt.oml.editor.feature.group"/>
      <requirement
          name="org.eclipse.uml2.feature.group"/>
      <requirement
          name="org.eclipse.uml2.common.feature.group"/>
      <requirement
          name="org.eclipse.uml2.common.edit.feature.group"/>
      <requirement
          name="org.eclipse.uml2.codegen.ecore.ui.feature.group"/>
      <requirement
          name="org.eclipse.uml2.uml.feature.group"/>
      <requirement
          name="org.eclipse.uml2.uml.edit.feature.group"/>
      <requirement
          name="org.eclipse.uml2.doc.feature.group"/>
      <requirement
          name="org.eclipse.emf.codegen.ecore.feature.group"/>
      <requirement
          name="org.eclipse.emf.codegen.ecore.ui.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.core.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.core.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emf.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emf.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.uml.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.uml.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.eugenia.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.hutn.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.hutn.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.eunit.dt.emf.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.evl.emf.validation.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.ewl.emf.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.ewl.gmf.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.graphml.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.simulink.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.simulink.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.spreadsheets.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.spreadsheets.excel.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.spreadsheets.excel.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.spreadsheets.google.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.spreadsheets.google.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.picto.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.flexmi.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.flexmi.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.jdt.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.jdt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.html.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.html.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.csv.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.emc.csv.dt.feature.feature.group"/>
      <requirement
          name="org.eclipse.epsilon.sirius.widget.feature.feature.group"/>
      <repository
          url="http://download.eclipse.org/releases/2021-12"/>
      <repository
          url="http://download.eclipse.org/oomph/updates/milestone"/>
      <repository
          url="http://download.eclipse.org/epsilon/interim"/>
      <repository
          url="http://download.eclipse.org/emfatic/update"/>
      <repository
          url="http://download.eclipse.org/tools/orbit/downloads/drops/R20211213173813/repository"/>
      <repository
          url="http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/releases"/>
    </setupTask>
    <setupTask
        xsi:type="setup.p2:P2Task"
        label="CDO Explorer">
      <requirement
          name="epp.package.java"/>
      <requirement
          name="org.eclipse.platform.feature.group"/>
      <requirement
          name="org.eclipse.rcp.feature.group"/>
      <requirement
          name="org.eclipse.jdt.feature.group"/>
      <requirement
          name="org.eclipse.pde.feature.group"/>
      <requirement
          name="org.eclipse.emf.cdo.sdk.feature.group"/>
      <requirement
          name="org.eclipse.emf.cdo.examples.feature.group"/>
      <requirement
          name="org.eclipse.emf.cdo.examples.installer.feature.group"/>
      <requirement
          name="org.eclipse.emf.cdo.migrator.feature.group"/>
      <requirement
          name="org.eclipse.net4j.sdk.feature.group"/>
      <requirement
          name="org.eclipse.emf.ecp.emfforms.runtime.feature.feature.group"/>
      <repository
          url="http://download.eclipse.org/technology/epp/packages/latest"/>
      <repository
          url="https://download.eclipse.org/releases/latest"/>
      <repository
          url="https://download.eclipse.org/tools/orbit/downloads/latest-R"/>
      <repository
          url="https://download.eclipse.org/nebula/releases/latest"/>
      <repository
          url="https://download.eclipse.org/modeling/emf/cdo/updates/releases/latest"/>
    </setupTask>
    <setupTask
        xsi:type="setup.p2:P2Task"
        label="OCL">
      <requirement
          name="org.eclipse.ocl.examples.feature.group"/>
    </setupTask>
    <setupTask
        xsi:type="setup:CompoundTask"
        name="Additional Plugins">
      <setupTask
          xsi:type="setup.p2:P2Task"
          label="Plantuml">
        <requirement
            name="net.sourceforge.plantuml.ecore.feature.feature.group"/>
        <requirement
            name="net.sourceforge.plantuml.feature.feature.group"/>
        <requirement
            name="net.sourceforge.plantuml.lib.elk.feature.feature.group"/>
        <requirement
            name="net.sourceforge.plantuml.lib.jlatexmath.feature.feature.group"/>
        <requirement
            name="net.sourceforge.plantuml.lib.feature.feature.group"/>
        <repository
            url="http://hallvard.github.io/plantuml/"/>
        <description>Plantuml</description>
      </setupTask>
      <setupTask
          xsi:type="setup:CompoundTask"
          name="Editors">
        <setupTask
            xsi:type="setup.p2:P2Task"
            label="Wildweb Developer's Schema Document Editors">
          <requirement
              name="org.eclipse.wildwebdeveloper.feature.feature.group"/>
          <requirement
              name="org.eclipse.wildwebdeveloper.xml.feature.feature.group"/>
          <repository
              url="http://download.eclipse.org/wildwebdeveloper/releases/latest/"/>
        </setupTask>
        <setupTask
            xsi:type="setup.p2:P2Task"
            label="FluentMark Markdown support">
          <requirement
              name="net.certiv.fluent.dt.feature.feature.group"/>
          <repository
              url="https://www.certiv.net/updates"/>
        </setupTask>
        <setupTask
            xsi:type="setup.p2:P2Task"
            label="Albert Tregnaghi's Editors for Yaml, Bash and Jenkins">
          <requirement
              name="de.jcup.asciidoctoreditor.feature.group"/>
          <requirement
              name="de.jcup.yamleditor.feature.group"/>
          <requirement
              name="de.jcup.basheditor.feature.group"/>
          <requirement
              name="de.jcup.jenkinseditor.feature.feature.group"/>
          <repository
              url="https://de-jcup.github.io/update-site-eclipse-asciidoctor-editor/update-site/"/>
          <repository
              url="https://de-jcup.github.io/update-site-eclipse-yaml-editor/update-site"/>
          <repository
              url="https://de-jcup.github.io/update-site-eclipse-bash-editor/update-site"/>
          <repository
              url="https://de-jcup.github.io/update-site-eclipse-jenkins-editor/update-site/"/>
          <description>Allow manipulation of platform files and code generation templates</description>
        </setupTask>
      </setupTask>
    </setupTask>
    <productVersion
        href="index:/org.eclipse.setup#//@productCatalogs[name='org.eclipse.products']/@products[name='epp.package.committers']/@versions[name='latest.released']"/>
  </installation>
  <workspace
      name="rdti.workspace"
      label="rdti Workspace">
    <description>The rdti workspace provides cool stuff.</description>
  </workspace>
  <description>The rdti configuration provides cool stuff.</description>
</setup:Configuration>

@a-langer
Copy link
Owner

Ok, as far as I understand "Configuration" is a part of the setup model placed in a separate file. It can be loaded into a project or product installation model using the "ConfigurationReference" annotation. For example Configuration OomphConfiguration.setup loaded in setup model of project Oomph.setup:

  <annotation
      source="ConfigurationReference">
    <reference
        href="configurations/OomphConfiguration.setup#/"/>
  </annotation>

Most likely, the configuration you have attached is part of the setup model of some product or project with which you can install.

I created a setup model of my own project "rdti.project" with linked to this configuration (attachment setups_rdti.zip) and tried installed as follows:

./eclipse-inst -nosplash -application org.eclipse.oomph.console.application -vmargs \
  -Doomph.installation.location="$PWD/ide" \
  -Doomph.redirection.projectsDir="index:/redirectable.projects.setup->$PWD/setups_rdti/ProjectsCatalog.setup" \
  -Doomph.product.id="epp.package.java" \
  -Doomph.project.id="rdti.project" \
  -Doomph.workspace.location="$PWD/workspace" \
  -Declipse.p2.max.threads=10 -Doomph.installer.verbose=true

But this led to the installation of only the product "epp.package.java" itself with an empty project, the installation tasks from the RdtiConfiguration.setup file were not completed. I have no idea what needs to be done to make this work, there is no such information in the documentation at the link you provided.

In any case, this is not a question about the console installer plugin, but about the Oomph setup model as a whole.

@jgsuess
Copy link
Author

jgsuess commented Apr 1, 2023

I would disagree, as I have the option to use a configuration in the GUI based installer in this way:

Both the simple mode and the advanced mode of the installer support dragging and dropping a Configuration to the title area. You can drag to the title area either a file (i.e., a file from the file system or from an Eclipse IDE), a URL (i.e., a link from a browser), or a copy of a Configuration's XMI serialization. This will apply the Configuration to the wizard with the effect that the Installation's Product Version is selected in the wizard and the wizard advances to the next page.

I was hoping that there would be options to the command line that accept a configuration as

  • file from the file system or from an Eclipse IDE
  • a URL (i.e., a link from a browser), or
  • a copy of a Configuration's XMI serialization

in parallel to GUIs behaviour. Is that a reasonable assumption?

@jgsuess
Copy link
Author

jgsuess commented Apr 1, 2023

For me, this is an important aspect, as I believe small Open-Source Projects are much more likely to have just a Configuration rather then a project setup linking to a Configuration. That later functionality seems to be targeted at advertising the installation of large, long-running projects. It requires a lot more setup which I believe creates a hurdle to use. The three options above allow both the project organiser and contributors to easily consume a Configuration. I believe this is a good starting point for growing the use later.

@a-langer
Copy link
Owner

a-langer commented Apr 4, 2023

I created the test version with the new oomph.configuration.setups option for installation from the configuration, you can download and tested it from these links:

Install the product and/or project from Oomph Configuration, ex.:

# Install "Business Intelligence Reporting Tool" over "Eclipse IDE for Eclipse Committers" from Configuration
./eclipse-inst -nosplash -application org.eclipse.oomph.console.application -vmargs \
  -Doomph.configuration.setups="https://raw.githubusercontent.com/eclipse/birt/master/build/org.eclipse.birt.releng/BIRTConfiguration.setup" \
  -Doomph.installation.location="$PWD/ide" \
  -Doomph.workspace.location="$PWD/workspace" \
  -Doomph.installer.verbose=true

@a-langer
Copy link
Owner

Implemented in version 1.0.3, see CHANGELOG.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants