summaryrefslogtreecommitdiffstats
path: root/pom.xml
blob: 1e0ed7aed789fad850acc905e8c97b390519a872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<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>org.openecomp.sdc.sdc-titan-cassandra</groupId>
    <artifactId>sdc-titan-cassandra</artifactId>
    <version>1.0.0</version>


    <name>Titan-Cassandra: Distributed Graph Database</name>
    <url>http://thinkaurelius.github.com/titan/</url>
    <properties>
        <astyanax.version>3.8.0</astyanax.version>
        <jamm.group>com.github.jbellis</jamm.group>
        <jamm.version>0.3.0</jamm.version>
        <test.extra.jvm.opts>-javaagent:${basedir}/target/jamm-${jamm.version}.jar</test.extra.jvm.opts>
        <default.test.jvm.opts>-Xms1024m -Xmx2048m -ea -XX:+HeapDumpOnOutOfMemoryError ${test.extra.jvm.opts}</default.test.jvm.opts>
        <jna.version>4.0.0</jna.version>
        <test.excluded.groups>com.thinkaurelius.titan.testcategory.MemoryTests,com.thinkaurelius.titan.testcategory.PerformanceTests,com.thinkaurelius.titan.testcategory.BrittleTests</test.excluded.groups>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.source>1.8</compiler.source>
        <compiler.target>1.8</compiler.target>

        <sitePath>/content/sites/site/org/openecomp/sdc/sdc-titan-cassandra/${project.version}</sitePath>
        <nexusServer>https://nexus.onap.org</nexusServer>
        <nexus.release.repository>releases</nexus.release.repository>
        <nexus.snapshot.repository>snapshots</nexus.snapshot.repository>
        <nexus.id.release>ecomp-releases</nexus.id.release>
        <nexus.id.snapshot>ecomp-snapshots</nexus.id.snapshot>

        <!--tests-->
        <test.skip.ordered>true</test.skip.ordered>
        <test.skip.unordered>true</test.skip.unordered>
        <test.skip.ssl>true</test.skip.ssl>
        <test.skip.serial>true</test.skip.serial>

    </properties>
    <!-- Libraries -->
    
    <dependencies>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-core</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-test</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.codahale.metrics</groupId>
            <artifactId>metrics-core</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.carrotsearch</groupId>
            <artifactId>junit-benchmarks</artifactId>
            <version>0.7.0</version>
        </dependency>
        <!-- Logging backends.
             Cassandra 2.1+ moved to Logback.  Titan is logging-backend-agnostic,
             but still uses Log4j in testing.  The slf4j binding for logback is,
             inconveniently, packed into the logback-classic artifact.  This means
             the binding can't easily be removed from the classpath without losing
             logback-classic or inserting some hack to mess with the jar contents.
             We can't lose logback-classic because StorageProxy contains hardcoded
             references to some of its classes (it contains some methods to change
             logback loglevels at runtime).  Hence, to stick with Log4j, the
             least-worst approach is to enforce a classpath ordering constraint: as
             long as the slf4j-log4j12 binding appears on the classpath before
             logback-classic, log4j will be used instead of logback.  I don't have
             any special love for log4j, but Titan should use a single logging
             backend throughout all its tests.   I don't want to maintain a mixture
             of logback.xml and log4j.properties files scattered randomly through
             the titan-* submodules.  Maven populates the classpath elements for
             tests in pom appearance order.  That's why these dependencies are 
             explicitly declared below: to make slf4j-log4j12 preced logback-classic
             on the test classpath. -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.2</version>
        </dependency>
        <!-- End logging backends. -->
        <dependency>
            <groupId>com.carrotsearch.randomizedtesting</groupId>
            <artifactId>randomizedtesting-runner</artifactId>
            <version>2.0.8</version>
        </dependency>
        <!--
            JNA is not required to run Cassandra, but it improves
            efficiency of certain of Cassandra's filesystem and memory
            operations.  DataStax describes JNA as "required for
            production installations":

            http://www.datastax.com/docs/1.2/install/install_jre
        -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>${jna.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.cassandra</groupId>
            <artifactId>cassandra-all</artifactId>
            <version>2.1.9</version>
            <!-- The version is controlled in <dependencyManagement> in the parent pom -->
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>com.netflix.astyanax</groupId>
            <artifactId>astyanax-core</artifactId>
            <version>${astyanax.version}</version>
        </dependency>
        <dependency>
            <groupId>com.netflix.astyanax</groupId>
            <artifactId>astyanax-thrift</artifactId>
            <version>${astyanax.version}</version>
        </dependency>
        <dependency>
            <groupId>com.netflix.astyanax</groupId>
            <artifactId>astyanax-cassandra</artifactId>
            <version>${astyanax.version}</version>
        </dependency>
        <dependency>
             <groupId>com.netflix.astyanax</groupId>
             <artifactId>astyanax-recipes</artifactId>
             <version>${astyanax.version}</version>
        </dependency>
        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>1.0.5-M3</version>
        </dependency>
    </dependencies>

    <build>
    
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>filter-cassandra-bop-config</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/cassandra/conf/localhost-bop</outputDirectory>
                            <filters>
                                <filter>${basedir}/config/cassandra-filters/localhost-bop.properties</filter>
                            </filters>
                            <resources>
                                <resource>
                                    <directory>${basedir}/config/cassandra</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>filter-cassandra-murmur-config</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/cassandra/conf/localhost-murmur</outputDirectory>
                            <filters>
                                <filter>${basedir}/config/cassandra-filters/localhost-murmur.properties</filter>
                            </filters>
                            <resources>
                                <resource>
                                    <directory>${basedir}/config/cassandra</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>filter-cassandra-murmur-ssl-config</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/cassandra/conf/localhost-murmur-ssl</outputDirectory>
                            <filters>
                                <filter>${basedir}/config/cassandra-filters/localhost-murmur-ssl.properties</filter>
                            </filters>
                            <resources>
                                <resource>
                                    <directory>${basedir}/config/cassandra</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Need this to avoid corrupting the test keystore with nonsensical macro replacements -->
                        <id>filter-cassandra-murmur-ssl-config-static</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/cassandra/conf/localhost-murmur-ssl</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/config/static</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
                <executions>
                    <execution>
                        <!-- Run by "mvn test" -->
                        <id>default-test</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <!-- Run by "mvn org.apache.maven.plugins:maven-surefire-plugin:test"
                
                            Sonar does this when running JaCoCo and
                            provides no configuration option to
                            change its behavior. Define a safe
                            configuration for JaCoCo to use when run
                            by Sonar. This doesn't have to be fast,
                            since it's only used for dynamic
                            analysis, but it does have to cover all
                            the tests.
                        -->
                        <id>default-cli</id>
                        <phase>none</phase>
                        <configuration>
                            <includes>
                                <include>Nope.java</include>
                            </includes>
                            <exclude>
                                <exclude>**/*</exclude>
                            </exclude>
                            <parallel />
                            <reuseForks>false</reuseForks>
                            <threadCount>1</threadCount>
                            <perCoreThreadCount>false</perCoreThreadCount>
                            <runOrder>random</runOrder>
                        </configuration>
                    </execution>
                    <execution>
                        <id>bop-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <argLine>${default.test.jvm.opts} -Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-bop -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-bop</argLine>
                            <excludedGroups>${test.excluded.groups},com.thinkaurelius.titan.testcategory.UnorderedKeyStoreTests,com.thinkaurelius.titan.testcategory.SerialTests,com.thinkaurelius.titan.testcategory.CassandraSSLTests</excludedGroups>
                            <groups />
                            <forkCount>1</forkCount>
                            <reuseForks>false</reuseForks>
                            <parallel>classes</parallel>
                            <perCoreThreadCount>true</perCoreThreadCount>
                            <threadCount>2</threadCount>
                            <runOrder>random</runOrder>
                            <reportNameSuffix>bop</reportNameSuffix>
                            <skip>${test.skip.ordered}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>murmur-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <argLine>${default.test.jvm.opts} -Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-murmur -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-murmur</argLine>
                            <excludedGroups>${test.excluded.groups},com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests,com.thinkaurelius.titan.testcategory.SerialTests,com.thinkaurelius.titan.testcategory.CassandraSSLTests</excludedGroups>
                            <groups />
                            <forkCount>1</forkCount>
                            <reuseForks>false</reuseForks>
                            <parallel>classes</parallel>
                            <perCoreThreadCount>true</perCoreThreadCount>
                            <threadCount>2</threadCount>
                            <runOrder>random</runOrder>
                            <reportNameSuffix>murmur</reportNameSuffix>
                            <skip>${test.skip.unordered}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ssl-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <argLine>${default.test.jvm.opts} -Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-murmur-ssl -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-murmur-ssl</argLine>
                            <excludedGroups />
                            <groups>com.thinkaurelius.titan.testcategory.CassandraSSLTests</groups>
                            <!-- The TP3 JUnit Suite/Runner ignores groups/@Category and I'm not sure why.  Redundant excludes to keep TP3 tests from using non-SSL configs on SSL -->
                            <excludes>
                                <exclude>**/*ComputerTest.java</exclude>
                                <exclude>**/*StructureTest.java</exclude>
                                <exclude>**/*ProcessTest.java</exclude>
                            </excludes>
                            <forkCount>1</forkCount>
                            <reuseForks>false</reuseForks>
                            <parallel>classes</parallel>
                            <perCoreThreadCount>true</perCoreThreadCount>
                            <threadCount>1</threadCount>
                            <runOrder>random</runOrder>
                            <reportNameSuffix>ssl</reportNameSuffix>
                            <skip>${test.skip.ssl}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>serial-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <argLine>${default.test.jvm.opts} -Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-murmur -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-murmur</argLine>
                            <excludedGroups />
                            <groups>com.thinkaurelius.titan.testcategory.SerialTests</groups>
                            <forkCount>1</forkCount>
                            <reuseForks>false</reuseForks>
                            <parallel>none</parallel>
                            <perCoreThreadCount>false</perCoreThreadCount>
                            <threadCount>1</threadCount>
                            <runOrder>alphabetical</runOrder>
                            <reportNameSuffix>serial</reportNameSuffix>
                            <skip>${test.skip.serial}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <!-- Provide Java Memory Meter for Cassandra. Cassandra logs warnings if JAMM 
                      is not available. Also, production Cassandra deployments will probably use JAMM, 
                      so we might as well include it in our test configuration. -->
                    <execution>
                        <id>copy</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${jamm.group}</groupId>
                                    <artifactId>jamm</artifactId>
                                    <version>${jamm.version}</version>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>pack-test-jar</id>
                        <!-- prepare-package instead of package forces it to get signed -->
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>			
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<nexusUrl>${nexusServer}</nexusUrl>
					<stagingProfileId>176c31dfe190a</stagingProfileId>
					<serverId>ecomp-staging</serverId>
				</configuration>
			</plugin>
            <!-- ================================================== -->
            <!-- Set the JDK compiler version.                      -->
            <!-- ================================================== -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <inherited>true</inherited>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
      <profile>
	<id>coverage</id>
	<activation>
	  <activeByDefault>false</activeByDefault>
	</activation>

	<properties>
	  <test.extra.jvm.opts>${jacoco.opts} -javaagent:${basedir}/target/jamm-${jamm.version}.jar</test.extra.jvm.opts>
	</properties>
      </profile>
    </profiles>
    <distributionManagement>
        <snapshotRepository>
            <id>${nexus.id.snapshot}</id>
            <name>repository-snapshots</name>
            <url>${nexusServer}/content/repositories/${nexus.snapshot.repository}/</url>
        </snapshotRepository>
        <repository>
            <id>${nexus.id.release}</id>
            <name>repository-releases</name>
            <url>${nexusServer}/content/repositories/${nexus.release.repository}/</url>
        </repository>
            <site>
                <id>ecomp-site</id>
                <url>dav:${nexusServer}${sitePath}</url>
            </site>
    </distributionManagement>
</project>