<?xml version="1.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/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.opennms</groupId>
    <artifactId>opennms-integrations</artifactId>
    <version>14.0.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>opennms-link-provisioning-adapter</artifactId>
  <name>OpenNMS Integrations Link Provisioning Adaptor</name>
  <packaging>bundle</packaging>
  <build>
   <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>test-compile</phase>
            <goals><goal>copy</goal></goals>
          </execution>
        </executions>
        <configuration>
          <artifactItems>
            <artifactItem>
              <groupId>org.opennms.dependencies</groupId>
              <artifactId>jaxb-dependencies</artifactId>
              <type>pom</type>
              <overWrite>false</overWrite>
              <outputDirectory>${basedir}/target/endorsed</outputDirectory>
            </artifactItem>
          </artifactItems>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Xmx1g -Djava.endorsed.dirs=${basedir}/target/endorsed</argLine>
          <systemProperties>
            <property>
              <name>java.endorsed.dirs</name>
              <value>${basedir}/target/endorsed</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
<!--
      <plugin>
        <groupId>com.sun.tools.jxc.maven2</groupId>
        <artifactId>maven-jaxb-schemagen-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <destdir>${project.build.directory}/xsds</destdir>
          <srcdir>${basedir}/src/main/java</srcdir>
          <verbose>false</verbose>
          <includes>
            <include>org/opennms/netmgt/provision/config/linkadapter/*.java</include>
            <include>org/opennms/netmgt/provision/adapters/link/endpoint/*.java</include>
          </includes>
          <schemas>
            <schema>
              <namespace>http://xmlns.opennms.org/xsd/config/map-link-adapter</namespace>
              <file>map-link-adapter.xsd</file>
            </schema>
            <schema>
              <namespace>http://xmlns.opennms.org/xsd/config/endpoint-types</namespace>
              <file>endpoint-types</file>
            </schema>
          </schemas>
        </configuration>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
-->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/xsds.xml</descriptor>
            <descriptor>src/assembly/etc.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.opennms.features.poller</groupId>
      <artifactId>org.opennms.features.poller.api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-provision-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-detector-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
    </dependency>
    <!-- 
      We have to use a different version of the JAXB implementation
      here because the NamespacePrefixMapper class isn't accessible
      from the JAXB implementation inside the Java6 JVM.
    -->
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>jaxb-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>spring-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <!-- test dependencies -->
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao-mock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.daemon</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.db</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.http</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.services</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.snmp</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-jrobin</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.tests</groupId>
      <artifactId>org.opennms.tests.mock-elements</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>snmp-test-dependencies</artifactId>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
