<?xml version="1.0" encoding="UTF-8"?>
<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/it.xsemantics.parent/pom.xml</relativePath>
		<groupId>net.sf.xsemantics</groupId>
		<artifactId>it.xsemantics.parent</artifactId>
		<version>1.8.1</version>
	</parent>

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

	<build>
		<!-- The following is required so that the mwe2 workflow finds the .xtext 
			grammar file -->
		<sourceDirectory>src</sourceDirectory>
		<resources>
			<resource>
				<directory>src</directory>
				<includes>
					<include>**/*.xtext</include>
				</includes>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.fornax.toolsupport</groupId>
				<artifactId>fornax-oaw-m2-plugin</artifactId>
				<version>${fornax-oaw-m2-plugin-version}</version>
				<executions>
<!-- 					<execution> -->
<!-- 						<phase>generate-sources</phase> -->
<!-- 						<id>XcoreGeneration</id> -->
<!-- 						<configuration> -->
<!-- 							<skip>${mwe2.skip}</skip> -->
<!-- 							<workflowEngine>mwe2</workflowEngine> -->
<!-- 							<workflowDescriptor>src/it/xsemantics/dsl/GenerateXsemanticsModel.mwe2</workflowDescriptor> -->
<!-- 						</configuration> -->
<!-- 						<goals> -->
<!-- 							<goal>run-workflow</goal> -->
<!-- 						</goals> -->
<!-- 					</execution> -->
					<execution>
						<phase>generate-sources</phase>
						<id>GrammarGeneration</id>
						<configuration>
							<skip>${mwe2.skip}</skip>
							<!-- the second one must be forced, otherwise it won't be executed -->
<!-- 							<force>true</force> -->
							<workflowEngine>mwe2</workflowEngine>
							<workflowDescriptor>src/it/xsemantics/dsl/GenerateXsemantics.mwe2</workflowDescriptor>
						</configuration>
						<goals>
							<goal>run-workflow</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>xtend-maven-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
	
</project>
