<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>
  <groupId>org.opendaylight.snmp4sdn</groupId>
  <artifactId>commons.snmp4sdn</artifactId>
  <version>0.5.4-Carbon</version>
  <packaging>pom</packaging>
  <parent>
    <groupId>org.opendaylight.snmp4sdn</groupId>
    <artifactId>commons.parent</artifactId>
    <version>0.5.4-Carbon</version>
    <relativePath>../parent</relativePath>
  </parent>

  <name>Common POM</name>
  <description>POM for common settings</description>
  <url>https://wiki.opendaylight.org/view/SNMP4SDN:Main</url>

  <licenses>
    <license>
      <name>Eclipse Public License v1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Yi-Ling Hsieh</name>
      <email>ylhsieh@itri.org.tw</email>
      <organization>Industrial Technology Research Institute of Taiwan</organization>
      <organizationUrl>https://www.itri.org.tw</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://git.opendaylight.org/nmp4sdn.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/snmp4sdn.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://git.opendaylight.org/gerrit/gitweb?p=snmp4sdn.git;a=summary</url>
  </scm>

  <properties>
    <propertymavenplugin.version>1.0-alpha-2</propertymavenplugin.version>
    <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
    <sitedeploy>dav:https://nexus.opendaylight.org/content/sites/site</sitedeploy>
    <siteplugin>3.2</siteplugin>
    <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
    <jackson.version>2.3.0</jackson.version>
    <testvm.argLine>-Xmx1024m -XX:MaxPermSize=256m</testvm.argLine>
    <releaseplugin.version>2.3.2</releaseplugin.version>

    <ietf-inet-types.version>2010.09.24.3</ietf-inet-types.version>
    <sal.version>0.12.4-Carbon</sal.version>
    <mdsal.version>1.5.4-Carbon</mdsal.version>
    <nsf.version>0.8.4-Carbon</nsf.version>
    <yangtools.version>1.1.4-Carbon</yangtools.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.dependencymanager</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.dependencymanager.shell</artifactId>
        <version>3.0.1</version>
      </dependency>

      <!--copy from expect4j's pom-->
      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.oro</artifactId>
        <version>2.0.8_6</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch</artifactId>
        <version>0.1.50</version>
      </dependency>
      <dependency>
        <groupId>commons-net</groupId>
        <artifactId>commons-net</artifactId>
        <version>3.3</version>
      </dependency>
      <dependency>
        <groupId>net.sourceforge.tcljava</groupId>
        <artifactId>com.springsource.tcl.lang.jacl</artifactId>
        <version>1.4.1</version>
      </dependency>
      <dependency>
        <!--In features4-snmp4sdn build, SingleFeatureTest fails and warn that another org.eclipse.osgi is used,
            the following are versions of org.eclipse.osgi I tried, but the warning still appear-->
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>org.eclipse.osgi</artifactId>
        <version>3.10.101.v20150820-1432</version><!--the parent pom had assigned version as 3.9.xxx, but here 3.10.xxx is used since the warning message said so-->
        <!--<groupId>org.eclipse</groupId>
        <artifactId>org.eclipse.osgi</artifactId>
        <version>3.8.2.v20130124-134944</version>-->
        <!--<groupId>org.osgi</groupId>
        <artifactId>org.eclipse.osgi</artifactId>
        <version>3.10.100.v20150529-1857</version>-->
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>notduringrelease</id>
      <activation>
        <property>
          <name>!DOINGRELEASE</name>
        </property>
      </activation>
      <dependencies>
        <!-- yangtools -->
        <!--
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-binding</artifactId>
          <version>${yang.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-common</artifactId>
          <version>${yang.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-data-api</artifactId>
          <version>${yang.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-model-api</artifactId>
          <version>${yang.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-data-util</artifactId>
          <version>${yang.version}</version>
        </dependency>
        -->
        <!-- Models -->
        <!--
        <dependency>
          <groupId>org.opendaylight.yangtools.model</groupId>
          <artifactId>ietf-inet-types-2013-07-15</artifactId>
          <version>${ietf-inet-types.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools.model</groupId>
          <artifactId>ietf-yang-types-20130715</artifactId>
          <version>${ietf-yang-types.version}</version>
        </dependency>
        <dependency>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-ext</artifactId>
          <version>${yang-ext.version}</version>
        </dependency>
        -->
        <!-- Other MDSAL dependencies -->

        <dependency>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </dependency>
        <dependency>
          <groupId>org.javassist</groupId>
          <artifactId>javassist</artifactId>
        </dependency>
      </dependencies>
      <properties>
        <build.suffix>${project.version}</build.suffix>
      </properties>
    </profile>
    <profile>
      <id>viewbuild</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <build.suffix>${project.version}</build.suffix>
      </properties>
    </profile>
    <profile>
      <id>jenkins</id>
      <activation>
        <property>
          <name>BUILDSUFFIX</name>
        </property>
      </activation>
      <properties>
        <build.suffix>${BUILDSUFFIX}</build.suffix>
      </properties>
    </profile>
    <profile>
      <id>fastreassembly</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>copyfastreassembly</id>
                <phase>install</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>${project.groupId}</groupId>
                      <artifactId>${project.artifactId}</artifactId>
                      <version>${project.version}</version>
                      <destFileName>${project.groupId}.${project.artifactId}-${project.version}.jar</destFileName>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${fastreassembly.directory}</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <!-- OpenDayLight Released artifact -->
    <repository>
      <id>opendaylight-release</id>
      <url>${nexusproxy}/repositories/opendaylight.release/</url>
    </repository>
    <!-- OpenDayLight Snapshot artifact -->
    <snapshotRepository>
      <id>opendaylight-snapshot</id>
      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
    </snapshotRepository>
    <!-- Site deployment -->
    <site>
      <id>website</id>
      <url>${sitedeploy}</url>
    </site>
  </distributionManagement>

  <reporting>
    <excludeDefaults>true</excludeDefaults>
    <outputDirectory>${project.build.directory}/site</outputDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${projectinfo}</version>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>project-team</report>
              <report>license</report>
              <report>mailing-list</report>
              <report>plugin-management</report>
              <report>cim</report>
              <report>issue-tracking</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <aggregate>true</aggregate>
          <linkJavadoc>true</linkJavadoc>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <doclet>org.jboss.apiviz.APIviz</doclet>
          <docletArtifact>
            <groupId>org.jboss.apiviz</groupId>
            <artifactId>apiviz</artifactId>
            <version>1.3.2.GA</version>
          </docletArtifact>
          <finalName>${project.artifactId}-${build.suffix}</finalName>
          <useStandardDocletOptions>true</useStandardDocletOptions>
          <charset>UTF-8</charset>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <breakiterator>true</breakiterator>
          <version>true</version>
          <author>true</author>
          <keywords>true</keywords>
          <excludePackageNames>*.internal:edu.uci.*</excludePackageNames>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>${propertymavenplugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>set-system-properties</goal>
            </goals>
            <configuration>
              <properties>
                <property>
                  <name>logback.configurationFile</name>
                  <value>${project.parent.basedir}/logback.xml</value>
                </property>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
        <artifactId>maven-java-formatter-plugin</artifactId>
        <version>0.3.1</version>
        <configuration>
          <compilerSource>1.6</compilerSource>
          <compilerCompliance>1.6</compilerCompliance>
          <compilerTargetPlatform>1.6</compilerTargetPlatform>
          <configFile>${project.parent.basedir}/sun_coding_style.xml</configFile>
        </configuration>
      </plugin>
      <!-- s4s: not yet know how to proceed, if here allows commons.checkstyle -->
      <!--
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.opendaylight.snmp4sdn</groupId>
              <artifactId>commons.checkstyle</artifactId>
              <version>0.5.4-Carbon</version>//TODO: version need to up to date
            </dependency>
          </dependencies>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failsOnError>true</failsOnError>
          <configLocation>snmp4sdn/space_and_tabs_checks.xml</configLocation>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <sourceDirectory>${project.basedir}</sourceDirectory>
          <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
          <excludes>target\/</excludes>
        </configuration>
      </plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${failsafe.version}</version>
        <configuration>
          <argLine>${testvm.argLine}</argLine>
        </configuration>
        <executions>
          <execution>
            <id>failsafe-integration-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>failsafe-verify</id>
            <phase>verify</phase>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <!--<version>${surefire.version}</version>--><!--removed in ODL gerrit #15339-->
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${releaseplugin.version}</version>
        </plugin>
        <!-- Ignore/Execute plugin execution -->
        <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>properties-maven-plugin</artifactId>
                    <versionRange>[0.0,)</versionRange>
                    <goals>
                      <goal>set-system-properties</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.enunciate</groupId>
                    <artifactId>maven-enunciate-plugin</artifactId>
                    <versionRange>[0.0,)</versionRange>
                    <goals>
                      <goal>docs</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <versionRange>${jacoco.version}</versionRange>
                    <goals>
                      <goal>prepare-agent</goal>
                      <goal>pre-test</goal>
                      <goal>post-test</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.ops4j.pax.exam</groupId>
                    <artifactId>maven-paxexam-plugin</artifactId>
                    <versionRange>[1.2.4,)</versionRange>
                    <goals>
                      <goal>generate-depends-file</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <!--<pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <versionRange>[2.0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>-->
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.enunciate</groupId>
          <artifactId>maven-enunciate-plugin</artifactId>
          <version>${enunciate.version}</version>
          <configuration>
            <configFile>enunciate.xml</configFile>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>docs</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8.1</version>
          <configuration>
            <doclet>org.jboss.apiviz.APIviz</doclet>
            <docletArtifact>
              <groupId>org.jboss.apiviz</groupId>
              <artifactId>apiviz</artifactId>
              <version>1.3.2.GA</version>
            </docletArtifact>
            <finalName>${project.artifactId}-${build.suffix}</finalName>
            <useStandardDocletOptions>true</useStandardDocletOptions>
            <charset>UTF-8</charset>
            <encoding>UTF-8</encoding>
            <docencoding>UTF-8</docencoding>
            <breakiterator>true</breakiterator>
            <version>true</version>
            <author>true</author>
            <keywords>true</keywords>
            <excludePackageNames>net.sf.jnetlib.*:cern.*:corejava:*.internal:edu.uci.*</excludePackageNames>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <aggregate>true</aggregate>
            <linkJavadoc>true</linkJavadoc>
            <javadocDir>target/apidocs</javadocDir>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
