<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.fusesource.ide</groupId>
	  	<artifactId>project</artifactId>
	  	<version>7.2.129</version>
      <relativePath>..</relativePath>
  </parent>

  <artifactId>ide-codegen</artifactId>

  <name>${project.artifactId}</name>
  <description>IDE Code Generator</description>

  <prerequisites>
    <maven>2.0.9</maven>
  </prerequisites>

  <properties>
    <codeGen>eclipse</codeGen>

    <!-- TODO this is required until perfectus build 010 -->
    <!--<fabric-version>99-master-SNAPSHOT</fabric-version>-->
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.fusesource.fabric</groupId>
      <artifactId>camel-tooling-util</artifactId>
      <version>${fabric-version}</version>
    </dependency>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-core</artifactId>
      <version>${scalate-version}</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.2</version>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/main/scala</sourceDirectory>

    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <jvmArgs>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>
          <args>
            <!-- arg>-unchecked</arg -->
            <arg>-deprecation</arg>
          </args>
          <scalaVersion>${scala-version}</scalaVersion>
        </configuration>
      </plugin>


        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.2.1</version>
          <executions>
            <execution>
              <goals>
                <goal>java</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <mainClass>org.fusesource.ide.generator.Main</mainClass>
            <cleanupDaemonThreads>false</cleanupDaemonThreads>
            <arguments>
              <argument>${codeGen}</argument>
            </arguments>
            <systemProperties>
              <systemProperty>
                <key>basedir</key>
                <value>${basedir}</value>
              </systemProperty>
            </systemProperties>
          </configuration>
        </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jrebel</id>
      <dependencies>
        <dependency>
          <groupId>com.sun.jersey</groupId>
          <artifactId>jersey-jrebel</artifactId>
          <version>${jersey-version}</version>
          <scope>test</scope>
          <exclusions>
            <exclusion>
              <groupId>com.sun.jersey</groupId>
              <artifactId>jersey-core</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
