xref: /aosp_15_r20/external/json-schema-validator/pom.xml (revision 78c4dd6aa35290980cdcd1623a7e337e8d021c7c)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright (c) 2016 Network New Technologies Inc.
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17<project
18  xmlns="http://maven.apache.org/POM/4.0.0"
19  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
21  >
22  <modelVersion>4.0.0</modelVersion>
23
24  <groupId>com.networknt</groupId>
25  <artifactId>json-schema-validator</artifactId>
26  <version>1.4.0</version>
27  <packaging>bundle</packaging>
28  <name>JsonSchemaValidator</name>
29  <description>A json schema validator that supports draft v4, v6, v7, v2019-09 and v2020-12</description>
30  <url>https://github.com/networknt/json-schema-validator</url>
31
32  <licenses>
33    <license>
34      <name>Apache License Version 2.0</name>
35      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
36      <distribution>repo</distribution>
37    </license>
38  </licenses>
39
40  <developers>
41    <developer>
42      <id>stevehu</id>
43      <name>Steve Hu</name>
44      <email>[email protected]</email>
45    </developer>
46  </developers>
47
48  <scm>
49    <connection>scm:git://github.com:networknt/json-schema-validator.git</connection>
50    <developerConnection>scm:git://github.com:networknt/json-schema-validator.git</developerConnection>
51    <url>https://github.com:networknt/json-schema-validator.git</url>
52  </scm>
53
54  <issueManagement>
55    <system>github</system>
56    <url>https://github.com/networknt/json-schema-validator/issues</url>
57  </issueManagement>
58
59  <distributionManagement>
60    <repository>
61      <id>ossrh</id>
62      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
63    </repository>
64    <snapshotRepository>
65      <id>ossrh</id>
66      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
67    </snapshotRepository>
68  </distributionManagement>
69
70  <properties>
71    <java.testversion>1.8</java.testversion>
72    <java.version>1.8</java.version>
73    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
74    <version.hamcrest>2.2</version.hamcrest>
75    <version.itu>1.8.0</version.itu>
76    <version.jackson>2.15.3</version.jackson>
77    <version.joni>2.1.41</version.joni>
78    <version.junit>5.9.2</version.junit>
79    <version.logback>1.3.14</version.logback>
80    <version.slf4j>2.0.9</version.slf4j>
81    <version.surefire>3.0.0</version.surefire>
82    <version.undertow>2.2.25.Final</version.undertow>
83  </properties>
84
85  <dependencies>
86
87    <dependency>
88      <groupId>ch.qos.logback</groupId>
89      <artifactId>logback-classic</artifactId>
90      <version>${version.logback}</version>
91      <scope>test</scope>
92    </dependency>
93
94    <dependency>
95      <!-- Used to validate RFC 3339 date and date-time -->
96      <groupId>com.ethlo.time</groupId>
97      <artifactId>itu</artifactId>
98      <version>${version.itu}</version>
99    </dependency>
100
101    <dependency>
102      <groupId>com.fasterxml.jackson.core</groupId>
103      <artifactId>jackson-databind</artifactId>
104      <version>${version.jackson}</version>
105    </dependency>
106
107    <dependency>
108      <groupId>com.fasterxml.jackson.dataformat</groupId>
109      <artifactId>jackson-dataformat-yaml</artifactId>
110      <version>${version.jackson}</version>
111    </dependency>
112
113    <dependency>
114      <groupId>io.undertow</groupId>
115      <artifactId>undertow-core</artifactId>
116      <version>${version.undertow}</version>
117      <scope>test</scope>
118    </dependency>
119
120    <dependency>
121      <groupId>org.hamcrest</groupId>
122      <artifactId>hamcrest</artifactId>
123      <version>${version.hamcrest}</version>
124      <scope>test</scope>
125    </dependency>
126
127    <dependency>
128      <!-- Used to validate ECMA 262 regular expressions -->
129      <groupId>org.jruby.joni</groupId>
130      <artifactId>joni</artifactId>
131      <version>${version.joni}</version>
132      <optional>true</optional>
133    </dependency>
134
135    <dependency>
136      <groupId>org.junit.jupiter</groupId>
137      <artifactId>junit-jupiter-engine</artifactId>
138      <version>${version.junit}</version>
139      <scope>test</scope>
140    </dependency>
141
142    <dependency>
143      <groupId>org.junit.jupiter</groupId>
144      <artifactId>junit-jupiter-params</artifactId>
145      <version>${version.junit}</version>
146      <scope>test</scope>
147    </dependency>
148
149    <dependency>
150      <groupId>org.slf4j</groupId>
151      <artifactId>slf4j-api</artifactId>
152      <version>${version.slf4j}</version>
153    </dependency>
154
155  </dependencies>
156
157  <build>
158
159    <resources>
160      <resource>
161        <filtering>false</filtering>
162        <directory>${basedir}/src/main/resources</directory>
163        <includes>
164          <include>**/*</include>
165        </includes>
166      </resource>
167    </resources>
168
169    <testResources>
170      <testResource>
171        <filtering>false</filtering>
172        <directory>${basedir}/src/test/resources</directory>
173        <includes>
174          <include>**/*</include>
175        </includes>
176      </testResource>
177      <testResource>
178        <directory>${project.basedir}/src/test/suite</directory>
179      </testResource>
180    </testResources>
181
182    <plugins>
183
184      <plugin>
185        <groupId>org.apache.felix</groupId>
186        <artifactId>maven-bundle-plugin</artifactId>
187        <version>5.1.8</version>
188        <extensions>true</extensions>
189        <configuration>
190          <instructions>
191            <Import-Package>
192              org.jcodings;resolution:=optional,
193              org.jcodings.specific;resolution:=optional,
194              org.joni;resolution:=optional,
195              org.joni.exception;resolution:=optional,
196              *
197            </Import-Package>
198          </instructions>
199        </configuration>
200      </plugin>
201
202      <plugin>
203        <groupId>org.sonatype.plugins</groupId>
204        <artifactId>nexus-staging-maven-plugin</artifactId>
205        <version>1.6.8</version>
206        <extensions>true</extensions>
207        <configuration>
208          <serverId>ossrh</serverId>
209          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
210          <autoReleaseAfterClose>true</autoReleaseAfterClose>
211        </configuration>
212      </plugin>
213
214      <plugin>
215        <groupId>org.apache.maven.plugins</groupId>
216        <artifactId>maven-source-plugin</artifactId>
217        <version>3.0.1</version>
218        <executions>
219          <execution>
220            <id>attach-sources</id>
221            <goals>
222              <goal>jar</goal>
223            </goals>
224          </execution>
225        </executions>
226      </plugin>
227
228      <plugin>
229        <groupId>org.apache.maven.plugins</groupId>
230        <artifactId>maven-javadoc-plugin</artifactId>
231        <version>3.4.0</version>
232        <executions>
233          <execution>
234            <id>attach-javadocs</id>
235            <goals>
236              <goal>jar</goal>
237            </goals>
238            <configuration>
239              <source>8</source>
240            </configuration>
241          </execution>
242        </executions>
243      </plugin>
244
245      <plugin>
246        <groupId>org.apache.maven.plugins</groupId>
247        <artifactId>maven-compiler-plugin</artifactId>
248        <version>3.6.1</version>
249        <configuration>
250          <source>${java.version}</source>
251          <target>${java.version}</target>
252          <testSource>${java.testversion}</testSource>
253          <testTarget>${java.testversion}</testTarget>
254        </configuration>
255        <executions>
256          <execution>
257            <id>test-compile</id>
258            <goals>
259              <goal>testCompile</goal>
260            </goals>
261            <phase>process-test-sources</phase>
262            <configuration>
263              <source>${java.testversion}</source>
264              <target>${java.testversion}</target>
265            </configuration>
266          </execution>
267        </executions>
268      </plugin>
269
270      <plugin>
271        <groupId>org.apache.maven.plugins</groupId>
272        <artifactId>maven-surefire-plugin</artifactId>
273        <version>${version.surefire}</version>
274        <configuration>
275          <argLine>@{argLine} -Duser.language=en -Duser.region=GB</argLine>
276          <reportFormat>plain</reportFormat>
277          <consoleOutputReporter>
278            <disable>true</disable>
279          </consoleOutputReporter>
280          <statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
281            <usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
282            <usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
283            <usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
284          </statelessTestsetReporter>
285          <statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
286            <usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
287            <usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
288          </statelessTestsetInfoReporter>
289        </configuration>
290        <dependencies>
291          <dependency>
292            <groupId>me.fabriciorby</groupId>
293            <artifactId>maven-surefire-junit5-tree-reporter</artifactId>
294            <version>1.1.0</version>
295          </dependency>
296        </dependencies>
297      </plugin>
298
299      <plugin>
300        <groupId>org.jacoco</groupId>
301        <artifactId>jacoco-maven-plugin</artifactId>
302        <version>0.8.10</version>
303
304        <configuration>
305          <excludes>
306            <exclude>com/networknt/org/apache/commons/validator/**</exclude>
307          </excludes>
308        </configuration>
309
310        <executions>
311          <!--
312           | Prepares the property pointing to the JaCoCo runtime agent
313           | which is passed as VM argument when Maven the Surefire plugin
314           | is executed.
315           +-->
316          <execution>
317            <id>pre-unit-test</id>
318            <goals>
319              <goal>prepare-agent</goal>
320            </goals>
321          </execution>
322
323          <!--
324           | Ensures that the code coverage report for unit-tests
325           | is created after unit tests have been run.
326           +-->
327          <execution>
328            <id>post-unit-test</id>
329            <goals>
330              <goal>report</goal>
331            </goals>
332            <phase>test</phase>
333          </execution>
334        </executions>
335      </plugin>
336
337    </plugins>
338
339    <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
340    <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
341
342  </build>
343
344  <reporting>
345    <plugins>
346      <plugin>
347        <groupId>org.apache.maven.plugins</groupId>
348        <artifactId>maven-surefire-report-plugin</artifactId>
349        <version>${version.surefire}</version>
350      </plugin>
351    </plugins>
352  </reporting>
353
354  <profiles>
355
356    <profile>
357      <id>release-sign-artifacts</id>
358      <activation>
359        <property>
360          <name>performRelease</name>
361          <value>true</value>
362        </property>
363      </activation>
364      <build>
365        <plugins>
366          <plugin>
367            <groupId>org.apache.maven.plugins</groupId>
368            <artifactId>maven-gpg-plugin</artifactId>
369            <version>1.6</version>
370            <executions>
371              <execution>
372                <id>sign-artifacts</id>
373                <goals>
374                  <goal>sign</goal>
375                </goals>
376                <phase>verify</phase>
377              </execution>
378            </executions>
379          </plugin>
380        </plugins>
381      </build>
382    </profile>
383
384    <profile>
385      <id>java-module</id>
386      <activation>
387        <jdk>[9,)</jdk>
388      </activation>
389      <build>
390        <plugins>
391          <plugin>
392            <groupId>org.moditect</groupId>
393            <artifactId>moditect-maven-plugin</artifactId>
394            <version>1.0.0.Final</version>
395            <executions>
396              <execution>
397                <id>add-module-infos</id>
398                <goals>
399                  <goal>add-module-info</goal>
400                </goals>
401                <phase>package</phase>
402                <configuration>
403                  <jvmVersion>9</jvmVersion>
404                  <overwriteExistingFiles>true</overwriteExistingFiles>
405                  <module>
406                    <moduleInfo>
407                      <name>com.networknt.schema</name>
408                      <!-- export everything except embedded Apache code -->
409                      <exports>
410                        !com.networknt.org*;
411                        *;
412                      </exports>
413                      <!-- declare services consumed by the artifact -->
414                      <addServiceUses>true</addServiceUses>
415                    </moduleInfo>
416                  </module>
417                  <jdepsExtraArgs>
418                    <arg>--multi-release=9</arg>
419                  </jdepsExtraArgs>
420                </configuration>
421              </execution>
422            </executions>
423          </plugin>
424        </plugins>
425      </build>
426    </profile>
427
428  </profiles>
429
430</project>
431