<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.solacesystems</groupId>
        <artifactId>solsuite</artifactId>
        <version>10.0.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>com.solacesystems</groupId>
    <artifactId>sol-jcsmp</artifactId>
    <packaging>jar</packaging>
    <name>Solace Messaging APIs for Java</name>
    <description>Solace Messaging APIs for Java</description>

    <url>http://dev.solace.com/tech/java-api/</url>

    <dependencies>
        <dependency>
            <groupId>com.solacesystems</groupId>
            <artifactId>sol-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.solacesystems</groupId>
            <artifactId>socketjni</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
            <resource>
                <directory>${basedir}/..</directory>
                <includes>
                    <include>README.txt</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>../sol-common/src/main/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>README.txt</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestSections>
                            <manifestSection>
                                <name>com/solacesystems/jcsmp</name>
                                <manifestEntries>
                                    <Specification-Title>Solace Corporation Messaging API for Java</Specification-Title>
                                    <Specification-Version>${project.version}</Specification-Version>
                                    <Specification-Vendor>Solace Corporation</Specification-Vendor>
                                    <Implementation-Title>com.solacesystems.jcsmp</Implementation-Title>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                    <Implementation-Vendor>Solace Corporation</Implementation-Vendor>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                    <excludes>
                        <exclude>README.txt</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <niceManifest>true</niceManifest>
                    <instructions>
                        <Export-Package>
                            com.solacesystems.common.config;version="${project.version}",
                            com.solacesystems.jcsmp;version="${project.version}",
                            com.solacesystems.jcsmp.statistics;version="${project.version}",
                            com.solacesystems.jcsmp.transaction;version="${project.version}"
                        </Export-Package>
                        <Import-Package>
                            !javax.transaction.xa,
                            !com.solacesystems.common.config;version="${project.version}",
                            !com.solacesystems.jcsmp;version="${project.version}",
                            !com.solacesystems.jcsmp.statistics;version="${project.version}",
                            !com.solacesystems.jcsmp.transaction;version="${project.version}",*
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <jvm>${test.jvm}</jvm>
                    <forkMode>once</forkMode>
                    <argLine>-Xmx1536m -Xdebug -agentlib:jdwp=transport=dt_socket,address=8997,server=y,suspend=n -Djava.security.auth.login.config=${basedir}/src/test/resources/config/jaas.conf</argLine>
                    <includes>
                        <include>**/JCSMPSolCacheTests.java</include>
                        <include>**/JCSMPClientModeUnitTest.java</include>
                        <include>**/JCSMPClientModeUnitTestAd.java</include>
                    </includes>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <encoding>cp1252</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>test-compile</phase>
                        <configuration>
                            <testExcludes>
                                <exclude>**/tests/**/*.java</exclude>
                            </testExcludes>
                        </configuration> 
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>                  
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <sourceFileIncludes>
                        <include>com/solacesystems/jcsmp/*.java</include>
                        <include>com/solacesystems/jcsmp/statistics/*.java</include>
                        <include>com/solacesystems/jcsmp/transaction/*.java</include>
                        <include>com/solacesystems/common/config/*.java</include>
                    </sourceFileIncludes>
                    <sourceFileExcludes>
                        <exclude>com/solacesystems/jcsmp/JCSMPInternalProperties.java</exclude>
                        <exclude>com/solacesystems/jcsmp/Pair.java</exclude>
                    </sourceFileExcludes>
                    <sourcepath>${basedir}/src/main/java;${basedir}/src/main/java-templates;${basedir}/../sol-common/src/main/java</sourcepath>
                    <aggregate>false</aggregate>
                    <encoding>cp1252</encoding>
                    <bottom><![CDATA[<i>Copyright 2004-2017 Solace Corporation. All rights reserved.</i>]]></bottom>
                    <author>false</author>
                    <version>true</version>
                    <use>true</use>
                    <windowtitle>Solace Messaging APIs for Java v${project.version}</windowtitle>
                    <doctitle><![CDATA[<h1>Solace Messaging APIs for Java</h1>]]></doctitle>
                    <show>public</show>
                    <doclet>com.solacesystems.buildtools.doclet.SolaceDoclet</doclet>
                    <docletArtifacts>
                        <docletArtifact>
                            <groupId>com.solacesystems</groupId>
                            <artifactId>sol-build-tools</artifactId>
                            <version>1.0</version>
                        </docletArtifact>
                    </docletArtifacts>
                    <links>
                        <link>http://docs.oracle.com/javase/1.5.0/docs/api</link>
                    </links>
                    <groups>
                        <group>
                            <title>Solace Messaging APIs for Java</title>
                            <packages>com.solacesystems.jcsmp*</packages>
                        </group>
                        <group>
                            <title>Utilities for Solace Messaging APIs for Java</title>
                            <packages>com.solacesystems.common*</packages>
                        </group>
                    </groups>
                </configuration>
                <executions>
                      <execution>
                        <id>internal</id>
                        <phase>package</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>${project.reporting.outputDirectory}/internal</reportOutputDirectory>
                            <destDir>apidocs</destDir>
                            <additionalparam>-includeSolReserved</additionalparam>
                        </configuration>
                      </execution>
                      <execution>
                        <id>external</id>
                        <phase>package</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>${project.reporting.outputDirectory}/external</reportOutputDirectory>
                            <destDir>apidocs</destDir>
                            <additionalparam>-nohelp</additionalparam>
                        </configuration>
                      </execution>
                      <execution>
                        <id>javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                      </execution>
                </executions>               
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assembly</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <descriptors>
                                <descriptor>internal.xml</descriptor>
                                <descriptor>release.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>templating-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>bundleBaseline</id>
            <activation>
                <property>
                    <name>bundleCheck</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>biz.aQute.bnd</groupId>
                        <artifactId>bnd-baseline-maven-plugin</artifactId>
                        <configuration>
                            <base>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <version>${bundle.base.version}</version>
                            </base>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
</project>
