<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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>
  <parent>
    <groupId>org.kie.server</groupId>
    <artifactId>kie-server-controller</artifactId>
    <version>7.46.0-SNAPSHOT</version>
  </parent>
  <artifactId>kie-server-controller-standalone</artifactId>
  <packaging>pom</packaging>
  <name>KIE :: Execution Server :: Standalone Controller</name>
  <description>Standalone Controller WAR files</description>

  <properties>
    <java.module.name>org.kie.server.controller.standalone.wars</java.module.name>
    <org.kie.swagger.url>../rest/swagger.json</org.kie.swagger.url>
    <org.kie.swagger.title>Controller Documentation</org.kie.swagger.title>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-controller-standalone-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-controller-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-controller-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-controller-websocket</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server-controller-websocket-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-swagger-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>java-assist</groupId>
          <artifactId>java-assist</artifactId>
        </exclusion>
        <exclusion>
          <groupId>net.jcip</groupId>
          <artifactId>jcip-annotations</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.1_spec</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-jaxrs</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>jsr311-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-annotations</artifactId>
    </dependency>

  </dependencies>
  <build>
    <finalName>kie-server-controller-standalone-${project.version}</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <configuration>
            <container>
              <containerId>wildfly19x</containerId>
              <type>installed</type>
              <artifactInstaller>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-dist</artifactId>
                <version>${version.org.wildfly}</version>
              </artifactInstaller>
              <systemProperties>
                <conf.directory>${project.build.testOutputDirectory}</conf.directory>
                <tmp.directory>${project.build.directory}</tmp.directory>
                <!--<org.kie.server.controller.swagger.disabled>true</org.kie.server.controller.swagger.disabled>-->
              </systemProperties>
            </container>
            <deployables>
              <deployable>
                <groupId>org.kie.server</groupId>
                <artifactId>kie-server-controller-standalone</artifactId>
                <classifier>webc</classifier>
                <type>war</type>
                <location>${project.build.directory}/${project.build.finalName}-ee7.war</location>
                <properties>
                  <context>/controller</context>
                </properties>
                <pingURL>http://localhost:8080/controller/rest/controller</pingURL>
                <pingTimeout>60000</pingTimeout>
              </deployable>
            </deployables>
            <configuration>
              <users>
                <user>
                  <name>kieserver</name>
                  <password>kieserver</password>
                  <roles>
                    <role>kie-server</role>
                  </roles>
                </user>
              </users>
            </configuration>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/assembly-ee7-container.xml</descriptor>
            <descriptor>src/main/assembly/assembly-servlet-container.xml</descriptor>
          </descriptors>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>compile-sources</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
