-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
209 lines (204 loc) · 6.3 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
<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>de.hpi.swa</groupId>
<artifactId>lox-language</artifactId>
<version>0.0.1</version>
<properties>
<antlr.version>4.12.0</antlr.version>
<graalvm.version>24.2.0-SNAPSHOT</graalvm.version>
</properties>
<repositories>
<repository>
<id>lively-kernel</id>
<url>https://lively-kernel.org/lively4/byopl24/repository/${repodir}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<build>
<plugins>
<!-- Plugin for Junit testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<argLine>
--add-exports=java.base/jdk.internal.module=truffle.tck
-Dpolyglot.engine.WarnInterpreterOnly=false
</argLine>
<includes>
<include>**Test.java</include>
</includes>
<excludes>
<exclude>**/Abstract*Test.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- Plugin to compile the g4 files ahead of the java files
See https://github.com/antlr/antlr4/blob/master/antlr4-maven-plugin/src/site/apt/examples/simple.apt.vm
Except that the grammar does not need to contain the package declaration as stated in the documentation (I do not know why)
To use this plugin, type:
mvn antlr4:antlr4
In any case, Maven will invoke this plugin before the Java source is compiled
-->
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.12.0</version>
<configuration>
<sourceDirectory>${antlr.dir}</sourceDirectory>
<listener>true</listener>
<visitor>true</visitor>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- for: mvn exec:java -Dexec.args="-c 'print true;'" -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>de.hpi.swa.lox.cli.LoxMain</mainClass>
</configuration>
</plugin>
</plugins>
<!-- Plugin to compile the Java files with the Truffle annotation processor -->
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>21</source>
<target>21</target>
<annotationProcessorPaths>
<path>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-dsl-processor</artifactId>
<version>${graalvm.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>polyglot</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>launcher-common</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-runtime</artifactId>
<version>${graalvm.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-tck</artifactId>
<version>${graalvm.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>windows</id>
<activation>
<os><family>windows</family></os>
</activation>
<properties>
<repodir>windows</repodir>
</properties>
</profile>
<profile>
<id>mac</id>
<activation>
<os><name>mac os x</name></os>
</activation>
<properties>
<repodir>mac</repodir>
</properties>
</profile>
<profile>
<id>linux</id>
<activation>
<os>
<name>!mac os x</name>
<family>unix</family>
</os>
</activation>
<properties>
<repodir>linux</repodir>
</properties>
</profile>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.10.3</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<imageName>lox</imageName>
<mainClass>de.hpi.swa.lox.cli.LoxMain</mainClass>
<fallback>false</fallback>
<verbose>true</verbose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>