-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
163 lines (160 loc) · 7.06 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
<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apidesign.demo</groupId>
<artifactId>talk2compiler</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Talk to Compiler</name>
<url>http://maven.apache.org</url>
<properties>
<graalvm.version>21.3.0</graalvm.version>
<compiler.dir>${project.build.directory}/compiler</compiler.dir>
<debug.args>-Dnodebug=true</debug.args>
<igv.args>-Dnoigv=true</igv.args>
<!--
Polyglot arguments:
https://www.graalvm.org/22.0/graalvm-as-a-platform/language-implementation-framework/Options/
can be passed also as "-Dpologlot.option.name=value"
-->
<polyglot.args>-Dpolyglot.engine.AllowExperimentalOptions=true -Dpolyglot.engine.TraceCompilation=true -Dpolyglot.engine.MultiTier=false</polyglot.args>
<exec.appArgs></exec.appArgs>
<project.mainclass>org.apidesign.demo.talk2compiler.Main</project.mainclass>
<netbeans.hint.jdkPlatform>JDK_11</netbeans.hint.jdkPlatform>
<netbeans.compile.on.save>none</netbeans.compile.on.save>
</properties>
<dependencies>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>${graalvm.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<argLine>
${igv.args} -Dgraal.LogFile=${project.build.directory}/graal.log
-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
--module-path=${compiler.dir} --upgrade-module-path=${compiler.dir}/compiler.jar
${polyglot.args}
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy</id>
<phase>process-classes</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.graalvm.compiler</groupId>
<artifactId>compiler</artifactId>
<version>${graalvm.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>compiler.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>${graalvm.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>truffle-api.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graalvm.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>graal-sdk.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${compiler.dir}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>
${debug.args} ${igv.args} --module-path=${compiler.dir}
--upgrade-module-path=${compiler.dir}/compiler.jar
-classpath %classpath
-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
${polyglot.args}
${project.mainclass} ${exec.appArgs}
</commandlineArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<requireJavaVersion>
<version>11+</version>
<message>
****************************
Execute with JDK11 or newer!
****************************
</message>
</requireJavaVersion>
</rules>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>igv</id>
<properties>
<igv.args>-Dpolyglot.engine.CompilationFailureAction=Print -Dgraal.Dump=:1 -Dgraal.PrintGraph=Network</igv.args>
</properties>
</profile>
</profiles>
</project>