<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.openhab.core.bundles</groupId>
    <artifactId>org.openhab.core.reactor.bundles</artifactId>
    <version>2.5.0-SNAPSHOT</version>
  </parent>

  <artifactId>org.openhab.core.model.item</artifactId>

  <name>openHAB Core :: Bundles :: Model Items</name>

  <dependencies>
    <dependency>
      <groupId>org.openhab.core.bundles</groupId>
      <artifactId>org.openhab.core.model.core</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>notestsources</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src-gen</source>
                <source>xtend-gen</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.4.0</version>
        <configuration>
          <includeProjectDependencies>true</includeProjectDependencies>
          <includePluginDependencies>true</includePluginDependencies>
          <classpathScope>compile</classpathScope>
          <mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
          <cleanupDaemonThreads>false</cleanupDaemonThreads>
          <arguments>
            <argument>file://${project.basedir}/src/org/eclipse/smarthome/model/GenerateItems.mwe2</argument>
            <argument>-p</argument>
            <argument>rootPath=/${project.basedir}/..</argument>
          </arguments>
          <additionalClasspathElements>
            <additionalClasspathElement>/${basedir}/../antlr-generator-3.2.0-patch.jar</additionalClasspathElement>
          </additionalClasspathElements>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.2</version>
          </dependency>
          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.6.4</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.xtend</groupId>
        <artifactId>xtend-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>