Skip to content

Commit da2abe0

Browse files
committed
build: use mise instead of Maven Wrapper to set up Maven locally
Generated with: $ MISE_DISABLE_BACKENDS=asdf mise use [email protected] See also: jdx/mise#4177 Part of #1748
1 parent 15460b5 commit da2abe0

File tree

12 files changed

+18
-629
lines changed

12 files changed

+18
-629
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ coder_rsa
5353
mystamps_rsa
5454
prod_vars.yml
5555

56-
# maven-wrapper
57-
.mvn/wrapper/maven-wrapper.jar
58-
5956
# @asm0dey uses molecule for role testing which generates .pyc files
6057
# and also creates molecule directory
6158
*.pyc

.mvn/wrapper/MavenWrapperDownloader.java

-117
This file was deleted.

.mvn/wrapper/maven-wrapper.properties

-2
This file was deleted.

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ You can look at it and try on https://my-stamps.ru
2525
If you are programmer/sysadmin or you just feeling that you are able to run a local version of the site then follow the following instructions:
2626
If you want to run it locally, follow the instructions:
2727

28-
* install JDK (at least 8th version is required)
28+
* install JDK (8th version is required) and Maven
29+
* the preferred way to set up tools is to use [`mise`](https://mise.jdx.dev/getting-started.html). After its activation, the required tools will be installed automatically
2930
* clone this project
30-
* from the console inside the directory with source code, execute the command `./mvnw spring-boot:run`
31+
* from the console inside the directory with source code, execute the command `mvn spring-boot:run`
3132
* open up `http://127.0.0.1:8080` in a browser
3233
* browse the site or log in as one of the pre-created users: `admin`, `paid`, or `coder` with password `test`
3334
* press `Ctrl-C` to stop the server

docs/robotframework.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Faster Iterations
44

5-
As we already know, `./mvnw verify` runs all the integration tests. But let's
5+
As we already know, `mvn verify` runs all the integration tests. But let's
66
suppose that we are working on a single test and we need to run it many times
77
until it will work as desired. In this case, we would like to iterate faster
88
and at least don't run all the tests, but the only one that we are working on.
@@ -11,11 +11,11 @@ In this case we can (temporary) mark the test with a unique tag, let’s say
1111
`testme`, and ask `robotframework-maven-plugin` to execute only tests with such
1212
a tag:
1313
```console
14-
./mvnw verify -Dincludes=testme
14+
mvn verify -Dincludes=testme
1515
```
1616

1717
Now we run much less tests but could we make the execution even faster? Sure,
18-
we can! Let's look on what exactly `./mvnw verify` does:
18+
we can! Let's look on what exactly `mvn verify` does:
1919
1) it runs the application (this in turn includes many steps, like code
2020
compilation, preparation of the resources, running unit tests and so on)
2121
2) it runs [Wiremock server](wiremock.md) that is required by some tests
@@ -28,14 +28,14 @@ execute all the steps that we need:
2828

2929
1) run the application:
3030
```console
31-
./mvnw spring-boot:run
31+
mvn spring-boot:run
3232
```
3333
2) in another terminal, run Wiremock server, only if your test need it:
3434
```console
35-
./mvnw wiremock:run -Dwiremock.keepRunning=true
35+
mvn wiremock:run -Dwiremock.keepRunning=true
3636
```
3737
3) in another terminal, run integration tests as many times as you need:
3838
```console
39-
./mvnw robotframework:run -Dincludes=testme
39+
mvn robotframework:run -Dincludes=testme
4040
```
4141

docs/wiremock.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ WireMock is a simulator for HTTP-based APIs. We use this tool in the integration
55
external services. For example, for testing import of the stamps series from sites.
66

77
## Running on CI
8-
WireMock is automatically running/stopping during integration tests execution (`./mvnw verify`).
8+
WireMock is automatically running/stopping during integration tests execution (`mvn verify`).
99

1010
## Running manually
1111
In order to run the server as a standalone process:
1212
```console
13-
$ ./mvnw wiremock:run -Dwiremock.keepRunning=true
13+
$ mvn wiremock:run -Dwiremock.keepRunning=true
1414
```
1515

1616
After that the mock server will be available on 8888 port.

infra/docker/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ possible configurations, we support only those that are typically used:
55

66
* **a single container** where the application is running with `test` profile.
77
In this mode, it also runs in-memory database H2. This is roughly the same as
8-
executing `./mvnw spring-boot:run` command but inside a Docker container.
8+
executing `mvn spring-boot:run` command but inside a Docker container.
99

1010
* Create a WAR file and build the image `phpcoder/mystamps:latest`:
1111
```console
12-
$ ./mvnw package dockerfile:build
12+
$ mvn package dockerfile:build
1313
```
1414
* Run a container with `docker compose`:
1515
```console

mise.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
maven = "3.6.3"

0 commit comments

Comments
 (0)