-
Notifications
You must be signed in to change notification settings - Fork 19
/
pom.xml
184 lines (176 loc) · 8.34 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
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gmssl</groupId>
<artifactId>GmSSLJNI</artifactId>
<version>3.1.1</version>
<name>GmSSL-Java</name>
<packaging>jar</packaging>
<description>GmSSL Java SDK</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<skipTests>false</skipTests>
<cmake.compile.config>Debug</cmake.compile.config>
<!--Generated library name, without the suffix format, and prefixed with the string 'lib'. Keep the content consistent with what is loaded in GmSSLJNI.java.-->
<libName>gmssljni</libName>
<!--The include directory and the location of the lib directory after installing gmssl. Please adjust according to your own situation. -->
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
<version>3.23.2-b1</version>
<executions>
<execution>
<id>cmake-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourcePath>
<!-- The directory containing CMakeLists -->
src/main/c
</sourcePath>
<targetPath>
<!-- The directory write the project files to -->
${project.build.directory}/build
</targetPath>
<generator>
<!--
Optional: Overrides the default generator used by cmake.
The list of available values can be found at
https://cmake.org/cmake/help/v3.22/manual/cmake-generators.7.html
-->
</generator>
<environmentVariables>
<libSubFolder>${cmake.compile.config}</libSubFolder>
<libName>${libName}</libName>
</environmentVariables>
<options>
<!--
Optional: One or more options found at https://cmake.org/cmake/help/v3.22/manual/cmake.1.html
For example:
-->
<option>-DBUILD_THIRDPARTY:bool=on</option>
</options>
</configuration>
</execution>
<execution>
<id>cmake-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<config>
<!-- Optional: the build configuration (e.g. "x64|Release") -->
</config>
<target>
<!-- Optional: the build "target" -->
</target>
<projectDirectory>
<!-- "targetPath" from the "generate" goal -->
${project.build.directory}/build
</projectDirectory>
<environmentVariables>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<failOnError>false</failOnError>
<filesets>
<fileset>
<directory>${basedir}/src/main/resources/lib</directory>
<includes>
<include>*.dll</include>
<include>*.so</include>
<include>*.dylib</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>ROOTCA.pem</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/build/${cmake.compile.config}</directory>
<includes>
<include>*.dll</include>
<include>*.so</include>
<include>*.dylib</include>
</includes>
<targetPath>${basedir}/target/classes/lib</targetPath>
</resource>
<resource>
<directory>${project.build.directory}/build/${cmake.compile.config}</directory>
<includes>
<include>*.dll</include>
<include>*.so</include>
<include>*.dylib</include>
</includes>
<targetPath>${basedir}/src/main/resources/lib</targetPath>
</resource>
<resource>
<directory>${project.build.directory}/build</directory>
<includes>
<include>ROOTCA.pem</include>
</includes>
<targetPath>${basedir}</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>central-maven2</id>
<name>Maven Mirror</name>
<url>https://repo1.maven.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>