<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>org.jboss.pnc.build-agent</groupId>
    <artifactId>parent</artifactId>
    <version>0.3</version>
  </parent>

  <artifactId>server</artifactId>
  <packaging>jar</packaging>

  <name>PNC Build Agent Server</name>
  <description>PNC Build Agent is used to expose shell like interface via Http and WebSockets of the host running the agent. It can be used to execute remote command and get the command output back via WebSocket, command completion is notified via WebSocket. It can also handle file uploads and downloads.</description>

  <dependencies>
    <dependency>
      <groupId>org.jboss.pnc.build-agent</groupId>
      <artifactId>api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.pnc.build-agent</groupId>
      <artifactId>common</artifactId>
    </dependency>

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

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>

    <dependency>
      <groupId>io.undertow</groupId>
      <artifactId>undertow-websockets-jsr</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.pnc.build-agent</groupId>
      <artifactId>client</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <archive>
              <index>true</index>
              <manifest>
                <mainClass>org.jboss.pnc.buildagent.server.Main</mainClass>
                <addDefaultSpecificationEntries>
                  true
                </addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>
                  true
                </addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-URL>${project.url}</Implementation-URL>
                <Java-Version>${java.version}</Java-Version>
                <Java-Vendor>${java.vendor}</Java-Vendor>
                <Os-Name>${os.name}</Os-Name>
                <Os-Arch>${os.arch}</Os-Arch>
                <Os-Version>${os.version}</Os-Version>
                <Scm-Url>${project.scm.url}</Scm-Url>
                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                <Scm-Revision>${buildNumber}</Scm-Revision>
                <Build-Timestamp>${datetime}</Build-Timestamp>
              </manifestEntries>
            </archive>
            <descriptorRefs>
              <descriptorRef>jar-with-dependencies</descriptorRef>
            </descriptorRefs>
          </configuration>
          <executions>
            <execution>
              <id>make-assembly</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
