-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
144 lines (127 loc) · 4.85 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
<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>wasm</groupId>
<artifactId>wasm</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java.version>1.8</java.version>
<teavm.version>0.5.1</teavm.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Emulator of Java class library for TeaVM -->
<dependency>
<groupId>org.teavm</groupId>
<artifactId>teavm-classlib</artifactId>
<version>${teavm.version}</version>
<scope>provided</scope>
</dependency>
<!-- JavaScriptObjects (JSO) - a JavaScript binding for TeaVM -->
<dependency>
<groupId>org.teavm</groupId>
<artifactId>teavm-jso-apis</artifactId>
<version>${teavm.version}</version>
<scope>provided</scope>
</dependency>
<!-- Servlet 3.1 specification -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jbox2d</groupId>
<artifactId>jbox2d-library</artifactId>
<version>2.2.1.1</version>
</dependency>
<dependency>
<groupId>org.jbox2d</groupId>
<artifactId>jbox2d-library</artifactId>
<version>2.2.1.1</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.dukescript.canvas</groupId>
<artifactId>html5-canvas</artifactId>
<version>0.7.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Configure Java compiler to use Java 8 syntax -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- Configure WAR plugin to include JavaScript files generated by TeaVM -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>${project.build.directory}/generated/js</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated/wasm</directory>
</resource>
</webResources>
</configuration>
</plugin>
<!-- Configure TeaVM -->
<plugin>
<groupId>org.teavm</groupId>
<artifactId>teavm-maven-plugin</artifactId>
<version>${teavm.version}</version>
<executions>
<execution>
<id>web-client</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- Directory where TeaVM should put generated files. This configuration conforms to the settings
of the WAR plugin -->
<targetDirectory>${project.build.directory}/generated/js/teavm</targetDirectory>
<!-- Main class, containing static void main(String[]) -->
<mainClass>wasm.Client</mainClass>
<!-- Whether TeaVM should produce minified JavaScript. Can reduce JavaScript file size more than
two times -->
<minifying>true</minifying>
<!-- Whether TeaVM should produce debug information for its built-in debugger -->
<debugInformationGenerated>true</debugInformationGenerated>
<!-- Whether TeaVM should produce source maps file -->
<sourceMapsGenerated>true</sourceMapsGenerated>
<!-- Whether TeaVM should also put source files into output directory,
for compatibility with source maps -->
<sourceFilesCopied>true</sourceFilesCopied>
<!-- Optimization level. Valid values are: SIMPLE, ADVANCED, FULL -->
<optimizationLevel>ADVANCED</optimizationLevel>
</configuration>
</execution>
<execution>
<id>wasm-client</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<targetDirectory>${project.build.directory}/generated/wasm/teavm-wasm</targetDirectory>
<mainClass>wasm.Client</mainClass>
<debugInformationGenerated>true</debugInformationGenerated>
<targetType>WEBASSEMBLY</targetType>
<optimizationLevel>FULL</optimizationLevel>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>