<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>
    <artifactId>alfresco-governance-services-community-rest-api-explorer</artifactId>
    <packaging>war</packaging>
    <name>Alfresco Governance Services Community REST API Explorer</name>

    <parent>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-governance-services-community-repo-parent</artifactId>
        <version>25.3.0.42</version>
    </parent>

    <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <failOnMissingWebXml>false</failOnMissingWebXml>
               <overlays>
                  <overlay>
                     <groupId>org.alfresco</groupId>
                     <artifactId>api-explorer</artifactId>
                     <excludes>
                        <exclude>definitions/*</exclude>
                     </excludes>
                  </overlay>
               </overlays>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>start-api-explorer</id>
         <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven3-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>run-war</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <container>
                            <containerId>tomcat9x</containerId>
                            <type>embedded</type>
                            <log>target/cargo.log</log>
                        </container>
                        <configuration>
                            <properties>
                                <cargo.servlet.port>8085</cargo.servlet.port>
                            </properties>
                        </configuration>
                        <deployables>
                            <deployable>
                                <type>war</type>
                                <properties>
                                    <context>/api-explorer</context>
                                </properties>
                                <pingURL>http://localhost:8085/api-explorer</pingURL>
                            </deployable>
                        </deployables>
                    </configuration>
                </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <dependencies>
      <dependency>
         <groupId>org.alfresco</groupId>
         <artifactId>api-explorer</artifactId>
         <version>${alfresco.api-explorer.version}</version>
         <type>war</type>
      </dependency>
   </dependencies>
</project>
