/
pom.xml
266 lines (237 loc) · 11.1 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
<?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>
<artifactId>deeplearning4j-ui-parent</artifactId>
<groupId>org.deeplearning4j</groupId>
<version>0.9.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>deeplearning4j-play_2.11</artifactId>
<name>deeplearning4j-play</name>
<profiles>
<!-- To build UI templates: run "mvn compile -P buildUiTemplates" -->
<profile>
<id>buildUiTemplates</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.code.play2-maven-plugin</groupId>
<artifactId>play2-maven-plugin</artifactId>
<version>${maven-play2-plugin.version}</version>
<!-- Generate Scala Page Templates
The Play framework template engine ("twirl") uses templates for HTML pages (or in principle any text-based
data: CSV, XML etc). These templates (*.scala.html files) need to be converted to Scala classes using
code generation. This is done here during the Maven compile phase.
However, the Maven Play framework plugin does not allow proper customization of the output directory. Thus,
we generate these Scala classes in the default location (in the target/twirl/main/ directory) and use the
maven resources plugin to copy them to the actual location we want.
To generate the latest versions of these templates (after modifying or adding a new template), just run
"mvn compile" in either the main project directory, or within the deeplearning4j ui module separately.
-->
<executions>
<execution>
<id>GenerateTemplates</id>
<phase>compile</phase>
<configuration>
</configuration>
<goals>
<goal>template-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Copy the generated Scala templates to the appropriate directory. See templates comment above. -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<executions>
<execution>
<id>CopyTemplates</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/scala/org/deeplearning4j/ui/views/html</outputDirectory>
<resources>
<resource>
<directory>${basedir}/target/twirl/main/org/deeplearning4j/ui/views/html</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test-nd4j-native</id>
</profile>
<profile>
<id>test-nd4j-cuda-8.0</id>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-ui-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.play</groupId>
<artifactId>play-java_2.11</artifactId>
<version>${playframework.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>${eclipse.collections.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.play</groupId>
<artifactId>play-netty-server_2.11</artifactId>
<version>${playframework.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-contrib_2.11</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>${reflections.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- ///////////////// Jackson Dependencies ///////////////// -->
<!-- Here: forcing all Jackson versions to match Spark versions. Otherwise, Spark may override some Jackson dependencies
with 2.4.4, but not all of them - resulting in dependency issues. Play framework seems OK using this version of Jackson
(as opposed to the default 2.5.4 version) as long as these versions aren't mixed for different dependencies. -->
<!-- Jackson Core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${spark.jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${spark.jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${spark.jackson.version}</version>
</dependency>
<!-- Jackson Module -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-scala_2.11</artifactId>
<version>${spark.jackson.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Jackson Datatype -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${spark.jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${spark.jackson.version}</version>
</dependency>
<!-- Promote com.typesafe.config to a direct dependency -->
<!-- This is a dependency for both Spark (1.2.1 for Spark 1.6.0, as a transitive dependency via Akka) and for
Play (1.3.0). Play requires 1.3.0 (fails with 1.2.1 - missing required methods), but Spark can use 1.3.0.
By promoting this to a direct dependency, we are more likely to resolve 1.3.0 over Spark's 1.2.1 -->
<!--<dependency>-->
<!--<groupId>com.typesafe</groupId>-->
<!--<artifactId>config</artifactId>-->
<!--<version>${typesafe.config.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster_2.11</artifactId>
<version>2.3.13</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>${jcommander.version}</version>
</dependency>
<!-- Test Scope Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId> <!-- Version set by deeplearning4j-parent dependency management -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <!-- Version set by deeplearning4j-parent dependency management -->
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Build helper plugin: used to add the multiple independent source directories (Java, Scala, HTML templates) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>compile</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/scala</source>
<source>src/main/java</source>
<source>src/main/views</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.sbt-compiler-maven-plugin</groupId>
<artifactId>sbt-compiler-maven-plugin</artifactId>
<version>${sbt-compiler-maven-plugin.version}</version>
</plugin>
<!-- Maven compiler plugin last: should ensure Scala code is compiled before Java code -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <!-- Version set by deeplearning4j-parent dependency management -->
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>