Compare commits
28 commits
http-mock-
...
dev
Author | SHA1 | Date | |
---|---|---|---|
55ee22c3a1 | |||
65fba1eebc | |||
2a11dd9b10 | |||
ea16fa59d0 | |||
1c5909cf8d | |||
0884505a18 | |||
024bec4304 | |||
b2857d956b | |||
5ddcb87179 | |||
514064debc | |||
2fe3f2a67d | |||
36bc5dd14b | |||
|
afaab504da | ||
|
f9ae4a8003 | ||
|
a3a7c4f8dc | ||
|
e44c1de1a2 | ||
|
3413bfa0ad | ||
|
a825ad6fa2 | ||
|
374947847d | ||
|
8ba339b8a0 | ||
|
ab6345234f | ||
|
763f303a65 | ||
|
23bba7e713 | ||
|
82b22565d8 | ||
|
1a422fefca | ||
|
b314332228 | ||
|
f8f2cfb125 | ||
|
db93a99b9a |
38 changed files with 1015 additions and 356 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
*.iml
|
*.iml
|
||||||
target/
|
target/
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
18
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
18
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
|
|
@ -1,5 +0,0 @@
|
||||||
language: groovy
|
|
||||||
|
|
||||||
jdk:
|
|
||||||
- openjdk8
|
|
||||||
|
|
59
.woodpecker.yaml
Normal file
59
.woodpecker.yaml
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
variables:
|
||||||
|
&maven_image maven:3.9.6-eclipse-temurin-11-alpine
|
||||||
|
|
||||||
|
when:
|
||||||
|
evaluate: 'not (CI_COMMIT_MESSAGE contains "Release")'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: *maven_image
|
||||||
|
commands:
|
||||||
|
- mvn -B clean install -DskipTests -Dmaven.test.skip
|
||||||
|
- name: test
|
||||||
|
image: *maven_image
|
||||||
|
commands:
|
||||||
|
- mvn -B -pl :mockserver-tests verify
|
||||||
|
- name: deploy to public
|
||||||
|
image: *maven_image
|
||||||
|
commands:
|
||||||
|
- mvn -B jar:jar deploy:deploy
|
||||||
|
secrets: [reposilite_user, reposilite_token]
|
||||||
|
when:
|
||||||
|
branch: [dev, master]
|
||||||
|
- name: deploy to releases
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base-url: https://git.ztsh.eu
|
||||||
|
files:
|
||||||
|
- "mockserver-client/target/mockserver-client*.jar"
|
||||||
|
- "mockserver/target/mockserver-full.jar"
|
||||||
|
api_key:
|
||||||
|
from_secret: git_pat
|
||||||
|
when:
|
||||||
|
- event: tag
|
||||||
|
- name: tag docker image
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
|
||||||
|
repo: ztsheu/http-mock-server
|
||||||
|
registry: docker.io
|
||||||
|
tags: ${CI_COMMIT_TAG}
|
||||||
|
username: ztsheu
|
||||||
|
password:
|
||||||
|
from_secret: docker_pat
|
||||||
|
when:
|
||||||
|
- event: tag
|
||||||
|
- name: build docker image
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
|
||||||
|
repo: ztsheu/http-mock-server
|
||||||
|
registry: docker.io
|
||||||
|
tags: latest
|
||||||
|
username: ztsheu
|
||||||
|
password:
|
||||||
|
from_secret: docker_pat
|
||||||
|
when:
|
||||||
|
- event: tag
|
||||||
|
- event: push
|
||||||
|
branch: dev
|
|
@ -1,4 +1,4 @@
|
||||||
FROM java:8
|
FROM eclipse-temurin:11.0.22_7-jre-jammy
|
||||||
|
|
||||||
ADD mockserver/target/mockserver-full.jar /mockserver.jar
|
ADD mockserver/target/mockserver-full.jar /mockserver.jar
|
||||||
|
|
||||||
|
@ -8,4 +8,4 @@ RUN mkdir /externalSchema
|
||||||
|
|
||||||
VOLUME /externalSchema
|
VOLUME /externalSchema
|
||||||
|
|
||||||
CMD java -cp /mockserver.jar:/externalSchema pl.touk.mockserver.server.Main
|
CMD java -cp /mockserver.jar:/externalSchema eu.ztsh.mockserver.server.Main
|
||||||
|
|
28
README.md
28
README.md
|
@ -94,7 +94,7 @@ docker-compose up -d
|
||||||
|
|
||||||
### Docker repoository
|
### Docker repoository
|
||||||
|
|
||||||
Built image is available at https://hub.docker.com/r/alien11689/mockserver/
|
Currently unavailable
|
||||||
|
|
||||||
Create mock on server
|
Create mock on server
|
||||||
---------------------
|
---------------------
|
||||||
|
@ -132,7 +132,7 @@ remoteMockServer.addMock(new AddMock(
|
||||||
Send POST request to localhost:<PORT>/serverControl
|
Send POST request to localhost:<PORT>/serverControl
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<addMock xmlns="http://touk.pl/mockserver/api/request">
|
<addMock xmlns="http://ztsh.eu/mockserver/api/request">
|
||||||
<name>...</name>
|
<name>...</name>
|
||||||
<path>...</path>
|
<path>...</path>
|
||||||
<port>...</port>
|
<port>...</port>
|
||||||
|
@ -166,7 +166,7 @@ Send POST request to localhost:<PORT>/serverControl
|
||||||
- response - groovy closure as string which must evaluate to string which will be response of mock when predicate is satisfied, optional, default { _ -> '' }
|
- response - groovy closure as string which must evaluate to string which will be response of mock when predicate is satisfied, optional, default { _ -> '' }
|
||||||
- soap - true or false, is request and response should be wrapped in soap Envelope and Body elements, default false
|
- soap - true or false, is request and response should be wrapped in soap Envelope and Body elements, default false
|
||||||
- statusCode - integer, status code of response when predicate is satisfied, default 200
|
- statusCode - integer, status code of response when predicate is satisfied, default 200
|
||||||
- method - POST|PUT|DELETE|GET|TRACE|OPTION|HEAD, expected http method of request, default POST
|
- method - POST|PUT|DELETE|GET|TRACE|OPTION|HEAD|ANY_METHOD, expected http method of request, default `POST`, `ANY_METHOD` matches all HTTP methods
|
||||||
- responseHeaders - groovyClosure as string which must evaluate to Map which will be added to response headers, default { _ -> \[:] }
|
- responseHeaders - groovyClosure as string which must evaluate to Map which will be added to response headers, default { _ -> \[:] }
|
||||||
- schema - path to xsd schema file on mockserver classpath; default empty, so no vallidation of request is performed; if validation fails then response has got status 400 and response is raw message from validator
|
- schema - path to xsd schema file on mockserver classpath; default empty, so no vallidation of request is performed; if validation fails then response has got status 400 and response is raw message from validator
|
||||||
- imports - list of imports for closures (each import is separate tag); `alias` is the name of `fullClassName` available in closure; `fullClassName` must be available on classpath of mock server
|
- imports - list of imports for closures (each import is separate tag); `alias` is the name of `fullClassName` available in closure; `fullClassName` must be available on classpath of mock server
|
||||||
|
@ -200,13 +200,13 @@ In closures input parameter (called req) contains properties:
|
||||||
Response if success:
|
Response if success:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<mockAdded xmlns="http://touk.pl/mockserver/api/response"/>
|
<mockAdded xmlns="http://ztsh.eu/mockserver/api/response"/>
|
||||||
```
|
```
|
||||||
|
|
||||||
Response with error message if failure:
|
Response with error message if failure:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<exceptionOccured xmlns="http://touk.pl/mockserver/api/response">...</exceptionOccured>
|
<exceptionOccured xmlns="http://ztsh.eu/mockserver/api/response">...</exceptionOccured>
|
||||||
```
|
```
|
||||||
|
|
||||||
Peek mock
|
Peek mock
|
||||||
|
@ -225,7 +225,7 @@ List<MockEvent> mockEvents = remoteMockServer.peekMock('...')
|
||||||
Send POST request to localhost:<PORT>/serverControl
|
Send POST request to localhost:<PORT>/serverControl
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<peekMock xmlns="http://touk.pl/mockserver/api/request">
|
<peekMock xmlns="http://ztsh.eu/mockserver/api/request">
|
||||||
<name>...</name>
|
<name>...</name>
|
||||||
</peekMock>
|
</peekMock>
|
||||||
```
|
```
|
||||||
|
@ -233,7 +233,7 @@ Send POST request to localhost:<PORT>/serverControl
|
||||||
Response if success:
|
Response if success:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<mockPeeked xmlns="http://touk.pl/mockserver/api/response">
|
<mockPeeked xmlns="http://ztsh.eu/mockserver/api/response">
|
||||||
<mockEvent>
|
<mockEvent>
|
||||||
<request>
|
<request>
|
||||||
<text>...</text>
|
<text>...</text>
|
||||||
|
@ -265,7 +265,7 @@ Response if success:
|
||||||
Response with error message if failure:
|
Response with error message if failure:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<exceptionOccured xmlns="http://touk.pl/mockserver/api/response">...</exceptionOccured>
|
<exceptionOccured xmlns="http://ztsh.eu/mockserver/api/response">...</exceptionOccured>
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove mock
|
Remove mock
|
||||||
|
@ -284,7 +284,7 @@ List<MockEvent> mockEvents = remoteMockServer.removeMock('...', ...)
|
||||||
Send POST request to localhost:<PORT>/serverControl
|
Send POST request to localhost:<PORT>/serverControl
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<removeMock xmlns="http://touk.pl/mockserver/api/request">
|
<removeMock xmlns="http://ztsh.eu/mockserver/api/request">
|
||||||
<name>...</name>
|
<name>...</name>
|
||||||
<skipReport>...</skipReport>
|
<skipReport>...</skipReport>
|
||||||
</removeMock>
|
</removeMock>
|
||||||
|
@ -293,7 +293,7 @@ Send POST request to localhost:<PORT>/serverControl
|
||||||
Response if success (and skipReport not given or equal false):
|
Response if success (and skipReport not given or equal false):
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<mockRemoved xmlns="http://touk.pl/mockserver/api/response">
|
<mockRemoved xmlns="http://ztsh.eu/mockserver/api/response">
|
||||||
<mockEvent>
|
<mockEvent>
|
||||||
<request>
|
<request>
|
||||||
<text>...</text>
|
<text>...</text>
|
||||||
|
@ -325,13 +325,13 @@ Response if success (and skipReport not given or equal false):
|
||||||
If skipReport is set to true then response will be:
|
If skipReport is set to true then response will be:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<mockRemoved xmlns="http://touk.pl/mockserver/api/response"/>
|
<mockRemoved xmlns="http://ztsh.eu/mockserver/api/response"/>
|
||||||
```
|
```
|
||||||
|
|
||||||
Response with error message if failure:
|
Response with error message if failure:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<exceptionOccured xmlns="http://touk.pl/mockserver/api/response">...</exceptionOccured>
|
<exceptionOccured xmlns="http://ztsh.eu/mockserver/api/response">...</exceptionOccured>
|
||||||
```
|
```
|
||||||
|
|
||||||
List mocks definitions
|
List mocks definitions
|
||||||
|
@ -425,7 +425,7 @@ This response could be saved to file and passed as it is during mock server crea
|
||||||
Remote repository
|
Remote repository
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Mockserver is available at `philanthropist.touk.pl`.
|
Mockserver is available at `philanthropist.ztsh.eu`.
|
||||||
|
|
||||||
Just add repository to maven pom:
|
Just add repository to maven pom:
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ Just add repository to maven pom:
|
||||||
...
|
...
|
||||||
<repository>
|
<repository>
|
||||||
<id>touk</id>
|
<id>touk</id>
|
||||||
<url>https://philanthropist.touk.pl/nexus/content/repositories/releases</url>
|
<url>https://philanthropist.ztsh.eu/nexus/content/repositories/releases</url>
|
||||||
</repository>
|
</repository>
|
||||||
...
|
...
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<parent>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<artifactId>http-mock-server</artifactId>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>http-mock-server</artifactId>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>mockserver-api</artifactId>
|
<artifactId>mockserver-api</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
@ -18,19 +24,9 @@
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||||
<version>2.2</version>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>xjc</id>
|
<id>xjc</id>
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?xml version="1.0"?>
|
<bindings version="3.0"
|
||||||
<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
|
xmlns="https://jakarta.ee/xml/ns/jaxb"
|
||||||
xmlns:xjc= "http://java.sun.com/xml/ns/jaxb/xjc"
|
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
|
||||||
jxb:extensionBindingPrefixes="xjc" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
||||||
<jxb:bindings>
|
<globalBindings>
|
||||||
<jxb:globalBindings>
|
<xjc:simple/>
|
||||||
<xjc:simple/>
|
</globalBindings>
|
||||||
</jxb:globalBindings>
|
|
||||||
</jxb:bindings>
|
</bindings>
|
||||||
</jxb:bindings>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<xs:schema version="1.0" targetNamespace="http://touk.pl/mockserver/api/common" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
<xs:schema version="1.0" targetNamespace="http://ztsh.eu/mockserver/api/common" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
|
||||||
<xs:simpleType name="method">
|
<xs:simpleType name="method">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
<xs:enumeration value="HEAD"/>
|
<xs:enumeration value="HEAD"/>
|
||||||
<xs:enumeration value="OPTIONS"/>
|
<xs:enumeration value="OPTIONS"/>
|
||||||
<xs:enumeration value="PATCH"/>
|
<xs:enumeration value="PATCH"/>
|
||||||
|
<xs:enumeration value="ANY_METHOD" />
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://touk.pl/mockserver/api/request" xmlns:tns="http://touk.pl/mockserver/api/request" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:common="http://touk.pl/mockserver/api/common">
|
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://ztsh.eu/mockserver/api/request" xmlns:tns="http://ztsh.eu/mockserver/api/request" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:common="http://ztsh.eu/mockserver/api/common">
|
||||||
|
|
||||||
<xs:import namespace="http://touk.pl/mockserver/api/common" schemaLocation="common.xsd"/>
|
<xs:import namespace="http://ztsh.eu/mockserver/api/common" schemaLocation="common.xsd"/>
|
||||||
|
|
||||||
<xs:element name="addMock" type="tns:AddMock"/>
|
<xs:element name="addMock" type="tns:AddMock"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://touk.pl/mockserver/api/response" xmlns:tns="http://touk.pl/mockserver/api/response" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:common="http://touk.pl/mockserver/api/common">
|
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://ztsh.eu/mockserver/api/response" xmlns:tns="http://ztsh.eu/mockserver/api/response" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:common="http://ztsh.eu/mockserver/api/common">
|
||||||
|
|
||||||
<xs:import namespace="http://touk.pl/mockserver/api/common" schemaLocation="common.xsd"/>
|
<xs:import namespace="http://ztsh.eu/mockserver/api/common" schemaLocation="common.xsd"/>
|
||||||
|
|
||||||
<xs:element name="exceptionOccured" type="tns:exceptionOccured"/>
|
<xs:element name="exceptionOccured" type="tns:exceptionOccured"/>
|
||||||
|
|
|
@ -1,30 +1,44 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<parent>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<artifactId>http-mock-server</artifactId>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>http-mock-server</artifactId>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>mockserver-client</artifactId>
|
<artifactId>mockserver-client</artifactId>
|
||||||
|
|
||||||
<build>
|
|
||||||
<defaultGoal>clean install</defaultGoal>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>mockserver-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-json</artifactId>
|
<artifactId>groovy-json</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-xml</artifactId>
|
<artifactId>groovy-xml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
|
@ -33,9 +47,15 @@
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<artifactId>mockserver-api</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.gmavenplus</groupId>
|
||||||
|
<artifactId>gmavenplus-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse
|
import org.apache.http.client.methods.CloseableHttpResponse
|
||||||
import org.apache.http.client.methods.HttpGet
|
import org.apache.http.client.methods.HttpGet
|
||||||
|
@ -7,17 +7,17 @@ import org.apache.http.entity.ContentType
|
||||||
import org.apache.http.entity.StringEntity
|
import org.apache.http.entity.StringEntity
|
||||||
import org.apache.http.impl.client.CloseableHttpClient
|
import org.apache.http.impl.client.CloseableHttpClient
|
||||||
import org.apache.http.impl.client.HttpClients
|
import org.apache.http.impl.client.HttpClients
|
||||||
import pl.touk.mockserver.api.request.AddMock
|
import eu.ztsh.mockserver.api.request.AddMock
|
||||||
import pl.touk.mockserver.api.request.MockServerRequest
|
import eu.ztsh.mockserver.api.request.MockServerRequest
|
||||||
import pl.touk.mockserver.api.request.PeekMock
|
import eu.ztsh.mockserver.api.request.PeekMock
|
||||||
import pl.touk.mockserver.api.request.RemoveMock
|
import eu.ztsh.mockserver.api.request.RemoveMock
|
||||||
import pl.touk.mockserver.api.response.MockEventReport
|
import eu.ztsh.mockserver.api.response.MockEventReport
|
||||||
import pl.touk.mockserver.api.response.MockPeeked
|
import eu.ztsh.mockserver.api.response.MockPeeked
|
||||||
import pl.touk.mockserver.api.response.MockRemoved
|
import eu.ztsh.mockserver.api.response.MockRemoved
|
||||||
import pl.touk.mockserver.api.response.MockReport
|
import eu.ztsh.mockserver.api.response.MockReport
|
||||||
import pl.touk.mockserver.api.response.Mocks
|
import eu.ztsh.mockserver.api.response.Mocks
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext
|
import jakarta.xml.bind.JAXBContext
|
||||||
|
|
||||||
class RemoteMockServer {
|
class RemoteMockServer {
|
||||||
private final String address
|
private final String address
|
|
@ -1,17 +1,18 @@
|
||||||
package pl.touk.mockserver.client
|
package eu.ztsh.mockserver.client
|
||||||
|
|
||||||
import groovy.json.JsonSlurper
|
import groovy.json.JsonSlurper
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import groovy.transform.TypeChecked
|
import groovy.transform.TypeChecked
|
||||||
import groovy.util.slurpersupport.GPathResult
|
import groovy.xml.XmlSlurper
|
||||||
|
import groovy.xml.slurpersupport.GPathResult
|
||||||
import org.apache.http.HttpEntity
|
import org.apache.http.HttpEntity
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse
|
import org.apache.http.client.methods.CloseableHttpResponse
|
||||||
import org.apache.http.util.EntityUtils
|
import org.apache.http.util.EntityUtils
|
||||||
import pl.touk.mockserver.api.response.ExceptionOccured
|
import eu.ztsh.mockserver.api.response.ExceptionOccured
|
||||||
import pl.touk.mockserver.api.response.MockAdded
|
import eu.ztsh.mockserver.api.response.MockAdded
|
||||||
import pl.touk.mockserver.api.response.MockServerResponse
|
import eu.ztsh.mockserver.api.response.MockServerResponse
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext
|
import jakarta.xml.bind.JAXBContext
|
||||||
|
|
||||||
@CompileStatic
|
@CompileStatic
|
||||||
@TypeChecked
|
@TypeChecked
|
|
@ -1,53 +1,68 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>http-mock-server</artifactId>
|
<artifactId>http-mock-server</artifactId>
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<version>2.8.2</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>mockserver-tests</artifactId>
|
<artifactId>mockserver-tests</artifactId>
|
||||||
|
|
||||||
<build>
|
|
||||||
<defaultGoal>clean install</defaultGoal>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>mockserver</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<artifactId>spock-core</artifactId>
|
<artifactId>mockserver-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.groovy</groupId>
|
||||||
|
<artifactId>groovy</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<artifactId>mockserver</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<artifactId>mockserver-client</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>info.solidsoft.spock</groupId>
|
|
||||||
<artifactId>spock-global-unroll</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.gmavenplus</groupId>
|
||||||
|
<artifactId>gmavenplus-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.2.5</version>
|
||||||
|
<configuration>
|
||||||
|
<includes>
|
||||||
|
<include>**/*Test.java</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
package pl.touk.mockserver.tests
|
package eu.ztsh.mockserver.tests
|
||||||
|
|
||||||
import groovy.util.slurpersupport.GPathResult
|
import eu.ztsh.mockserver.api.common.Https
|
||||||
|
import eu.ztsh.mockserver.api.request.AddMock
|
||||||
|
import eu.ztsh.mockserver.client.RemoteMockServer
|
||||||
|
import eu.ztsh.mockserver.client.Util
|
||||||
|
import eu.ztsh.mockserver.server.HttpMockServer
|
||||||
|
import groovy.xml.slurpersupport.GPathResult
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse
|
import org.apache.http.client.methods.CloseableHttpResponse
|
||||||
import org.apache.http.client.methods.HttpPost
|
import org.apache.http.client.methods.HttpPost
|
||||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
|
||||||
|
@ -9,12 +14,8 @@ import org.apache.http.entity.ContentType
|
||||||
import org.apache.http.entity.StringEntity
|
import org.apache.http.entity.StringEntity
|
||||||
import org.apache.http.impl.client.CloseableHttpClient
|
import org.apache.http.impl.client.CloseableHttpClient
|
||||||
import org.apache.http.impl.client.HttpClients
|
import org.apache.http.impl.client.HttpClients
|
||||||
import pl.touk.mockserver.api.common.Https
|
|
||||||
import pl.touk.mockserver.api.request.AddMock
|
|
||||||
import pl.touk.mockserver.client.RemoteMockServer
|
|
||||||
import pl.touk.mockserver.client.Util
|
|
||||||
import pl.touk.mockserver.server.HttpMockServer
|
|
||||||
import spock.lang.AutoCleanup
|
import spock.lang.AutoCleanup
|
||||||
|
import spock.lang.Ignore
|
||||||
import spock.lang.Shared
|
import spock.lang.Shared
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ import javax.net.ssl.SSLContext
|
||||||
import javax.net.ssl.SSLHandshakeException
|
import javax.net.ssl.SSLHandshakeException
|
||||||
import java.security.KeyStore
|
import java.security.KeyStore
|
||||||
|
|
||||||
|
@Ignore
|
||||||
class MockServerHttpsTest extends Specification {
|
class MockServerHttpsTest extends Specification {
|
||||||
|
|
||||||
RemoteMockServer remoteMockServer = new RemoteMockServer('localhost', 19000)
|
RemoteMockServer remoteMockServer = new RemoteMockServer('localhost', 19000)
|
||||||
|
@ -46,6 +48,7 @@ class MockServerHttpsTest extends Specification {
|
||||||
.loadTrustMaterial(trustStore())
|
.loadTrustMaterial(trustStore())
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
@Ignore("TODO: SSL peer shut down incorrectly")
|
||||||
def 'should handle HTTPS server' () {
|
def 'should handle HTTPS server' () {
|
||||||
given:
|
given:
|
||||||
remoteMockServer.addMock(new AddMock(
|
remoteMockServer.addMock(new AddMock(
|
||||||
|
@ -70,6 +73,7 @@ class MockServerHttpsTest extends Specification {
|
||||||
restPostResponse.name() == 'goodResponse-request'
|
restPostResponse.name() == 'goodResponse-request'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("TODO: SSL peer shut down incorrectly")
|
||||||
def 'should handle HTTPS server with client auth' () {
|
def 'should handle HTTPS server with client auth' () {
|
||||||
given:
|
given:
|
||||||
remoteMockServer.addMock(new AddMock(
|
remoteMockServer.addMock(new AddMock(
|
|
@ -1,6 +1,6 @@
|
||||||
package pl.touk.mockserver.tests
|
package eu.ztsh.mockserver.tests
|
||||||
|
|
||||||
import groovy.util.slurpersupport.GPathResult
|
import groovy.xml.slurpersupport.GPathResult
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse
|
import org.apache.http.client.methods.CloseableHttpResponse
|
||||||
import org.apache.http.client.methods.HttpDelete
|
import org.apache.http.client.methods.HttpDelete
|
||||||
import org.apache.http.client.methods.HttpGet
|
import org.apache.http.client.methods.HttpGet
|
||||||
|
@ -15,20 +15,20 @@ import org.apache.http.entity.StringEntity
|
||||||
import org.apache.http.impl.client.CloseableHttpClient
|
import org.apache.http.impl.client.CloseableHttpClient
|
||||||
import org.apache.http.impl.client.HttpClients
|
import org.apache.http.impl.client.HttpClients
|
||||||
import org.apache.http.util.EntityUtils
|
import org.apache.http.util.EntityUtils
|
||||||
import pl.touk.mockserver.api.common.ImportAlias
|
import eu.ztsh.mockserver.api.common.ImportAlias
|
||||||
import pl.touk.mockserver.api.common.Method
|
import eu.ztsh.mockserver.api.common.Method
|
||||||
import pl.touk.mockserver.api.request.AddMock
|
import eu.ztsh.mockserver.api.request.AddMock
|
||||||
import pl.touk.mockserver.api.response.MockEventReport
|
import eu.ztsh.mockserver.api.response.MockEventReport
|
||||||
import pl.touk.mockserver.api.response.MockReport
|
import eu.ztsh.mockserver.api.response.MockReport
|
||||||
import pl.touk.mockserver.client.InvalidMockDefinition
|
import eu.ztsh.mockserver.client.InvalidMockDefinition
|
||||||
import pl.touk.mockserver.client.InvalidMockRequestSchema
|
import eu.ztsh.mockserver.client.InvalidMockRequestSchema
|
||||||
import pl.touk.mockserver.client.MockAlreadyExists
|
import eu.ztsh.mockserver.client.MockAlreadyExists
|
||||||
import pl.touk.mockserver.client.MockDoesNotExist
|
import eu.ztsh.mockserver.client.MockDoesNotExist
|
||||||
import pl.touk.mockserver.client.RemoteMockServer
|
import eu.ztsh.mockserver.client.RemoteMockServer
|
||||||
import pl.touk.mockserver.client.Util
|
import eu.ztsh.mockserver.client.Util
|
||||||
import pl.touk.mockserver.server.HttpMockServer
|
import eu.ztsh.mockserver.server.HttpMockServer
|
||||||
import spock.lang.AutoCleanup
|
import spock.lang.AutoCleanup
|
||||||
import spock.lang.Shared
|
import spock.lang.Ignore
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
class MockServerIntegrationTest extends Specification {
|
class MockServerIntegrationTest extends Specification {
|
||||||
|
@ -38,7 +38,6 @@ class MockServerIntegrationTest extends Specification {
|
||||||
@AutoCleanup('stop')
|
@AutoCleanup('stop')
|
||||||
HttpMockServer httpMockServer
|
HttpMockServer httpMockServer
|
||||||
|
|
||||||
@Shared
|
|
||||||
CloseableHttpClient client = HttpClients.createDefault()
|
CloseableHttpClient client = HttpClients.createDefault()
|
||||||
|
|
||||||
def setup() {
|
def setup() {
|
||||||
|
@ -67,6 +66,7 @@ class MockServerIntegrationTest extends Specification {
|
||||||
remoteMockServer.removeMock('testRest')?.size() == 1
|
remoteMockServer.removeMock('testRest')?.size() == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("TODO: restPostResponse.name()")
|
||||||
def "should add working rest mock on endpoint with utf"() {
|
def "should add working rest mock on endpoint with utf"() {
|
||||||
expect:
|
expect:
|
||||||
remoteMockServer.addMock(new AddMock(
|
remoteMockServer.addMock(new AddMock(
|
||||||
|
@ -1154,4 +1154,30 @@ class MockServerIntegrationTest extends Specification {
|
||||||
'test/other' | 'test/other'
|
'test/other' | 'test/other'
|
||||||
'/test/other' | 'test/other'
|
'/test/other' | 'test/other'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def 'should match any method'() {
|
||||||
|
given:
|
||||||
|
String name = "testRest-${UUID.randomUUID().toString()}"
|
||||||
|
remoteMockServer.addMock(new AddMock(
|
||||||
|
name: name,
|
||||||
|
path: 'any-method',
|
||||||
|
port: 9999,
|
||||||
|
statusCode: 201,
|
||||||
|
soap: false,
|
||||||
|
method: Method.ANY_METHOD
|
||||||
|
))
|
||||||
|
when:
|
||||||
|
CloseableHttpResponse response = client.execute(req)
|
||||||
|
then:
|
||||||
|
response.statusLine.statusCode == 201
|
||||||
|
Util.consumeResponse(response)
|
||||||
|
cleanup:
|
||||||
|
remoteMockServer.removeMock(name)
|
||||||
|
where:
|
||||||
|
req << [
|
||||||
|
new HttpGet('http://localhost:9999/any-method'),
|
||||||
|
new HttpPost('http://localhost:9999/any-method'),
|
||||||
|
new HttpPatch('http://localhost:9999/any-method')
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.tests
|
package eu.ztsh.mockserver.tests
|
||||||
|
|
||||||
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse
|
import org.apache.http.client.methods.CloseableHttpResponse
|
||||||
|
@ -7,11 +7,10 @@ import org.apache.http.entity.ContentType
|
||||||
import org.apache.http.entity.StringEntity
|
import org.apache.http.entity.StringEntity
|
||||||
import org.apache.http.impl.client.CloseableHttpClient
|
import org.apache.http.impl.client.CloseableHttpClient
|
||||||
import org.apache.http.impl.client.HttpClients
|
import org.apache.http.impl.client.HttpClients
|
||||||
import pl.touk.mockserver.api.request.AddMock
|
import eu.ztsh.mockserver.api.request.AddMock
|
||||||
import pl.touk.mockserver.client.RemoteMockServer
|
import eu.ztsh.mockserver.client.RemoteMockServer
|
||||||
import pl.touk.mockserver.server.HttpMockServer
|
import eu.ztsh.mockserver.server.HttpMockServer
|
||||||
import spock.lang.AutoCleanup
|
import spock.lang.AutoCleanup
|
||||||
import spock.lang.Shared
|
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
class MockServerMaxUsesTest extends Specification {
|
class MockServerMaxUsesTest extends Specification {
|
||||||
|
@ -21,7 +20,6 @@ class MockServerMaxUsesTest extends Specification {
|
||||||
@AutoCleanup('stop')
|
@AutoCleanup('stop')
|
||||||
HttpMockServer httpMockServer
|
HttpMockServer httpMockServer
|
||||||
|
|
||||||
@Shared
|
|
||||||
CloseableHttpClient client = HttpClients.createDefault()
|
CloseableHttpClient client = HttpClients.createDefault()
|
||||||
|
|
||||||
def setup() {
|
def setup() {
|
|
@ -1,54 +1,76 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<parent>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<artifactId>http-mock-server</artifactId>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>http-mock-server</artifactId>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>mockserver</artifactId>
|
<artifactId>mockserver</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>mockserver-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-json</artifactId>
|
<artifactId>groovy-json</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-xml</artifactId>
|
<artifactId>groovy-xml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-core</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-lang3</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<artifactId>mockserver-api</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean package assembly:single install</defaultGoal>
|
<defaultGoal>clean package assembly:single install</defaultGoal>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.gmavenplus</groupId>
|
||||||
|
<artifactId>gmavenplus-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>pl.touk.mockserver.server.Main</mainClass>
|
<mainClass>eu.ztsh.mockserver.server.Main</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
|
@ -57,16 +79,17 @@
|
||||||
<finalName>mockserver-full</finalName>
|
<finalName>mockserver-full</finalName>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-archive</id>
|
<id>create-archive</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpExchange
|
import com.sun.net.httpserver.HttpExchange
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
import groovy.util.logging.Slf4j
|
import groovy.util.logging.Slf4j
|
||||||
import pl.touk.mockserver.api.common.Method
|
import eu.ztsh.mockserver.api.common.Method
|
||||||
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList
|
import java.util.concurrent.CopyOnWriteArrayList
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpExchange
|
import com.sun.net.httpserver.HttpExchange
|
||||||
import groovy.util.logging.Slf4j
|
import groovy.util.logging.Slf4j
|
||||||
import pl.touk.mockserver.api.common.Https
|
import eu.ztsh.mockserver.api.common.Https
|
||||||
import pl.touk.mockserver.api.common.ImportAlias
|
import eu.ztsh.mockserver.api.common.ImportAlias
|
||||||
import pl.touk.mockserver.api.common.Method
|
import eu.ztsh.mockserver.api.common.Method
|
||||||
import pl.touk.mockserver.api.request.AddMock
|
import eu.ztsh.mockserver.api.request.AddMock
|
||||||
import pl.touk.mockserver.api.request.MockServerRequest
|
import eu.ztsh.mockserver.api.request.MockServerRequest
|
||||||
import pl.touk.mockserver.api.request.PeekMock
|
import eu.ztsh.mockserver.api.request.PeekMock
|
||||||
import pl.touk.mockserver.api.request.RemoveMock
|
import eu.ztsh.mockserver.api.request.RemoveMock
|
||||||
import pl.touk.mockserver.api.response.ExceptionOccured
|
import eu.ztsh.mockserver.api.response.ExceptionOccured
|
||||||
import pl.touk.mockserver.api.response.MockAdded
|
import eu.ztsh.mockserver.api.response.MockAdded
|
||||||
import pl.touk.mockserver.api.response.MockEventReport
|
import eu.ztsh.mockserver.api.response.MockEventReport
|
||||||
import pl.touk.mockserver.api.response.MockPeeked
|
import eu.ztsh.mockserver.api.response.MockPeeked
|
||||||
import pl.touk.mockserver.api.response.MockRemoved
|
import eu.ztsh.mockserver.api.response.MockRemoved
|
||||||
import pl.touk.mockserver.api.response.MockReport
|
import eu.ztsh.mockserver.api.response.MockReport
|
||||||
import pl.touk.mockserver.api.response.MockRequestReport
|
import eu.ztsh.mockserver.api.response.MockRequestReport
|
||||||
import pl.touk.mockserver.api.response.MockResponseReport
|
import eu.ztsh.mockserver.api.response.MockResponseReport
|
||||||
import pl.touk.mockserver.api.response.Mocks
|
import eu.ztsh.mockserver.api.response.Mocks
|
||||||
import pl.touk.mockserver.api.response.Parameter
|
import eu.ztsh.mockserver.api.response.Parameter
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext
|
import jakarta.xml.bind.JAXBContext
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import java.util.concurrent.CopyOnWriteArraySet
|
import java.util.concurrent.CopyOnWriteArraySet
|
||||||
import java.util.concurrent.Executor
|
import java.util.concurrent.Executor
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
|
||||||
import static pl.touk.mockserver.server.Util.createResponse
|
import static eu.ztsh.mockserver.server.Util.createResponse
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class HttpMockServer {
|
class HttpMockServer {
|
||||||
|
@ -79,22 +79,22 @@ class HttpMockServer {
|
||||||
|
|
||||||
void listMocks(HttpExchange ex) {
|
void listMocks(HttpExchange ex) {
|
||||||
Mocks mockListing = new Mocks(
|
Mocks mockListing = new Mocks(
|
||||||
mocks: listMocks().collect {
|
mocks: listMocks().collect {
|
||||||
new MockReport(
|
new MockReport(
|
||||||
name: it.name,
|
name: it.name,
|
||||||
path: it.path,
|
path: it.path,
|
||||||
port: it.port,
|
port: it.port,
|
||||||
predicate: it.predicateClosureText,
|
predicate: it.predicateClosureText,
|
||||||
response: it.responseClosureText,
|
response: it.responseClosureText,
|
||||||
responseHeaders: it.responseHeadersClosureText,
|
responseHeaders: it.responseHeadersClosureText,
|
||||||
soap: it.soap,
|
soap: it.soap,
|
||||||
method: it.method,
|
method: it.method,
|
||||||
statusCode: it.statusCode as int,
|
statusCode: it.statusCode as int,
|
||||||
schema: it.schema,
|
schema: it.schema,
|
||||||
imports: it.imports.collect { new ImportAlias(alias: it.key, fullClassName: it.value) },
|
imports: it.imports.collect { new ImportAlias(alias: it.key, fullClassName: it.value) },
|
||||||
preserveHistory: it.preserveHistory
|
preserveHistory: it.preserveHistory
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
createResponse(ex, mockListing, 200)
|
createResponse(ex, mockListing, 200)
|
||||||
}
|
}
|
||||||
|
@ -182,12 +182,12 @@ class HttpMockServer {
|
||||||
mock.preserveHistory = co.preserveHistory != false
|
mock.preserveHistory = co.preserveHistory != false
|
||||||
if (co.https) {
|
if (co.https) {
|
||||||
mock.https = new Https(
|
mock.https = new Https(
|
||||||
keystorePath: co.https.keystorePath ?: null,
|
keystorePath: co.https.keystorePath ?: null,
|
||||||
keystorePassword: co.https.keystorePassword,
|
keystorePassword: co.https.keystorePassword,
|
||||||
keyPassword: co.https.keyPassword,
|
keyPassword: co.https.keyPassword,
|
||||||
truststorePath: co.https.truststorePath,
|
truststorePath: co.https.truststorePath,
|
||||||
truststorePassword: co.https.truststorePassword,
|
truststorePassword: co.https.truststorePassword,
|
||||||
requireClientAuth: co.https?.requireClientAuth?.asBoolean() ?: false
|
requireClientAuth: co.https?.requireClientAuth?.asBoolean() ?: false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
mock.maxUses = co.maxUses ?: null
|
mock.maxUses = co.maxUses ?: null
|
||||||
|
@ -217,7 +217,7 @@ class HttpMockServer {
|
||||||
mockNames.remove(name)
|
mockNames.remove(name)
|
||||||
configuration.remove(name)
|
configuration.remove(name)
|
||||||
MockRemoved mockRemoved = new MockRemoved(
|
MockRemoved mockRemoved = new MockRemoved(
|
||||||
mockEvents: createMockEventReports(mockEvents)
|
mockEvents: createMockEventReports(mockEvents)
|
||||||
)
|
)
|
||||||
createResponse(ex, mockRemoved, 200)
|
createResponse(ex, mockRemoved, 200)
|
||||||
}
|
}
|
||||||
|
@ -225,23 +225,23 @@ class HttpMockServer {
|
||||||
private static List<MockEventReport> createMockEventReports(List<MockEvent> mockEvents) {
|
private static List<MockEventReport> createMockEventReports(List<MockEvent> mockEvents) {
|
||||||
return mockEvents.collect {
|
return mockEvents.collect {
|
||||||
new MockEventReport(
|
new MockEventReport(
|
||||||
request: new MockRequestReport(
|
request: new MockRequestReport(
|
||||||
text: it.request.text,
|
text: it.request.text,
|
||||||
headers: new MockRequestReport.Headers(headers: it.request.headers.collect {
|
headers: new MockRequestReport.Headers(headers: it.request.headers.collect {
|
||||||
new Parameter(name: it.key, value: it.value)
|
new Parameter(name: it.key, value: it.value)
|
||||||
}),
|
}),
|
||||||
queryParams: new MockRequestReport.QueryParams(queryParams: it.request.query.collect {
|
queryParams: new MockRequestReport.QueryParams(queryParams: it.request.query.collect {
|
||||||
new Parameter(name: it.key, value: it.value)
|
new Parameter(name: it.key, value: it.value)
|
||||||
}),
|
}),
|
||||||
path: new MockRequestReport.Path(pathParts: it.request.path)
|
path: new MockRequestReport.Path(pathParts: it.request.path)
|
||||||
),
|
),
|
||||||
response: new MockResponseReport(
|
response: new MockResponseReport(
|
||||||
statusCode: it.response.statusCode,
|
statusCode: it.response.statusCode,
|
||||||
text: it.response.text,
|
text: it.response.text,
|
||||||
headers: new MockResponseReport.Headers(headers: it.response.headers.collect {
|
headers: new MockResponseReport.Headers(headers: it.response.headers.collect {
|
||||||
new Parameter(name: it.key, value: it.value)
|
new Parameter(name: it.key, value: it.value)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ class HttpMockServer {
|
||||||
log.trace("Peeking mock $name")
|
log.trace("Peeking mock $name")
|
||||||
List<MockEvent> mockEvents = childServers.values().collect { it.peekMock(name) }.flatten() as List<MockEvent>
|
List<MockEvent> mockEvents = childServers.values().collect { it.peekMock(name) }.flatten() as List<MockEvent>
|
||||||
MockPeeked mockPeeked = new MockPeeked(
|
MockPeeked mockPeeked = new MockPeeked(
|
||||||
mockEvents: createMockEventReports(mockEvents)
|
mockEvents: createMockEventReports(mockEvents)
|
||||||
)
|
)
|
||||||
createResponse(ex, mockPeeked, 200)
|
createResponse(ex, mockPeeked, 200)
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpHandler
|
import com.sun.net.httpserver.HttpHandler
|
||||||
import com.sun.net.httpserver.HttpServer
|
import com.sun.net.httpserver.HttpServer
|
||||||
import com.sun.net.httpserver.HttpsServer
|
import com.sun.net.httpserver.HttpsServer
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
import groovy.util.logging.Slf4j
|
import groovy.util.logging.Slf4j
|
||||||
import pl.touk.mockserver.api.common.Https
|
import eu.ztsh.mockserver.api.common.Https
|
||||||
|
|
||||||
import javax.net.ssl.KeyManager
|
import javax.net.ssl.KeyManager
|
||||||
import javax.net.ssl.KeyManagerFactory
|
import javax.net.ssl.KeyManagerFactory
|
|
@ -1,9 +1,9 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpsConfigurator
|
import com.sun.net.httpserver.HttpsConfigurator
|
||||||
import com.sun.net.httpserver.HttpsParameters
|
import com.sun.net.httpserver.HttpsParameters
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import pl.touk.mockserver.api.common.Https
|
import eu.ztsh.mockserver.api.common.Https
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext
|
import javax.net.ssl.SSLContext
|
||||||
import javax.net.ssl.SSLParameters
|
import javax.net.ssl.SSLParameters
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import groovy.util.logging.Slf4j
|
import groovy.util.logging.Slf4j
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import groovy.transform.EqualsAndHashCode
|
import groovy.transform.EqualsAndHashCode
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
import groovy.util.logging.Slf4j
|
import groovy.util.logging.Slf4j
|
||||||
import org.codehaus.groovy.control.CompilerConfiguration
|
import org.codehaus.groovy.control.CompilerConfiguration
|
||||||
import org.codehaus.groovy.control.customizers.ImportCustomizer
|
import org.codehaus.groovy.control.customizers.ImportCustomizer
|
||||||
import pl.touk.mockserver.api.common.Https
|
import eu.ztsh.mockserver.api.common.Https
|
||||||
import pl.touk.mockserver.api.common.Method
|
import eu.ztsh.mockserver.api.common.Method
|
||||||
|
|
||||||
import javax.xml.XMLConstants
|
import javax.xml.XMLConstants
|
||||||
import javax.xml.transform.stream.StreamSource
|
import javax.xml.transform.stream.StreamSource
|
||||||
|
@ -60,7 +60,7 @@ class Mock implements Comparable<Mock> {
|
||||||
|
|
||||||
boolean match(Method method, MockRequest request) {
|
boolean match(Method method, MockRequest request) {
|
||||||
boolean usesCondition = hasLimitedUses() ? usesLeft > 0 : true
|
boolean usesCondition = hasLimitedUses() ? usesLeft > 0 : true
|
||||||
return usesCondition && this.method == method && predicate(request)
|
return usesCondition && (this.method == method || this.method == Method.ANY_METHOD) && predicate(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
MockResponse apply(MockRequest request) {
|
MockResponse apply(MockRequest request) {
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.Headers
|
import com.sun.net.httpserver.Headers
|
||||||
import groovy.json.JsonSlurper
|
import groovy.json.JsonSlurper
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
import groovy.util.slurpersupport.GPathResult
|
import groovy.xml.XmlSlurper
|
||||||
|
import groovy.xml.slurpersupport.GPathResult
|
||||||
import groovy.xml.XmlUtil
|
import groovy.xml.XmlUtil
|
||||||
|
|
||||||
@PackageScope
|
@PackageScope
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import groovy.transform.PackageScope
|
import groovy.transform.PackageScope
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package pl.touk.mockserver.server
|
package eu.ztsh.mockserver.server
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpExchange
|
import com.sun.net.httpserver.HttpExchange
|
||||||
import pl.touk.mockserver.api.response.MockAdded
|
import eu.ztsh.mockserver.api.response.MockAdded
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext
|
import jakarta.xml.bind.JAXBContext
|
||||||
|
|
||||||
class Util {
|
class Util {
|
||||||
|
|
308
mvnw
vendored
Executable file
308
mvnw
vendored
Executable file
|
@ -0,0 +1,308 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Apache Maven Wrapper startup batch script, version 3.2.0
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||||
|
. /usr/local/etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "$(uname)" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
|
||||||
|
else
|
||||||
|
JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=$(java-config --jre-home)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="$(which javac)"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=$(which readlink)
|
||||||
|
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="$(dirname "\"$javaExecutable\"")"
|
||||||
|
javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="$(readlink -f "\"$javaExecutable\"")"
|
||||||
|
fi
|
||||||
|
javaHome="$(dirname "\"$javaExecutable\"")"
|
||||||
|
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=$(cd "$wdir/.." || exit 1; pwd)
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
printf '%s' "$(cd "$basedir" || exit 1; pwd)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
# Remove \r in case we run on Windows within Git Bash
|
||||||
|
# and check out the repository with auto CRLF management
|
||||||
|
# enabled. Otherwise, we may read lines that are delimited with
|
||||||
|
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
|
||||||
|
# splitting rules.
|
||||||
|
tr -s '\r\n' ' ' < "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
log() {
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
printf '%s\n' "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
|
||||||
|
log "$MAVEN_PROJECTBASEDIR"
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if [ -r "$wrapperJarPath" ]; then
|
||||||
|
log "Found $wrapperJarPath"
|
||||||
|
else
|
||||||
|
log "Couldn't find $wrapperJarPath, downloading it ..."
|
||||||
|
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||||
|
else
|
||||||
|
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read -r key value; do
|
||||||
|
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
|
||||||
|
safeValue=$(echo "$value" | tr -d '\r')
|
||||||
|
case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
log "Downloading from: $wrapperUrl"
|
||||||
|
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
log "Found wget ... using wget"
|
||||||
|
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
log "Found curl ... using curl"
|
||||||
|
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
log "Falling back to using Java to download"
|
||||||
|
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaSource=$(cygpath --path --windows "$javaSource")
|
||||||
|
javaClass=$(cygpath --path --windows "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$javaSource" ]; then
|
||||||
|
if [ ! -e "$javaClass" ]; then
|
||||||
|
log " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaSource")
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
log " - Running MavenWrapperDownloader.java ..."
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
|
||||||
|
wrapperSha256Sum=""
|
||||||
|
while IFS="=" read -r key value; do
|
||||||
|
case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
|
||||||
|
esac
|
||||||
|
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ -n "$wrapperSha256Sum" ]; then
|
||||||
|
wrapperSha256Result=false
|
||||||
|
if command -v sha256sum > /dev/null; then
|
||||||
|
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
|
||||||
|
wrapperSha256Result=true
|
||||||
|
fi
|
||||||
|
elif command -v shasum > /dev/null; then
|
||||||
|
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
|
||||||
|
wrapperSha256Result=true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
|
||||||
|
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ $wrapperSha256Result = false ]; then
|
||||||
|
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
|
||||||
|
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
|
||||||
|
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086 # safe args
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
205
mvnw.cmd
vendored
Normal file
205
mvnw.cmd
vendored
Normal file
|
@ -0,0 +1,205 @@
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Apache Maven Wrapper startup batch script, version 3.2.0
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %WRAPPER_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
|
||||||
|
SET WRAPPER_SHA_256_SUM=""
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
|
||||||
|
)
|
||||||
|
IF NOT %WRAPPER_SHA_256_SUM%=="" (
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
|
||||||
|
"If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
|
||||||
|
" Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
|
||||||
|
" Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
|
||||||
|
" Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
|
||||||
|
" exit 1;"^
|
||||||
|
"}"^
|
||||||
|
"}"
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% ^
|
||||||
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||||
|
%MAVEN_OPTS% ^
|
||||||
|
%MAVEN_DEBUG_OPTS% ^
|
||||||
|
-classpath %WRAPPER_JAR% ^
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
|
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
cmd /C exit /B %ERROR_CODE%
|
|
@ -1,25 +1,25 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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">
|
||||||
<parent>
|
|
||||||
<artifactId>http-mock-server</artifactId>
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>http-mock-server</artifactId>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>mockserver-performance-tests</artifactId>
|
<artifactId>mockserver-performance-tests</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<artifactId>mockserver</artifactId>
|
<artifactId>mockserver</artifactId>
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<artifactId>mockserver-client</artifactId>
|
<artifactId>mockserver-client</artifactId>
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openjdk.jmh</groupId>
|
<groupId>org.openjdk.jmh</groupId>
|
||||||
<artifactId>jmh-core</artifactId>
|
<artifactId>jmh-core</artifactId>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package pl.touk.mockserver.client;
|
package eu.ztsh.mockserver.client;
|
||||||
|
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
@ -18,8 +18,8 @@ import org.openjdk.jmh.annotations.TearDown;
|
||||||
import org.openjdk.jmh.annotations.Warmup;
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import org.openjdk.jmh.infra.Blackhole;
|
import org.openjdk.jmh.infra.Blackhole;
|
||||||
import org.openjdk.jmh.infra.ThreadParams;
|
import org.openjdk.jmh.infra.ThreadParams;
|
||||||
import pl.touk.mockserver.api.request.AddMock;
|
import eu.ztsh.mockserver.api.request.AddMock;
|
||||||
import pl.touk.mockserver.server.HttpMockServer;
|
import eu.ztsh.mockserver.server.HttpMockServer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
172
pom.xml
172
pom.xml
|
@ -1,17 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
<groupId>pl.touk</groupId>
|
|
||||||
<artifactId>top</artifactId>
|
|
||||||
<version>1.0.7</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
|
||||||
<artifactId>http-mock-server</artifactId>
|
<artifactId>http-mock-server</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.8.2</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>mockserver-client</module>
|
<module>mockserver-client</module>
|
||||||
<module>mockserver</module>
|
<module>mockserver</module>
|
||||||
|
@ -21,58 +17,74 @@
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
|
<groovy.version>4.0.12</groovy.version>
|
||||||
<groovy.version>2.5.7</groovy.version>
|
<httpclient.version>4.5.13</httpclient.version>
|
||||||
<httpclient.version>4.3.6</httpclient.version>
|
<spock-core.version>2.2-groovy-4.0</spock-core.version>
|
||||||
<spock-core.version>1.3-groovy-2.5</spock-core.version>
|
|
||||||
<commons-lang3.version>3.3.2</commons-lang3.version>
|
<commons-lang3.version>3.3.2</commons-lang3.version>
|
||||||
<slf4j-api.version>1.7.7</slf4j-api.version>
|
<slf4j-api.version>1.7.30</slf4j-api.version>
|
||||||
<logback-classic.version>1.0.13</logback-classic.version>
|
<logback.version>1.3.12</logback.version>
|
||||||
<lombok.version>1.16.6</lombok.version>
|
<lombok.version>1.18.26</lombok.version>
|
||||||
|
<jaxb.version>4.0.4</jaxb.version>
|
||||||
|
|
||||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
<jmh.version>1.11.2</jmh.version>
|
<jmh.version>1.37</jmh.version>
|
||||||
<maven-release-plugin.version>2.5.2</maven-release-plugin.version>
|
<gmavenplus-plugin.version>3.0.2</gmavenplus-plugin.version>
|
||||||
<gmavenplus-plugin.version>1.4</gmavenplus-plugin.version>
|
<jaxb2-maven-plugin.version>3.1.0</jaxb2-maven-plugin.version>
|
||||||
<spock-global-unroll.version>0.5.1</spock-global-unroll.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:TouK/http-mock-server.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:TouK/http-mock-server.git</developerConnection>
|
|
||||||
<tag>http-mock-server-2.8.2</tag>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>mockserver-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>mockserver</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>eu.ztsh.mockserver</groupId>
|
||||||
|
<artifactId>mockserver-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-bom</artifactId>
|
||||||
|
<version>${jaxb.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
<version>${groovy.version}</version>
|
<version>${groovy.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-json</artifactId>
|
<artifactId>groovy-json</artifactId>
|
||||||
<version>${groovy.version}</version>
|
<version>${groovy.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.apache.groovy</groupId>
|
||||||
<artifactId>groovy-xml</artifactId>
|
<artifactId>groovy-xml</artifactId>
|
||||||
<version>${groovy.version}</version>
|
<version>${groovy.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${httpclient.version}</version>
|
<version>${httpclient.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.spockframework</groupId>
|
|
||||||
<artifactId>spock-core</artifactId>
|
|
||||||
<version>${spock-core.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
@ -83,20 +95,27 @@
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>${slf4j-api.version}</version>
|
<version>${slf4j-api.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-core</artifactId>
|
||||||
|
<version>${logback.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>${logback-classic.version}</version>
|
<version>${logback.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pl.touk.mockserver</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>mockserver-api</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${spock-core.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openjdk.jmh</groupId>
|
<groupId>org.openjdk.jmh</groupId>
|
||||||
|
@ -110,63 +129,32 @@
|
||||||
<version>${jmh.version}</version>
|
<version>${jmh.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>info.solidsoft.spock</groupId>
|
|
||||||
<artifactId>spock-global-unroll</artifactId>
|
|
||||||
<version>${spock-global-unroll.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||||
<configuration>
|
<version>${jaxb2-maven-plugin.version}</version>
|
||||||
<source>1.8</source>
|
</plugin>
|
||||||
<target>1.8</target>
|
<plugin>
|
||||||
</configuration>
|
<groupId>org.codehaus.gmavenplus</groupId>
|
||||||
</plugin>
|
<artifactId>gmavenplus-plugin</artifactId>
|
||||||
<plugin>
|
<version>${gmavenplus-plugin.version}</version>
|
||||||
<groupId>org.codehaus.gmavenplus</groupId>
|
<executions>
|
||||||
<artifactId>gmavenplus-plugin</artifactId>
|
<execution>
|
||||||
<version>${gmavenplus-plugin.version}</version>
|
<goals>
|
||||||
<executions>
|
<goal>compile</goal>
|
||||||
<execution>
|
<goal>compileTests</goal>
|
||||||
<goals>
|
</goals>
|
||||||
<goal>compile</goal>
|
</execution>
|
||||||
<goal>testCompile</goal>
|
</executions>
|
||||||
</goals>
|
</plugin>
|
||||||
</execution>
|
</plugins>
|
||||||
</executions>
|
</pluginManagement>
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>${maven-release-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<autoversionsubmodules>true</autoversionsubmodules>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<contributors>
|
|
||||||
<contributor>
|
|
||||||
<name>Dominik Przybysz</name>
|
|
||||||
<email>alien11689@gmail.com</email>
|
|
||||||
</contributor>
|
|
||||||
</contributors>
|
|
||||||
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>touk</id>
|
|
||||||
<name>TouK Open source repository</name>
|
|
||||||
<url>https://philanthropist.touk.pl/nexus/content/repositories/releases</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue