<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.overturetool</groupId>
    <artifactId>root</artifactId>
    <version>3.0.2</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
<packaging>pom</packaging>
  <artifactId>ide</artifactId>
  <name>Overture IDE Top-level</name>
  <description>Super POM for all IDE (Eclipse) artifacts.</description>

  <properties>
    <maven.test.skip>false</maven.test.skip>
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <tycho.version>1.7.0</tycho.version>
  </properties>

  <modules>
    <!-- Put all child Eclipse Plugin projects(modules) here -->
    <module>core</module>
    <module>ui</module>
    <module>parsers</module>
    <module>builders</module>
    <module>debug</module>
    <module>vdmsl</module>
    <module>vdmpp</module>
    <module>vdmrt</module>
    <module>help</module>
    <module>plugins</module>
    <module>platform</module>
    <module>features</module>
    <module>product</module>
  </modules>

  <reporting>
    <plugins>
      <!-- never deploy/release/publish this module -->
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>

      <!-- never test the IDE -->
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.13</version>
          <configuration>
              <testFailureIgnore>true</testFailureIgnore>
          </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <failOnError>false</failOnError>
          <excludePackageNames>*org.eclipse.*</excludePackageNames>
          <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
          <show>public</show>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-maven-plugin</artifactId>
          <version>${tycho.version}</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>target-platform-configuration</artifactId>
          <version>${tycho.version}</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-p2-director-plugin</artifactId>
          <version>${tycho.version}</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-packaging-plugin</artifactId>
          <version>${tycho.version}</version>
          <configuration>
            <archive>
              <addMavenDescriptor>false</addMavenDescriptor>
            </archive>
          </configuration>
        </plugin>
        <!-- Use the below to update the version numbers of the poms,
             manifests, and feature.xml files with the commandline:

$ mvn -Dtycho.mode=maven tycho-versions:set-version -DnewVersion=2.0.2

Don't commit the changes to the export-packages lines in
the manifests, though.
        -->
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-versions-plugin</artifactId>
          <version>${tycho.version}</version>
        </plugin>

        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>copy-dependencies</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>

      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>eclipse-2020-09</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/2020-09</url>
    </repository>
  </repositories>

  <profiles>
    <!-- These next five profiles will autodetect which OS maven is
         being executed on and then build the matching version of
         Overture for that OS.  -jwc/23Jan2014
    -->

    <profile>
      <id>win64</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <os>
          <family>windows</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
              <environments>
                <environment>
                  <os>win32</os>
                  <ws>win32</ws>
                  <arch>x86_64</arch>
                </environment>
              </environments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>mac</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <os>
          <family>mac</family>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
              <environments>
                <environment>
                  <os>macosx</os>
                  <ws>cocoa</ws>
                  <arch>x86_64</arch>
                </environment>
              </environments>
            </configuration>
          </plugin>


<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>tycho-p2-repository-plugin</artifactId>
  <version>${tycho.version}</version>
  <configuration>
    <includeAllDependencies>true</includeAllDependencies>
    <profileProperties>
      <macosx-bundled>true</macosx-bundled>
    </profileProperties>
  </configuration>
</plugin>



        </plugins>
      </build>
    </profile>

    <profile>
      <id>linux64</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <os>
          <family>unix</family>
          <name>linux</name>
          <arch>amd64</arch>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
              <environments>
                <environment>
                  <os>linux</os>
                  <ws>gtk</ws>
                  <arch>x86_64</arch>
                </environment>
                <environment>
                  <os>linux</os>
                  <ws>gtk</ws>
                  <arch>x86_64</arch>
                </environment>
              </environments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Use this profile to build Overture for all platforms, but you
         may need to add -P\!linux (or whichever os) to disable the
         autodetected profile (per above), otherwise the autodetected
         profile may take precedence over the command-line specified
         profile.  -jwc/23Jan2014
    -->
    <profile>
      <id>all-platforms</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
              <environments>
                <environment>
                  <os>win32</os>
                  <ws>win32</ws>
                  <arch>x86_64</arch>
                </environment>
                <environment>
                  <os>linux</os>
                  <ws>gtk</ws>
                  <arch>x86_64</arch>
                </environment>
                <environment>
                  <os>macosx</os>
                  <ws>cocoa</ws>
                  <arch>x86_64</arch>
                </environment>
              </environments>
            </configuration>
          </plugin>
        </plugins>
      </build>
  </profile>

    <profile>
      <!-- This profile enables UI tests. Must not be enabled if running on terminal server with no UI -->
      <id>ui-tests</id>
      <activation>
	<activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>ui.tests</module>
      </modules>
    </profile>

  </profiles>
</project>
