-
Notifications
You must be signed in to change notification settings - Fork 21
/
pom.xml
432 lines (411 loc) · 14.9 KB
/
pom.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>org.hammerlab</groupId>
<artifactId>scala-parent-pom</artifactId>
<version>1.0.3</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>guacamole</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>guacamole: variant caller</name>
<properties>
<github.repo>hammerlab/guacamole</github.repo>
<scala.version>2.10.6</scala.version>
<scala.version.prefix>2.10</scala.version.prefix>
<hadoop.version>2.7.0</hadoop.version>
<spark.version>1.6.1</spark.version>
<spark.hadoop.scope>provided</spark.hadoop.scope>
</properties>
<build>
<!--
The Guacamole JAR output by maven-jar-plugin, at the path configured here, can't run on its own; it needs some
dependency-classes shaded in, as configured elsewhere in this file. However, the shade plugin requires it to be
present in order to work.
As such, we write it to a non-default path here, and treat the minimum-viable Guacamole+shaded-deps JAR (built by
the default "guac" profile below) as the primary deliverable.
-->
<finalName>guacamole-unshaded-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<!-- Bump the memory used by scalatest. -->
<argLine>-Xmx4g</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<transformers>
<!-- Set "main" class. -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.hammerlab.guacamole.Main</mainClass>
</transformer>
</transformers>
<filters>
<!-- Exclude signature files that we don't validate. -->
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/license</exclude>
</excludes>
</filter>
</filters>
<relocations>
<!--
Spark (MLLib) depends on Breeze 0.11.2 and we depend on 0.12. By Spark 2.0.1 we should be able to
remove this.
-->
<relocation>
<pattern>breeze</pattern>
<shadedPattern>org.hammerlab.breeze</shadedPattern>
<includes>
<include>breeze.**</include>
</includes>
</relocation>
</relocations>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.esotericsoftware.kryo</groupId>
<artifactId>kryo</artifactId>
<version>2.21</version>
</dependency>
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>[2.0.29,)</version>
</dependency>
<dependency>
<groupId>org.hammerlab.adam</groupId>
<artifactId>adam-core_${scala.version.prefix}</artifactId>
<version>0.20.3</version>
</dependency>
<dependency>
<groupId>org.bdgenomics.bdg-formats</groupId>
<artifactId>bdg-formats</artifactId>
<version>0.10.0</version>
</dependency>
<dependency>
<groupId>org.bdgenomics.quinine</groupId>
<artifactId>quinine-core_${scala.version.prefix}</artifactId>
<version>0.0.2</version>
<exclusions>
<exclusion>
<groupId>org.bdgenomics.adam</groupId>
<artifactId>adam-core_2.10</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.spire-math</groupId>
<artifactId>spire_${scala.version.prefix}</artifactId>
<version>0.11.0</version>
</dependency>
<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>breeze_${scala.version.prefix}</artifactId>
<version>0.12</version>
</dependency>
<dependency>
<groupId>com.github.samtools</groupId>
<artifactId>htsjdk</artifactId>
<version>2.6.1</version>
<exclusions>
<!--
htsjdk:2.6.1 brings in snappy-java:1.0.3-rc3, but running tests on OSX requires ≥ 1.0.5, per
http://stackoverflow.com/a/31482848/544236.
-->
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.seqdoop</groupId>
<artifactId>hadoop-bam</artifactId>
<version>7.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>args4s_${scala.version.prefix}</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>magic-rdds_${scala.version.prefix}</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>spark-commands_${scala.version.prefix}</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.clapper</groupId>
<artifactId>grizzled-slf4j_${scala.version.prefix}</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>${spark.hadoop.scope}</scope>
<exclusions>
<!--
hadoop-client's javax.servlet:servlet-api dependency includes classes that conflict with spark-core's
org.eclipse.jetty.orbit:javax.servlet dependency; excluding the former resolves this, cf.
https://issues.apache.org/jira/browse/SPARK-1693.
-->
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.version.prefix}</artifactId>
<version>${spark.version}</version>
<scope>${spark.hadoop.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_${scala.version.prefix}</artifactId>
<version>${spark.version}</version>
<scope>${spark.hadoop.scope}</scope>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>spark-util_${scala.version.prefix}</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>genomic-loci_${scala.version.prefix}</artifactId>
<version>1.4.1</version>
</dependency>
<!-- Test deps -->
<dependency>
<groupId>com.holdenkarau</groupId>
<artifactId>spark-testing-base_${scala.version.prefix}</artifactId>
<version>${spark.version}_0.4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bdgenomics.bdg-utils</groupId>
<artifactId>bdg-utils-misc</artifactId>
<version>0.1.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hammerlab</groupId>
<artifactId>spark-tests_${scala.version.prefix}</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!--
Default profile: build a Guacamole jar with shaded Breeze, and write transitive-dependency-JAR paths
to target/dependencies (comma-delimited to serve the common case of passing the values to Spark's "jars" flag).
-->
<id>guac</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<!--
`mvn install` will look for a JAR with this name, which is taken to be the main deliverable JAR of this
project.
We name it here in a manner that matches what we tell the shade-plugin to output below.
-->
<finalName>guacamole-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>guac</id>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>guacamole-${project.version}</finalName>
<!--
Don't "attach" this shaded JAR to the project (in addition to the default unshaded JAR that would be
produced by the jar-plugin; this JAR *is* the deliverable of the project.
-->
<shadedArtifactAttached>false</shadedArtifactAttached>
<artifactSet>
<includes>
<include>org.hammerlab.guacamole:*</include>
<include>org.scalanlp:breeze_${scala.version.prefix}</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
<!-- Write a file with paths to all transitive-dependencies to target/dependencies. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<goals>
<goal>build-classpath</goal>
</goals>
<configuration>
<outputFile>${target.dir}/dependencies</outputFile>
<!-- Use commas for ease of passing to spark-{submit,shell}'s "jars" flag. -->
<pathSeparator>,</pathSeparator>
<!-- Leave Breeze out, as they are included in the Guacamole JAR defined above. -->
<excludeArtifactIds>
breeze_${scala.version.prefix}
</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
"uber" profile: build a JAR with Guacamole and all transitive dependencies shaded, and Breeze relocated.
-->
<profile>
<id>uber</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>guacamole-assembly-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
"deps" profile: build a JAR with just Guacamole's transitive dependencies, excluding those that are shaded into
the Guacamole JAR itself.
-->
<id>deps</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>deps</id>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>guacamole-deps-${project.version}</finalName>
<transformers combine.children="append">
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
</transformers>
<filters combine.children="append">
<!-- Leave all Guacamole classes out of this JAR. -->
<filter>
<artifact>*:guacamole</artifact>
<excludes>
<exclude>org/hammerlab/guacamole/**</exclude>
</excludes>
</filter>
</filters>
<artifactSet>
<excludes>
<!-- These are shaded into the "guac"-profile JAR. -->
<exclude>org.scalanlp:breeze_${scala.version.prefix}</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
"local" profile puts Spark and Hadoop into "compile" scope (rather than "provided"); generally not desirable,
unless intending to run Guacamole directly from the command-line using the `java` executable, instead of
spark-{submit,shell}.
-->
<id>local</id>
<properties>
<spark.hadoop.scope>compile</spark.hadoop.scope>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<transformers combine.children="append">
<!-- Akka (which Spark depends on) needs this reference.conf munging in order to work correctly in -->
<!-- shaded JARs, cf. http://stackoverflow.com/questions/31011243/#31011315 -->
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
<!-- Necessary for Hadoop to load local files correctly, cf. http://stackoverflow.com/a/27532248/544236 -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test</id>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>test-jar</id>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>