<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2014 Rob Austin
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>

    <groupId>uk.co.boundedbuffer</groupId>
    <artifactId>low-latency-primitive-concurrent-queues</artifactId>
    <version>1.0.0</version>

    <packaging>jar</packaging>
    <name>Low Latency Primitive Concurrent Queues</name>

    <description>
        An low latency, lock free, primitive bounded blocking queue backed by an int[].
        This class mimics the interface of {@linkplain java.util.concurrent.BlockingQueue BlockingQueue},
        however works with primitive ints rather than objects, so is unable to actually implement the
        BlockingQueue.

        This class takes advantage of the Unsafe.putOrderedObject, which allows us to create non-blocking code with
        guaranteed writes.
        These writes will not be re-orderd by instruction reordering. Under the covers it uses the faster store-store
        barrier, rather than the the slower store-load barrier, which is used when doing a volatile write.
        One of the trade off with this improved performance is we are limited to a single producer, single consumer.
    </description>


    <scm>
        <connection>scm:git:git@github.com:BoundedBuffer/low-latency-primitive-concurrent-queues</connection>
        <developerConnection>scm:git:git@github.com:BoundedBuffer/low-latency-primitive-concurrent-queues
        </developerConnection>
        <url>git@github.com:BoundedBuffer/low-latency-primitive-concurrent-queues</url>
        <tag>low-latency-primitive-concurrent-queues-1.0.0</tag>
    </scm>


    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>com.sun.japex</groupId>
            <artifactId>japex-maven-plugin</artifactId>
            <version>1.2.4</version>
        </dependency>

        <dependency>
            <groupId>com.sun.japex</groupId>
            <artifactId>japex</artifactId>
            <version>1.2.4</version>
            <scope>test</scope>
        </dependency>


    </dependencies>

    <url>http://www.boundedbuffer.co.uk</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Rob Austin</name>
            <email>rob.austin@boundedbuffer.com</email>
        </developer>
    </developers>


    <build>

        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>com.sun.japex</groupId>
                    <artifactId>japex-maven-plugin</artifactId>
                    <version>1.2-SNAPSHOT</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.4</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9.1</version>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-publish-plugin</artifactId>
                    <version>1.0-beta-2</version>
                </plugin>
            </plugins>
        </pluginManagement>


        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <aggregate>true</aggregate>
                    <show>public</show>
                    <includeDependencySources>false</includeDependencySources>
                    <nohelp>true</nohelp>
                    <header>uk.co.boundedbuffer.ConcurrentBlockingIntQueue, ${project.version}</header>
                    <footer>uk.co.boundedbuffer.ConcurrentBlockingIntQueue, ${project.version}</footer>
                    <doctitle>uk.co.boundedbuffer.ConcurrentBlockingIntQueue, ${project.version}</doctitle>
                    <links>
                        <link>http://static.springsource.org/spring/docs/3.0.x/javadoc-api/</link>
                    </links>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <configuration>
                    <checkoutDirectory>${project.build.directory}/scmpublish/javadoc</checkoutDirectory>
                    <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
                    <content>${project.reporting.outputDirectory}</content>
                    <skipDeletedFiles>true</skipDeletedFiles>
                    <pubScmUrl>scm:git:git@github.com:BoundedBuffer/low-latency-primitive-concurrent-queues
                    </pubScmUrl>
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>

                <groupId>com.sun.japex</groupId>
                <artifactId>japex-maven-plugin</artifactId>
                <version>1.2.4</version>
                <executions>
                    <execution>
                        <id>japex</id>
                        <goals>
                            <goal>japex</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <japexConfig>
                        <testSuite xmlns="http://www.sun.com/japex/testSuite" name="ParsingPerformance">
                            <param name="japex.namedClassPath" value="maven.test.classpath" />
                            <param name="japex.resultUnit" value="ms" />
                            <param name="japex.warmupIterations" value="0" />
                            <param name="japex.runIterations" value="1000" />
                            <param name="japex.numberOfThreads" value="4" />
                            <param name="japex.chartType" value="linechart" />
                            <param name="japex.numberOfCpus" value="4" />
                            <param name="japex.resultUnit" value="ms" />

                            <driver name="ConcurrentBlockingIntQueue">
                                <param name="japex.driverClass" value="uk.co.boundedbuffer.ConcurrentBlockingIntQueueJapexDriver" />
                                <param name="description" value="Memory usage sample class" />

                            </driver>
                            <driver name="ArrayBlockingQueue">
                                <param name="japex.driverClass" value="uk.co.boundedbuffer.ArrayBlockingQueueJapexDriver" />
                                <param name="description" value="Array Blocking Queue" />

                            </driver>
                            <testCase name="test1" />

                        </testSuite>
                    </japexConfig>
                </configuration>
            </plugin>
        </plugins>

    </build>
</project>