<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013-2017 Lorenzo Bettini.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html

Contributors:
  Lorenzo Bettini - Initial contribution and API
-->
<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<relativePath>../../releng/org.eclipse.xsemantics.parent/pom.xml</relativePath>
		<groupId>org.eclipse.xsemantics</groupId>
		<artifactId>org.eclipse.xsemantics.parent</artifactId>
		<version>1.22.0</version>
	</parent>

	<artifactId>org.eclipse.xsemantics.dsl</artifactId>
	<packaging>eclipse-plugin</packaging>
	
	<dependencies>
		<!-- This is required only for allowing the org.eclipse.xsemantics.dsl to
			be used as a Maven jar with the xtext-maven-plugin  -->
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>org.eclipse.xsemantics.runtime</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>generateEMFModel</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<configuration>
							<mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
							<arguments>
								<argument>/${project.basedir}/src/org/eclipse/xsemantics/dsl/GenerateXsemanticsModelClasses.mwe2</argument>
								<argument>-p</argument>
								<argument>rootPath=/${project.basedir}/..</argument>
							</arguments>
							<classpathScope>compile</classpathScope>
							<includePluginDependencies>true</includePluginDependencies>
							<cleanupDaemonThreads>false</cleanupDaemonThreads><!-- see https://bugs.eclipse.org/bugs/show_bug.cgi?id=475098#c3 -->
						</configuration>
					</execution>
					<execution>
						<id>mwe2Launcher</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<configuration>
							<mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
							<arguments>
								<argument>/${project.basedir}/src/org/eclipse/xsemantics/dsl/GenerateXsemantics.mwe2</argument>
								<argument>-p</argument>
								<argument>rootPath=/${project.basedir}/..</argument>
							</arguments>
							<classpathScope>compile</classpathScope>
							<includePluginDependencies>true</includePluginDependencies>
							<cleanupDaemonThreads>false</cleanupDaemonThreads><!-- see https://bugs.eclipse.org/bugs/show_bug.cgi?id=475098#c3 -->
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>xtend-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
	
</project>
