-
Notifications
You must be signed in to change notification settings - Fork 6
/
pom.xml
396 lines (346 loc) · 16.2 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
<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>com.carrotgarden.maven</groupId>
<artifactId>scalor-maven-plugin-demo</artifactId>
<version>0-SNAPSHOT</version>
<properties>
<!-- Java epoch. -->
<version.java>1.8</version.java>
<maven.compiler.source>${version.java}</maven.compiler.source><!-- Used by M2E. -->
<maven.compiler.target>${version.java}</maven.compiler.target><!-- Used by M2E. -->
<!-- Scala epoch. -->
<version.scala.epoch>2.12</version.scala.epoch>
<version.scala.release>2.12.7</version.scala.release>
<!-- Scala.js epoch. -->
<version.scalajs.epoch>0.6</version.scalajs.epoch>
<version.scalajs.release>0.6.27</version.scalajs.release>
<version.scalajs.library>sjs${version.scalajs.epoch}_${version.scala.epoch}</version.scalajs.library>
<!-- Scala compiler. -->
<version.scala.zinc>1.2.5</version.scala.zinc>
<version.scala.plugin.macro>2.1.1</version.scala.plugin.macro>
<!-- JUnit 4/5 Testing -->
<version.maven.testing>2.22.1</version.maven.testing>
<version.junit.platform>1.4.2</version.junit.platform>
<version.junit.jupiter>5.4.2</version.junit.jupiter>
<version.junit.vintage>5.4.2</version.junit.vintage>
<!-- File format. -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!--
Scala libraries.
-->
<!-- Scala core. -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${version.scala.release}</version>
<scope>compile</scope>
</dependency>
<!-- Scala.macro support. -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${version.scala.release}</version>
<scope>compile</scope>
</dependency>
<!-- Scala.js support -->
<dependency>
<groupId>org.scala-js</groupId>
<artifactId>scalajs-library_${version.scala.epoch}</artifactId>
<version>${version.scalajs.release}</version>
<scope>provided</scope>
</dependency>
<!--
Native JavaScript libraries.
Using scope=provided, since deployment is server-specific.
Webjars resources are also made available during JS-VM testing.
-->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>vue</artifactId>
<version>2.5.16</version>
<scope>provided</scope>
</dependency>
<!--
Scala.js facade to JavaScript.
Using scope=provided, since *.sjsir classes are consumed as runtime.js.
-->
<dependency>
<groupId>org.scala-js</groupId>
<artifactId>scalajs-dom_${version.scalajs.library}</artifactId>
<version>0.9.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>be.doeraene</groupId>
<artifactId>scalajs-jquery_${version.scalajs.library}</artifactId>
<version>0.9.4</version>
<scope>provided</scope>
</dependency>
<!--
Enable JUnit 4/5 testing:
JS tests are using JUnit 4, and JVM tests are using JUnit 5.
JS tests are invoked inside JS-VM, and JVM tests are invoked inside JVM.
-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${version.junit.jupiter}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>${version.junit.platform}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${version.junit.jupiter}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${version.junit.vintage}</version>
<scope>test</scope>
</dependency>
<!--
Enable JUnit Scala.js testing:
Provides custom JUnit runners, which run JUnit 4 tests inside JS-VM.
Note: keep order: after org.junit.* dependencies (see scalajs-junit-test-runtime).
-->
<dependency>
<groupId>com.carrotgarden.sjs</groupId>
<artifactId>scala-js-junit-tools_${version.scala.epoch}</artifactId>
<version>1.1.2.20180226041527</version>
<scope>test</scope>
</dependency>
<!-- Enable logging of JS-VM output from scala-js-junit-tools. -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Disable default compiler. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<skip>true</skip>
<skipMain>true</skipMain>
</configuration>
</plugin>
<!-- Enable alternative compiler. -->
<plugin>
<groupId>com.carrotgarden.maven</groupId>
<artifactId>scalor-maven-plugin_2.12</artifactId>
<version>1.5.0.20190502185130</version>
<configuration>
<!--
Extra logging for demonstration purposes.
-->
<zincLogSourcesList>true</zincLogSourcesList>
<zincLogProjectClassPath>true</zincLogProjectClassPath>
<!-- <zincLogBridgeClassPath>true</zincLogBridgeClassPath> -->
<!-- <zincLogCompilerClassPath>true</zincLogCompilerClassPath> -->
<zincLogCompilerClassPath>true</zincLogCompilerClassPath>
<zincLogCompilerPluginList>true</zincLogCompilerPluginList>
<zincLogCompilerOptions>true</zincLogCompilerOptions>
<!-- <linkerLogRuntime>true</linkerLogRuntime> -->
<!-- <linkerLogOptions>true</linkerLogOptions> -->
<!-- <linkerLogClassPath>true</linkerLogClassPath> -->
<linkerLogBuildStats>true</linkerLogBuildStats>
<linkerLogUpdateResult>true</linkerLogUpdateResult>
<envconfLogConfig>true</envconfLogConfig>
<!-- <eclipseLogBuildParticipant>true</eclipseLogBuildParticipant> -->
<eclipseLogPersistInstall>true</eclipseLogPersistInstall>
<!-- <eclipseLogInstallReport>true</eclipseLogInstallReport> -->
<eclipseLogPersistSettings>true</eclipseLogPersistSettings>
<!--
Example of Scala.js module initializer. See test/Init.scala.
-->
<linkerTestInitializerList>
<initializer>test.Init.main(build=${project.artifactId},stamp=${maven.build.timestamp})</initializer>
</linkerTestInitializerList>
<!--
Override JavaC compiler options for demonstration.
-->
<zincOptionsJava>
-deprecation
-encoding
${project.build.sourceEncoding}
-source
${version.java}
-target
${version.java}
</zincOptionsJava>
<!--
Provide custom ScalaC compiler options with Scala.js support.
https://www.scala-js.org/doc/interoperability/sjs-defined-js-classes.html
-->
<zincOptionsScala>
-P:scalajs:sjsDefinedByDefault
-encoding
${project.build.sourceEncoding}
-target:jvm-${version.java}
-Xmaxerrs
10
-feature
-unchecked
-deprecation
-language:higherKinds
-Dkp:genAsciiNames=true
-Dscalor.artifact=${project.artifactId}
-compileorder:Mixed
</zincOptionsScala>
<!--
Declare webjars resources for JS-VM testing.
Can select only form configured webjars dependencies.
See result of provisioning in ${project.basedir}/test-tool/webjars.
-->
<envconfWebjarsScriptList>
jquery/jquery.js
vue/vue.js
</envconfWebjarsScriptList>
<defineBridge>
<!--
Compiler bridge.
-->
<dependency>
<groupId>org.scala-sbt</groupId>
<artifactId>compiler-bridge_${version.scala.epoch}</artifactId>
<version>${version.scala.zinc}</version>
</dependency>
</defineBridge>
<defineCompiler>
<!--
Scala compiler.
-->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${version.scala.release}</version>
</dependency>
<!--
Convert JUnit annotations into Scala.js JUnit meta data.
This dependency provides replacement JUnit *.sjsir classes.
-->
<dependency>
<groupId>org.scala-js</groupId>
<artifactId>scalajs-junit-test-runtime_${version.scala.epoch}</artifactId>
<version>${version.scalajs.release}</version>
</dependency>
</defineCompiler>
<definePluginList>
<!--
Macro type provider support.
-->
<dependency>
<groupId>org.scalamacros</groupId>
<artifactId>paradise_${version.scala.release}</artifactId>
<version>${version.scala.plugin.macro}</version>
</dependency>
<!--
Generate Scala.js *.sjsir classes.
-->
<dependency>
<groupId>org.scala-js</groupId>
<artifactId>scalajs-compiler_${version.scala.release}</artifactId>
<version>${version.scalajs.release}</version>
</dependency>
<!--
Convert JUnit annotations into Scala.js JUnit meta data.
This plugin does actual conversion of JUnit test classes for JS-VM.
-->
<dependency>
<groupId>org.scala-js</groupId>
<artifactId>scalajs-junit-test-plugin_${version.scala.release}</artifactId>
<version>${version.scalajs.release}</version>
</dependency>
<!--
Plugin with advanced language features for demonstration.
https://github.com/non/kind-projector
-->
<dependency>
<groupId>org.spire-math</groupId>
<artifactId>kind-projector_${version.scala.epoch}</artifactId>
<version>0.9.6</version>
</dependency>
</definePluginList>
</configuration>
<executions>
<execution>
<goals>
<!-- Install Eclipse companion plugin. -->
<goal>eclipse-config</goal>
<!-- Transfer source format settings. -->
<goal>eclipse-format</goal>
<!-- Manage test application restart in M2E. -->
<goal>eclipse-restart</goal>
<!-- Manage Scala IDE presentation compiler. -->
<goal>eclipse-prescomp</goal>
<!-- Add Scala sources to the project. -->
<goal>register-macro</goal>
<goal>register-main</goal>
<goal>register-test</goal>
<!-- Compile Java and Scala in 3 scopes. -->
<goal>compile-macro</goal>
<goal>compile-main</goal>
<goal>compile-test</goal>
<!-- Generate Scala.js runtime.js JavaScript. -->
<goal>scala-js-link-main</goal>
<goal>scala-js-link-test</goal>
<!-- Provide Scala.js JS-VM testing environment. -->
<goal>scala-js-env-prov-webjars</goal>
<goal>scala-js-env-prov-nodejs</goal>
<goal>scala-js-env-conf-nodejs</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Enable JUnit 4/5 testing for Maven. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven.testing}</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${version.junit.jupiter}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${version.junit.vintage}</version>
</dependency>
</dependencies>
<configuration>
<!--
Name pattern for JVM test class discovery.
Make sure JS-VM test classes use different pattern.
-->
<includes>
<include>**/*Test.class</include>
<include>**/*Suite.class</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>