<!--

    This file is part of veraPDF Validation Model DSL, a module of the veraPDF project.
    Copyright (c) 2015, veraPDF Consortium <info@verapdf.org>
    All rights reserved.

    veraPDF Validation Model DSL is free software: you can redistribute it and/or modify
    it under the terms of either:

    The GNU General public license GPLv3+.
    You should have received a copy of the GNU General Public License
    along with veraPDF Validation Model DSL as the LICENSE.GPL file in the root of the source
    tree.  If not, see http://www.gnu.org/licenses/ or
    https://www.gnu.org/licenses/gpl-3.0.en.html.

    The Mozilla Public License MPLv2+.
    You should have received a copy of the Mozilla Public License along with
    veraPDF Validation Model DSL as the LICENSE.MPL file in the root of the source tree.
    If a copy of the MPL was not distributed with this file, you can obtain one at
    http://mozilla.org/MPL/2.0/.

-->
<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>../org.verapdf.releng/pom.xml</relativePath>
		<groupId>org.verapdf</groupId>
		<artifactId>parent</artifactId>
		<version>1.18.3</version>
	</parent>

	<artifactId>org.verapdf</artifactId>
	<packaging>eclipse-plugin</packaging>

	<name>veraPDF Validation Model DSL</name>
	<description>Domain specific language defined for PDF model in Xtext.</description>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<executions>
					<execution>
						<id>gen-clean</id>
						<phase>clean</phase>
						<!-- Clean up generated files in all projects -->
						<configuration>
							<filesets combine.children="append">
								<fileset>
									<directory>${basedir}/src-gen/</directory>
								</fileset>
								<fileset>
									<directory>${basedir}/model/generated/</directory>
								</fileset>
								<fileset>
									<directory>${basedir}/../${project.artifactId}.ui/src-gen/</directory>
								</fileset>
								<fileset>
									<directory>${basedir}/../${project.artifactId}.tests/src-gen/</directory>
								</fileset>
							</filesets>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<includeProjectDependencies>false</includeProjectDependencies>
					<includePluginDependencies>true</includePluginDependencies>
					<mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
					<arguments>
						<argument>file://${project.basedir}/src/org/verapdf/GenerateModel.mwe2</argument>
						<argument>
							-p
						</argument>
						<argument>
							runtimeProject=/${project.basedir}
						</argument>
					</arguments>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.eclipse.xtext</groupId>
						<artifactId>org.eclipse.xtext.xtext</artifactId>
						<version>${xtext.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.xtext</groupId>
						<artifactId>org.eclipse.xtext.xbase</artifactId>
						<version>${xtext.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>xtend-maven-plugin</artifactId>
				<version>${xtext.version}</version>
				<dependencies>
					<dependency>
						<groupId>org.eclipse.platform</groupId>
						<artifactId>org.eclipse.equinox.common</artifactId>
						<version>${equinox.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.jdt</groupId>
						<artifactId>org.eclipse.jdt.core</artifactId>
						<version>${jdt.core.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.jdt</groupId>
						<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
						<version>${jdt.compiler.apt.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.jdt</groupId>
						<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
						<version>${jdt.compiler.tool.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.emf</groupId>
						<artifactId>org.eclipse.emf.codegen</artifactId>
						<version>${emf.codegen.version}</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											exec-maven-plugin
										</artifactId>
										<versionRange>
											[1.2.1,)
										</versionRange>
										<goals>
											<goal>java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
