<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jruby</groupId>
    <artifactId>jruby-artifacts</artifactId>
    <version>1.7.17</version>
  </parent>
  <artifactId>jruby</artifactId>
  <packaging>bundle</packaging>
  <name>JRuby Main Maven Artifact</name>
  <properties>
    <jruby.home>${basedir}/../..</jruby.home>
    <tesla.dump.readonly>true</tesla.dump.readonly>
    <main.basedir>${project.parent.parent.basedir}</main.basedir>
    <tesla.dump.pom>pom.xml</tesla.dump.pom>
    <tesla.version>0.1.1</tesla.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-stdlib</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Name>JRuby ${project.version}</Bundle-Name>
            <Bundle-Description>JRuby ${project.version} OSGi bundle</Bundle-Description>
            <Bundle-SymbolicName>org.jruby.jruby</Bundle-SymbolicName>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <configuration>
          <skipSource>true</skipSource>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <executions>
          <execution>
            <id>clean-extra-osgi-ITs</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/src/it</directory>
                  <includes>
                    <include>osgi*/**</include>
                  </includes>
                </fileset>
              </filesets>
              <failOnError>false</failOnError>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.tesla.polyglot</groupId>
        <artifactId>tesla-polyglot-maven-plugin</artifactId>
        <version>${tesla.version}</version>
        <executions>
          <execution>
            <id>setup other osgi frameworks</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <taskId>setup other osgi frameworks</taskId>
              <nativePom>pom.rb</nativePom>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>io.tesla.polyglot</groupId>
            <artifactId>tesla-polyglot-ruby</artifactId>
            <version>${tesla.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jdk8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <pomExcludes>
                <pomExclude>extended/pom.xml</pomExclude>
                <pomExclude>osgi_all_inclusive_felix-3.2/pom.xml</pomExclude>
                <pomExclude>${its.j2ee}</pomExclude>
                <pomExclude>${its.osgi}</pomExclude>
              </pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk6</id>
      <activation>
        <jdk>1.6</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <pomExcludes>
                <pomExclude>extended/pom.xml</pomExclude>
                <pomExclude>jetty/pom.xml</pomExclude>
                <pomExclude>j2ee_jetty/pom.xml</pomExclude>
                <pomExclude>j2ee_wildfly/pom.xml</pomExclude>
                <pomExclude>${its.j2ee}</pomExclude>
                <pomExclude>${its.osgi}</pomExclude>
              </pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>wlp</id>
      <activation>
        <property>
          <name>wlp.jar</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.tesla.polyglot</groupId>
            <artifactId>tesla-polyglot-maven-plugin</artifactId>
            <version>${tesla.version}</version>
            <executions>
              <execution>
                <id>install_wlp</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <taskId>install_wlp</taskId>
                  <nativePom>pom.rb</nativePom>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>io.tesla.polyglot</groupId>
                <artifactId>tesla-polyglot-ruby</artifactId>
                <version>${tesla.version}</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
