-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
237 lines (231 loc) · 11.4 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
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.david</groupId>
<artifactId>sessionkotlin-template-maven</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<kotlin.version>1.6.21</kotlin.version>
<project.dependency.relativepath>dependency</project.dependency.relativepath>
<project.dependency.path>${project.build.directory}/${project.dependency.relativepath}</project.dependency.path>
<javasmt.version>3.12.0</javasmt.version>
<z3.version>4.8.15</z3.version>
</properties>
<repositories>
<repository>
<id>SessionKotlin-GithubPackages</id>
<url>https://maven.pkg.github.com/sessionkotlin/sessionkotlin</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>com.github.sessionkotlin</groupId>
<artifactId>lib</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>java-smt</artifactId>
<version>${javasmt.version}</version>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>jar</type>
<classifier>com.microsoft.z3</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3</classifier>
</dependency>
<dependency>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<version>${z3.version}</version>
<type>so</type>
<classifier>libz3java</classifier>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<!-- For solvers with native binaries, you need to add the classpath to test properly.
This path needs to be the location of the sosy-lab.commons.jar and the solver binaries.
See maven-dependency-plugin below for more information. -->
<argLine>-Djava.library.path=${project.dependency.path}</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<!-- For solvers with native binaries, you need to add the classpath to test properly.
This path needs to be the location of the sosy-lab.commons.jar and the solver binaries.
See maven-dependency-plugin below for more information. -->
<addClasspath>true</addClasspath>
<classpathPrefix>${project.dependency.relativepath}</classpathPrefix>
<mainClass>org.david.AppProtocolKt</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<source>src/main/kotlin</source>
</sourceDirs>
</configuration>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- The dependency plugin allows us to copy or delete files. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<!-- The goal "copy" is used to change the name of the solver libraries (i.e. Z3)
from the name that is used internally in Maven to the normal name. -->
<id>copy</id>
<phase>initialize</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
<execution>
<!-- This copies all dependencies to ${project.dependency.path}. -->
<!-- We do this, because the sosy-lab.commons dependency (in JavaSMT) searches the
native solver binaries (i.e. MathSAT or Z3) at specific locations and with specific names.
So we just copy the dependencies and set the classpath to this location.
You may of course change this if you know how to.
Default search locations for sosy-lab.commons:
(1) in its own folder (by far the easiest, just copy everything together) or
(2) in the "native library path" as returned by getNativeLibraryPath() in Java,
which is the directory ../native/<arch>-<os>/ relative to the JAR file of sosy-lab.commons,
with the following values depending on your system (arch=x86_64|x86; os=linux|windows|macosx). -->
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.dependency.path}</outputDirectory>
<artifactItems>
<!-- Here we specify what we want to use for the goal "copy".
In our case we copy the solver dependencies (binaries) to change their names.
groupId/artifactId/version/type/classifier have to match the dependency!
We copy them to ${project.dependency.path} as this is the location
that copy-dependencies uses by default. destFileName specifies the final name.
You may only need some of the artifacts below, depending on what solver(s) you want.
Important: you NEED to set the classpath to ${project.dependency.path} or
wherever you have your sosy-lab.commons + solver binaries! -->
<!-- Z3 has two native libraries -->
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<type>so</type>
<classifier>libz3java</classifier>
<destFileName>libz3java.so</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.sosy-lab</groupId>
<artifactId>javasmt-solver-z3</artifactId>
<type>so</type>
<classifier>libz3</classifier>
<destFileName>libz3.so</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>build/generated/sessionkotlin/main/kotlin</directory>
</resource>
</resources>
</build>
</project>