From 92f432129dc9db480d13ec7cf454b70306512bf8 Mon Sep 17 00:00:00 2001 From: Vitalij Berdinskih Date: Thu, 18 Jan 2024 10:41:20 +0000 Subject: [PATCH] Update dependencies and site --- .gitlab-ci.yml | 1 - .mvn/wrapper/maven-wrapper.properties | 2 +- LICENSE | 2 +- changelog.md | 6 ++++ command-line/pom.xml | 2 +- .../command_line/HttpClientCommandLine.java | 6 ++-- .../ijhttp_tools/command_line/LogLevel.java | 3 +- maven-plugin/pom.xml | 4 +-- .../ijhttp_tools/maven_plugin/RunMojo.java | 24 ++++++++------ .../maven_plugin/RunMojoSlowTest.java | 2 +- pom.xml | 16 +++++----- readme.md | 2 +- spring-boot-test/pom.xml | 4 +-- .../AutoConfigureHttpClientCommandLine.java | 3 +- .../HttpClientCommandLineConfiguration.java | 8 +++-- .../HttpClientCommandLineParameters.java | 3 +- .../spring_boot_test/package-info.java | 3 ++ src/site/markdown/autoconfiguration.md | 2 +- src/site/markdown/changelog.md | 31 ------------------- src/site/markdown/contributing.md | 29 ----------------- src/site/markdown/index.md | 4 ++- src/site/markdown/maven-plugin.md | 2 +- src/site/site.xml | 13 ++++++-- 23 files changed, 69 insertions(+), 103 deletions(-) delete mode 100644 src/site/markdown/changelog.md delete mode 100644 src/site/markdown/contributing.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bf1866..b04a873 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,6 @@ test: reports: junit: - command-line/target/surefire-reports/TEST-*.xml - - command-line/target/failsafe-reports/TEST-*.xml - maven-plugin/target/surefire-reports/TEST-*.xml - maven-plugin/target/failsafe-reports/TEST-*.xml - spring-boot-test/target/surefire-reports/TEST-*.xml diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ac18401..346d645 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # 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.9.4/apache-maven-3.9.4-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/LICENSE b/LICENSE index 57af39e..8adbe63 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 bot-by + Copyright 2023-2024 bot-by Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/changelog.md b/changelog.md index d5b59cd..b954d71 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.2.1 - 2024-01-18 +### Fixed +- Deprecated methods in `commons-exec`. +### Updated +- Update dependencies + ## 1.2.0 - 2023-12-30 ### Added - Directories diff --git a/command-line/pom.xml b/command-line/pom.xml index fcad04d..bae8417 100644 --- a/command-line/pom.xml +++ b/command-line/pom.xml @@ -1,6 +1,6 @@ diff --git a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/AutoConfigureHttpClientCommandLine.java b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/AutoConfigureHttpClientCommandLine.java index fbc6e7a..299b0f6 100644 --- a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/AutoConfigureHttpClientCommandLine.java +++ b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/AutoConfigureHttpClientCommandLine.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Vitalij Berdinskih + * Copyright 2023-2024 bot-by * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ /** * HTTP Client Command Line autoconfiguration. * + * @author Vitalij Berdinskih * @since 1.1.0 */ @Target(ElementType.TYPE) diff --git a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineConfiguration.java b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineConfiguration.java index 31d7a6a..5b140f9 100644 --- a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineConfiguration.java +++ b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Vitalij Berdinskih + * Copyright 2023-2024 bot-by * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ import static java.util.Objects.nonNull; import java.nio.file.Path; +import java.time.Duration; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteWatchdog; import org.apache.commons.exec.Executor; @@ -35,6 +36,7 @@ * HTTP Client configuration provides {@linkplain org.apache.commons.exec.Executor executor} and * {@linkplain uk.bot_by.ijhttp_tools.command_line.HttpClientCommandLine command line} beans. * + * @author Vitalij Berdinskih * @since 1.1.0 */ @ConditionalOnWebApplication(type = Type.SERVLET) @@ -113,10 +115,10 @@ private static void handleTimeout(HttpClientCommandLineParameters parameters, @Bean @ConditionalOnMissingBean Executor executor(@Value("${ijhttp.timeout:-1}") int timeout) { - var executor = new DefaultExecutor(); + var executor = DefaultExecutor.builder().get(); if (timeout > 0) { - executor.setWatchdog(new ExecuteWatchdog(timeout)); + executor.setWatchdog(ExecuteWatchdog.builder().setTimeout(Duration.ofMillis(timeout)).get()); if (logger.isDebugEnabled()) { logger.debug(String.format("Set the watchdog (%s) ms", timeout)); } diff --git a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineParameters.java b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineParameters.java index f1d76d2..90abb95 100644 --- a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineParameters.java +++ b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/HttpClientCommandLineParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Vitalij Berdinskih + * Copyright 2023-2024 bot-by * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ /** * HTTP Client parameters. * + * @author Vitalij Berdinskih * @see HTTP Client CLI * @since 1.1.0 */ diff --git a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/package-info.java b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/package-info.java index 3035bb0..d76e52d 100644 --- a/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/package-info.java +++ b/spring-boot-test/src/main/java/uk/bot_by/ijhttp_tools/spring_boot_test/package-info.java @@ -11,5 +11,8 @@ *
{@link uk.bot_by.ijhttp_tools.spring_boot_test.HttpClientCommandLineParameters}
*
HTTP Client parameters from Spring Boot properties.
* + * + * @author Vitalij Berdinskih + * @since 1.1.0 */ package uk.bot_by.ijhttp_tools.spring_boot_test; \ No newline at end of file diff --git a/src/site/markdown/autoconfiguration.md b/src/site/markdown/autoconfiguration.md index 6cdc1e8..0e7e792 100644 --- a/src/site/markdown/autoconfiguration.md +++ b/src/site/markdown/autoconfiguration.md @@ -1,4 +1,4 @@ -# Srping Boot Test autoconfiguration +# Usage of the Srping Boot Test autoconfiguration **Important!** The autoconfiguration does not contain the HTTP client: you need to install it by yourself then add to `PATH`. You can also set the full path to the ijhttp diff --git a/src/site/markdown/changelog.md b/src/site/markdown/changelog.md deleted file mode 100644 index d5b59cd..0000000 --- a/src/site/markdown/changelog.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## 1.2.0 - 2023-12-30 -### Added -- Directories -### Updated -- Updated Spring Boot to 3.2.1 - -## 1.1.1 - 2023-12-20 -### Security -- CVE-2023-6378: A serialization vulnerability in logback receiver component part of logback version 1.4.11 allows an attacker to mount a Denial-Of-Service attack by sending poisoned data. - -## 1.1.0 - 2023-12-20 -### Added -- The proxy feature -- The report path -- Split Maven plugin and CLI builder modules -- The Spring Boot Test autoconfiguration - -## 1.0.1 - 2023-11-08 -### Fixed -- Environment variables, public and private, are added without handling quoting - -## 1.0.0 - 2023-05-05 -### Added -- Executor Mojo: reads the configuration then runs `ijhttp`. \ No newline at end of file diff --git a/src/site/markdown/contributing.md b/src/site/markdown/contributing.md deleted file mode 100644 index ed7bce8..0000000 --- a/src/site/markdown/contributing.md +++ /dev/null @@ -1,29 +0,0 @@ -# Contributing to ijhttp tools - -**ijhttp tools** is an open-source project and all contributions are welcome -to assist with its development and maintenance. - -## Issues (bug and feature tracker) - -Please report any bugs found, feature requests or other issues on -**ijhttp tools** [GitLab tracker][gitlab-issues] -or [GitHub tracker][github-issues]. - -When creating a new issue, try following [necolas's guidelines][issue-guidelines]. - -## Fork, patch and contribute code - -Feel free to fork **ijhttp tools**'s repository at [GitLab][bot-gitlab] -or [GitHub][bot-github] for your own use and updates. - -Contribute your fixes and new features back to the main codebase using -[GitLab merge requests][gitlab-merge-requests] -and [GitHub pull requests][github-pull-requests]. - -[gitlab-issues]: https://gitlab.com/bot-by/ijhttp-maven-plugin/-/issues -[github-issues]: https://github.com/bot-by/ijhttp-maven-plugin/issues -[issue-guidelines]: http://github.com/necolas/issue-guidelines/#readme -[bot-gitlab]: https://gitlab.com/bot-by/ijhttp-maven-plugin/ -[bot-github]: https://github.com/bot-by/ijhttp-maven-plugin/ -[gitlab-merge-requests]: https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html -[github-pull-requests]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 3fe9912..1d3b09a 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -1,4 +1,4 @@ -# ijhttp tools: Maven plugin and Spring Boot Test autoconfiguration +# Maven plugin and Spring Boot Test autoconfiguration for IntelliJ HTTP Client I had started with a Maven plugin to run HTTP requests on the integration-test phase using the [IntelliJ HTTP Client][http-client]. Later I added a Spring Boot Test autoconfiguration, @@ -44,6 +44,8 @@ Content-Type: application/json **IntelliJ HTTP Client** needs HTTP files to work. With **HTTP Client Command Line** you can set directories that contain such files. +## Usage + * [Maven plugin][maven-plugin] * [Spring Boot Test autoconfiguration][autoconfiguration] diff --git a/src/site/markdown/maven-plugin.md b/src/site/markdown/maven-plugin.md index 28dc2aa..86a04ca 100644 --- a/src/site/markdown/maven-plugin.md +++ b/src/site/markdown/maven-plugin.md @@ -1,4 +1,4 @@ -# Maven plugin +# Usage of the Maven plugin **Important!** The plugin does not contain the HTTP client: you need to install it by yourself then add to `PATH`. You can also set the full path to the ijhttp via the parameter `executable`. diff --git a/src/site/site.xml b/src/site/site.xml index 9430dca..8bed0dc 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,6 +1,6 @@ - + @@ -22,12 +24,16 @@ + + ]]> + @@ -63,12 +69,13 @@ + flatly General Info Code Releases - Run HTTP requests of integration tests. + ${project.description} Icons