<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<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>com.xwiki.parent</groupId>
    <artifactId>xwikisas-parent-platform</artifactId>
    <version>15.10</version>
  </parent>
  <groupId>com.xwiki.office365</groupId>
  <artifactId>application-office365</artifactId>
  <version>1.13</version>
  <packaging>xar</packaging>
  <name>Office365 Integration</name>
  <description>Search OneDrive documents directly from XWiki. Embed Office 365 documents into XWiki pages using their URL. The app can be purchased individually or part of the XWiki Pro package. Try it free.</description>
  <properties>
    <licensing.version>1.32.3</licensing.version>
    <!-- The list of documents that have an implicit unlimited free license. The users can view these documents without
      buying a license or getting a trial license, but they cannot edit or delete them. -->
    <xwiki.extension.licensing.publicDocuments>
      Office365.WebHome
    </xwiki.extension.licensing.publicDocuments>
    <xwiki.extension.licensing.excludedDocuments>
      Office365.Office365Config
    </xwiki.extension.licensing.excludedDocuments>
    <!-- Name to display by the Extension Manager -->
    <xwiki.extension.name>Office365 Integration (Pro)</xwiki.extension.name>
    <!-- Don't run CLIRR here since there's no Java code. -->
    <xwiki.clirr.skip>true</xwiki.clirr.skip>
    <xwiki.revapi.skip>true</xwiki.revapi.skip>
    <xwiki.extension.category>application</xwiki.extension.category>
    <!-- Components -->
    <xwiki.extension.components>
      org.xwiki.rendering.macro.Macro/office365
    </xwiki.extension.components>
  </properties>
  <dependencyManagement>
    <dependencies>
      <!-- Because adal4j is an archived repo, as part of https://github.com/xwikisas/application-office365/issues/26
      we need to move away from it. Until then, some exclusions are added in order to override old dependencies versions
      that are brought by it or by transitive dependencies. A comment is added for each dependency that should be
      removed when this migration is done. -->
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>adal4j</artifactId>
        <version>1.6.7</version>
        <exclusions>
          <!-- Exclude json-smart because the declared range is lower than the managed one in some cases. See
            https://github.com/xwikisas/application-office365/issues/25. -->
          <exclusion>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>net.minidev</groupId>
        <artifactId>json-smart</artifactId>
        <version>2.4.11</version>
        <exclusions>
          <exclusion>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.xwiki.licensing</groupId>
      <artifactId>application-licensing-licensor-api</artifactId>
      <version>${licensing.version}</version>
    </dependency>
    <!-- This should be removed once #26 is fixed. -->
    <dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>adal4j</artifactId>
    </dependency>
    <!-- This should be removed once #26 is fixed. -->
    <dependency>
      <groupId>net.minidev</groupId>
      <artifactId>json-smart</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xwiki.contrib.showhide</groupId>
      <artifactId>showhide-macro</artifactId>
      <type>xar</type>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>com.xwiki.pdfviewer</groupId>
      <artifactId>macro-pdfviewer-ui</artifactId>
      <type>xar</type>
      <version>2.7.2</version>
    </dependency>
  </dependencies>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/xwikisas/application-office365/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git://github.com/xwikisas/application-office365.git</connection>
    <developerConnection>scm:git:git@github.com:xwikisas/application-office365.git</developerConnection>
    <url>https://github.com/xwikisas/application-office365/tree/master</url>
    <tag>application-office365-1.13</tag>
  </scm>
  <!-- Even though this repository is already declared in the parent POM, we still explicitly redeclare it for
       convenience. This makes it simpler to build this project without having to declare this repository in one's own
       Maven settings.xml file. In the future We may decide to remove this in the future and make it a rule to have the
       XWiki SAS Nexus repository in one's settings.xml -->
  <repositories>
    <repository>
      <id>public-store-releases</id>
      <name>XWiki SAS Public Store Repository for Releases</name>
      <url>https://nexus.xwiki.com/nexus/content/repositories/public-store-releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <build>
    <plugins>
      <plugin>
        <groupId>org.xwiki.commons</groupId>
        <artifactId>xwiki-commons-tool-xar-plugin</artifactId>
        <configuration>
          <visibleTechnicalPages>
            <visibleTechnicalPage>.*/Office365/WebHome\.xml</visibleTechnicalPage>
            <visibleTechnicalPage>.*/Office365/SitesList\.xml</visibleTechnicalPage>
          </visibleTechnicalPages>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
