1<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3    <modelVersion>4.0.0</modelVersion>
4
5    <!-- Quickstart & Common Reference:
6
7     - run all tests (unit & int): mvn test
8     - run only unit tests: mvn test -Dunit
9     - compile and build: mvn package
10     - build and install into ~/.m2: mvn install
11     - skip tests on install or package add -Dmaven.test.skip
12     - stage & close (but not release) on maven central: mvn clean deploy
13       note that -SNAPSHOT is not allowed on deploy
14
15    -->
16
17    <groupId>com.couchbase.client</groupId>
18    <artifactId>java-client</artifactId>
19    <version>2.5.10-SNAPSHOT</version>
20    <packaging>jar</packaging>
21
22    <name>Couchbase Java SDK</name>
23    <description>The official Couchbase Java SDK</description>
24    <url>http://couchbase.com</url>
25
26    <properties>
27        <java-compat.version>1.6</java-compat.version>
28        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
29        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
30
31        <core.version>1.5.10-SNAPSHOT</core.version>
32        <junit.version>4.12</junit.version>
33        <mockito.version>1.10.19</mockito.version>
34        <slf4j.version>1.7.7</slf4j.version>
35        <log4j.version>1.2.17</log4j.version>
36        <commons-logging.version>1.1.3</commons-logging.version>
37        <assertj.version>1.7.1</assertj.version>
38        <guavatest.version>19.0</guavatest.version>
39        <core.apidocs>${project.build.directory}/coredocs</core.apidocs>
40        <couchbasemock.version>1.5.9</couchbasemock.version>
41    </properties>
42
43    <organization>
44        <name>Couchbase, Inc.</name>
45        <url>http://couchbase.com</url>
46    </organization>
47
48    <licenses>
49        <license>
50            <name>The Apache Software License, Version 2.0</name>
51            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
52            <distribution>repo</distribution>
53        </license>
54    </licenses>
55
56    <scm>
57        <url>https://github.com/couchbase/couchbase-java-client</url>
58        <connection>
59            scm:git:git://github.com/couchbase/couchbase-java-client
60        </connection>
61        <developerConnection>
62            scm:git:git://github.com/couchbase/couchbase-java-client
63        </developerConnection>
64    </scm>
65
66    <issueManagement>
67        <system>Couchbase JIRA</system>
68        <url>http://www.couchbase.com/issues/browse/JCBC</url>
69    </issueManagement>
70
71    <developers>
72        <developer>
73            <id>daschl</id>
74            <name>Michael Nitschinger</name>
75            <email>michael.nitschinger@couchbase.com</email>
76        </developer>
77        <developer>
78            <id>subalakr</id>
79            <name>Subhashni Balakrishnan</name>
80            <email>subhashni@couchbase.com</email>
81        </developer>
82        <developer>
83            <id>dnault</id>
84            <name>David Nault</name>
85            <email>david.nault@couchbase.com</email>
86        </developer>
87        <developer>
88            <id>avsej</id>
89            <name>Sergey Avseyev</name>
90            <email>sergey@couchbase.com</email>
91        </developer>
92    </developers>
93
94    <dependencies>
95        <!-- Exposed, Required Dependencies -->
96        <dependency>
97            <groupId>com.couchbase.client</groupId>
98            <artifactId>core-io</artifactId>
99            <version>${core.version}</version>
100        </dependency>
101
102        <!-- Exposed, Optional Dependencies -->
103        <dependency>
104            <groupId>org.slf4j</groupId>
105            <artifactId>slf4j-api</artifactId>
106            <version>${slf4j.version}</version>
107            <optional>true</optional>
108            <scope>provided</scope>
109        </dependency>
110        <dependency>
111            <groupId>commons-logging</groupId>
112            <artifactId>commons-logging</artifactId>
113            <version>${commons-logging.version}</version>
114            <optional>true</optional>
115            <scope>provided</scope>
116        </dependency>
117        <dependency>
118            <groupId>log4j</groupId>
119            <artifactId>log4j</artifactId>
120            <version>${log4j.version}</version>
121            <optional>true</optional>
122            <scope>provided</scope>
123        </dependency>
124
125        <!-- Test Dependencies -->
126        <dependency>
127            <groupId>junit</groupId>
128            <artifactId>junit</artifactId>
129            <version>${junit.version}</version>
130            <scope>test</scope>
131        </dependency>
132        <dependency>
133            <groupId>org.mockito</groupId>
134            <artifactId>mockito-all</artifactId>
135            <version>${mockito.version}</version>
136            <scope>test</scope>
137        </dependency>
138        <dependency>
139            <groupId>eu.codearte.catch-exception</groupId>
140            <artifactId>catch-exception</artifactId>
141            <version>1.4.4</version>
142            <scope>test</scope>
143        </dependency>
144        <dependency>
145            <groupId>org.assertj</groupId>
146            <artifactId>assertj-core</artifactId>
147            <version>${assertj.version}</version>
148            <scope>test</scope>
149        </dependency>
150        <dependency>
151            <groupId>com.google.guava</groupId>
152            <artifactId>guava-testlib</artifactId>
153            <version>${guavatest.version}</version>
154            <scope>test</scope>
155        </dependency>
156        <dependency>
157            <groupId>com.couchbase.mock</groupId>
158            <artifactId>CouchbaseMock</artifactId>
159            <version>${couchbasemock.version}</version>
160            <scope>test</scope>
161        </dependency>
162    </dependencies>
163
164    <build>
165        <plugins>
166
167            <plugin>
168                <groupId>org.apache.maven.plugins</groupId>
169                <artifactId>maven-source-plugin</artifactId>
170                <version>2.4</version>
171                <executions>
172                    <execution>
173                        <id>attach-sources</id>
174                        <goals>
175                            <goal>jar</goal>
176                        </goals>
177                    </execution>
178                </executions>
179            </plugin>
180
181            <plugin>
182                <groupId>org.apache.maven.plugins</groupId>
183                <artifactId>maven-dependency-plugin</artifactId>
184                <version>2.10</version>
185                <executions>
186                    <execution>
187                        <!-- this execution unpacks the core-io javadocs jar into
188                        the build directory for later reuse in offline linking of the
189                        java-client javadoc
190                        -->
191                        <id>unpack-core-docs</id>
192                        <phase>package</phase>
193                        <goals>
194                            <goal>unpack</goal>
195                        </goals>
196                        <configuration>
197                            <artifactItems>
198                                <artifactItem>
199                                    <groupId>com.couchbase.client</groupId>
200                                    <artifactId>core-io</artifactId>
201                                    <version>${core.version}</version>
202                                    <type>jar</type>
203                                    <classifier>javadoc</classifier>
204                                    <overWrite>true</overWrite>
205                                    <outputDirectory>${core.apidocs}</outputDirectory>
206                                </artifactItem>
207                            </artifactItems>
208                        </configuration>
209                    </execution>
210                </executions>
211            </plugin>
212
213            <plugin>
214                <groupId>org.apache.maven.plugins</groupId>
215                <artifactId>maven-javadoc-plugin</artifactId>
216                <version>2.10.3</version>
217                <executions>
218                    <execution>
219                        <id>attach-javadocs</id>
220                        <goals>
221                            <goal>jar</goal>
222                        </goals>
223                    </execution>
224                </executions>
225                <configuration>
226                    <links>
227                        <link>http://reactivex.io/RxJava/javadoc/</link>
228                    </links>
229                    <offlineLinks>
230                        <offlineLink>
231                            <!--link the core api docs in a offline manner since they won't have been published yet-->
232                            <url>http://docs.couchbase.com/sdk-api/couchbase-core-io-${core.version}/</url>
233                            <!--the javadoc build process will rely on the locally unpack core-io javadoc jar-->
234                            <location>${core.apidocs}/</location>
235                        </offlineLink>
236                    </offlineLinks>
237                    <doclet>ch.raffael.doclets.pegdown.PegdownDoclet</doclet>
238                    <docletArtifact>
239                        <groupId>ch.raffael.pegdown-doclet</groupId>
240                        <artifactId>pegdown-doclet</artifactId>
241                        <version>1.1</version>
242                    </docletArtifact>
243                    <useStandardDocletOptions>true</useStandardDocletOptions>
244                    <windowtitle>Couchbase Java SDK</windowtitle>
245                    <doctitle>Couchbase Java SDK (${project.version})</doctitle>
246                    <bottom><![CDATA[Copyright &copy; 2015 Couchbase, Inc.]]></bottom>
247                    <overview>docs/teaser.html</overview>
248                </configuration>
249            </plugin>
250
251            <plugin>
252                <groupId>org.apache.maven.plugins</groupId>
253                <artifactId>maven-compiler-plugin</artifactId>
254                <version>3.3</version>
255                <configuration>
256                    <source>${java-compat.version}</source>
257                    <target>${java-compat.version}</target>
258                </configuration>
259            </plugin>
260
261            <plugin>
262                <groupId>org.sonatype.plugins</groupId>
263                <artifactId>nexus-staging-maven-plugin</artifactId>
264                <version>1.6.3</version>
265                <extensions>true</extensions>
266                <configuration>
267                    <serverId>ossrh</serverId>
268                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
269                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
270                </configuration>
271            </plugin>
272
273            <plugin>
274                <groupId>org.codehaus.mojo</groupId>
275                <artifactId>build-helper-maven-plugin</artifactId>
276                <version>1.9.1</version>
277                <executions>
278                    <execution>
279                        <id>add-integration-test-source-as-test-sources</id>
280                        <phase>generate-test-sources</phase>
281                        <goals>
282                            <goal>add-test-source</goal>
283                        </goals>
284                        <configuration>
285                            <sources>
286                                <!-- add the following sources in addition to the unit tests -->
287                                <source>${test-source-directory}</source>
288                            </sources>
289                        </configuration>
290                    </execution>
291                </executions>
292            </plugin>
293
294            <plugin>
295                <groupId>pl.project13.maven</groupId>
296                <artifactId>git-commit-id-plugin</artifactId>
297                <version>2.2.0</version>
298                <executions>
299                    <execution>
300                        <goals>
301                            <goal>revision</goal>
302                        </goals>
303                    </execution>
304                </executions>
305            </plugin>
306
307            <plugin>
308                <groupId>org.codehaus.mojo</groupId>
309                <artifactId>animal-sniffer-maven-plugin</artifactId>
310                <version>1.14</version>
311                <configuration>
312                    <signature>
313                        <groupId>org.codehaus.mojo.signature</groupId>
314                        <artifactId>java16</artifactId>
315                        <version>1.0</version>
316                    </signature>
317                </configuration>
318                <executions>
319                    <execution>
320                        <id>ensure-java-1.6-class-library</id>
321                        <phase>compile</phase>
322                        <goals>
323                            <goal>check</goal>
324                        </goals>
325                    </execution>
326                </executions>
327            </plugin>
328        </plugins>
329
330        <resources>
331            <resource>
332                <directory>src/main/resources</directory>
333                <filtering>true</filtering>
334                <includes>
335                    <include>**/*</include>
336                </includes>
337            </resource>
338        </resources>
339    </build>
340
341    <distributionManagement>
342        <snapshotRepository>
343            <id>ossrh</id>
344            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
345        </snapshotRepository>
346        <repository>
347            <id>ossrh</id>
348            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
349        </repository>
350    </distributionManagement>
351
352    <profiles>
353        <profile>
354            <id>default</id>
355            <activation>
356                <activeByDefault>true</activeByDefault>
357            </activation>
358            <properties>
359                <!-- by default, add also the int tests -->
360                <test-source-directory>src/integration/java</test-source-directory>
361            </properties>
362        </profile>
363        <profile>
364            <id>unit</id>
365            <activation>
366                <property>
367                    <name>unit</name>
368                    <value>true</value>
369                </property>
370            </activation>
371            <properties>
372                <!-- just adding the unit tests again, noop. -->
373                <test-source-directory>src/test/java</test-source-directory>
374            </properties>
375        </profile>
376    </profiles>
377
378</project>
379