<?xml version="1.0" encoding="UTF-8"?>
<setup:Product
    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"
    name="cdo-server"
    label="CDO Server">
  <annotation
      source="http://www.eclipse.org/oomph/setup/BrandingInfo">
    <detail
        key="folderName">
      <value>eclipse</value>
    </detail>
    <detail
        key="folderName.macosx">
      <value>Eclipse</value>
    </detail>
  </annotation>
  <setupTask
      xsi:type="setup.p2:P2Task"
      label="${scope.product.label}">
    <requirement
        name="org.eclipse.platform.ide"
        versionRange="[4.34.0,5.0.0)"
        filter="(|(&amp;(osgi.arch=aarch64)(osgi.os=linux)(osgi.ws=gtk))(&amp;(osgi.arch=aarch64)(osgi.os=macosx)(osgi.ws=cocoa))(&amp;(osgi.arch=x86_64)(osgi.os=linux)(osgi.ws=gtk))(&amp;(osgi.arch=x86_64)(osgi.os=macosx)(osgi.ws=cocoa))(&amp;(osgi.arch=x86_64)(osgi.os=win32)(osgi.ws=win32)))"/>
    <requirement
        name="org.eclipse.platform.feature.group"/>
    <requirement
        name="org.eclipse.rcp.feature.group"/>
    <requirement
        name="org.eclipse.emf.cdo.server.feature.group"/>
    <requirement
        name="org.eclipse.emf.cdo.server.db.feature.group"/>
    <requirement
        name="org.eclipse.net4j.db.feature.group"/>
    <requirement
        name="org.eclipse.net4j.db.h2.feature.group"/>
    <requirement
        name="org.eclipse.net4j"/>
    <requirement
        name="org.eclipse.net4j.jvm"/>
    <requirement
        name="org.eclipse.net4j.tcp"/>
  </setupTask>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Dnet4j.config"
      value="=${installation.location/}${installation.relativeProductFolder}"
      vm="true"/>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Xmx"
      value="1g"
      vm="true"/>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-console"/>
  <setupTask
      xsi:type="setup:TextModifyTask"
      url="${installation.location|uri}/${installation.relativeProductFolder}/configuration/config.ini"
      encoding="ISO-8859-1">
    <modification
        pattern="eclipse\.application=([^\r\n]*)">
      <substitution>org.eclipse.emf.cdo.server.app</substitution>
    </modification>
    <modification
        pattern="(osgi\.splashPath=)">
      <substitution>XXXosgi.splashPath=</substitution>
    </modification>
  </setupTask>
  <setupTask
      xsi:type="setup:ResourceCreationTask"
      targetURL="${installation.location|uri}/${installation.relativeProductFolder}/cdo-server.xml"
      encoding="UTF-8">
    <content>
      &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
      &lt;cdoServer>

        &lt;acceptor type=&quot;tcp&quot; listenAddr=&quot;0.0.0.0&quot; port=&quot;2036&quot;/>

        &lt;repository name=&quot;repo1&quot;>
          &lt;property name=&quot;overrideUUID&quot; value=&quot;&quot;/>
          &lt;property name=&quot;supportingAudits&quot; value=&quot;true&quot;/>
          &lt;property name=&quot;supportingBranches&quot; value=&quot;true&quot;/>
          &lt;property name=&quot;ensureReferentialIntegrity&quot; value=&quot;false&quot;/>
          &lt;property name=&quot;allowInterruptRunningQueries&quot; value=&quot;true&quot;/>
          &lt;property name=&quot;idGenerationLocation&quot; value=&quot;STORE&quot;/>
          &lt;property name=&quot;serializeCommits&quot; value=&quot;false&quot;/>
          &lt;property name=&quot;optimisticLockingTimeout&quot; value=&quot;10000&quot;/>

          &lt;store type=&quot;db&quot;>
            &lt;property name=&quot;connectionKeepAlivePeriod&quot; value=&quot;60&quot;/>
            &lt;property name=&quot;readerPoolCapacity&quot; value=&quot;20&quot;/>
            &lt;property name=&quot;writerPoolCapacity&quot; value=&quot;20&quot;/>

            &lt;mappingStrategy type=&quot;horizontal&quot;>
              &lt;property name=&quot;qualifiedNames&quot; value=&quot;true&quot;/>
            &lt;/mappingStrategy>

            &lt;dbAdapter name=&quot;h2&quot;/>

            &lt;dataSource
              class=&quot;org.h2.jdbcx.JdbcDataSource&quot;
              URL=&quot;jdbc:h2:${installation.location}/${installation.relativeProductFolder}/database/repo1&quot;/>
          &lt;/store>
        &lt;/repository>
      &lt;/cdoServer>

    </content>
  </setupTask>
  <version name="latest.release"
      label="Latest Release"
      requiredJavaVersion="11">
    <setupTask
        xsi:type="setup.p2:P2Task">
      <repository
          url="https://download.eclipse.org/releases/latest"/>
      <repository
          url="https://download.eclipse.org/modeling/emf/cdo/updates/releases/latest"/>
    </setupTask>
  </version>
  <version name="integration.stable"
      label="Stable Integration"
      requiredJavaVersion="11">
    <setupTask
        xsi:type="setup.p2:P2Task">
      <repository
          url="https://download.eclipse.org/releases/latest"/>
      <repository
          url="https://download.eclipse.org/modeling/emf/cdo/updates/integration/stable/latest"/>
    </setupTask>
  </version>
  <version name="integration.weekly"
      label="Weekly Integration"
      requiredJavaVersion="11">
    <setupTask
        xsi:type="setup.p2:P2Task">
      <repository
          url="https://download.eclipse.org/releases/latest"/>
      <repository
          url="https://download.eclipse.org/modeling/emf/cdo/updates/integration/weekly/latest"/>
    </setupTask>
  </version>
  <description>A headless CDO Model Repository server.</description>
</setup:Product>
