From b60709f545accb8b4174884a302c7d318fa4474b Mon Sep 17 00:00:00 2001 From: Vitalij Berdinskih Date: Wed, 8 Nov 2023 22:49:54 +0200 Subject: [PATCH] Environment variables, public and private, are added withoug handling quoting * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 (#41) Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update dependencies and Maven Wrapper, add the code style, remove IDEA project * Bump mockito.version from 5.5.0 to 5.6.0 (#43) Bumps `mockito.version` from 5.5.0 to 5.6.0. Updates `org.mockito:mockito-core` from 5.5.0 to 5.6.0 - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0) Updates `org.mockito:mockito-junit-jupiter` from 5.5.0 to 5.6.0 - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11 (#44) Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump plugin-annotations.version from 3.9.0 to 3.10.1 (#45) Bumps `plugin-annotations.version` from 3.9.0 to 3.10.1. Updates `org.apache.maven.plugin-tools:maven-plugin-annotations` from 3.9.0 to 3.10.1 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.9.0...maven-plugin-tools-3.10.1) Updates `org.apache.maven.plugins:maven-plugin-plugin` from 3.9.0 to 3.10.1 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.9.0...maven-plugin-tools-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.maven.plugins:maven-plugin-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.1.2 to 3.2.1 (#48) Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-failsafe-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.1 to 3.3.2 (#47) Bumps [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.3.1...maven-clean-plugin-3.3.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.1 (#46) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mockito.version from 5.6.0 to 5.7.0 (#49) Bumps `mockito.version` from 5.6.0 to 5.7.0. Updates `org.mockito:mockito-core` from 5.6.0 to 5.7.0 - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0) Updates `org.mockito:mockito-junit-jupiter` from 5.6.0 to 5.7.0 - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.0 to 3.6.2 (#56) Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.0 to 3.6.2. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.0...maven-javadoc-plugin-3.6.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.2.1 to 3.2.2 (#55) Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-failsafe-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump plugin-annotations.version from 3.10.1 to 3.10.2 (#54) Bumps `plugin-annotations.version` from 3.10.1 to 3.10.2. Updates `org.apache.maven.plugin-tools:maven-plugin-annotations` from 3.10.1 to 3.10.2 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.10.1...maven-plugin-tools-3.10.2) Updates `org.apache.maven.plugins:maven-plugin-plugin` from 3.10.1 to 3.10.2 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.10.1...maven-plugin-tools-3.10.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.plugins:maven-plugin-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 (#53) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump junit-jupiter.version from 5.10.0 to 5.10.1 (#52) Bumps `junit-jupiter.version` from 5.10.0 to 5.10.1. Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.0 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.0 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.10.0 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Environment variables, public and private, are added withoug handling quoting --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 16 ++++++++-------- .../ijhttp_maven_plugin/RunMojo.java | 4 ++-- .../ijhttp_maven_plugin/RunMojoFastTest.java | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index e269962..4381e02 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ maven-clean-plugin org.apache.maven.plugins - 3.3.1 + 3.3.2 maven-enforcer-plugin @@ -128,7 +128,7 @@ org.apache.maven.plugins - 3.1.2 + 3.2.2 maven-jar-plugin @@ -156,7 +156,7 @@ org.apache.maven.plugins - 3.1.2 + 3.2.2 jacoco-maven-plugin @@ -234,7 +234,7 @@ org.jacoco - 0.8.10 + 0.8.11 @@ -552,11 +552,11 @@ https://gitlab.com/bot-by/ijhttp-maven-plugin/-/releases 17 - 3.6.0 - 5.10.0 + 3.6.2 + 5.10.1 3.8.5 - 5.5.0 - 3.9.0 + 5.7.0 + 3.10.2 3.9.4 UTF-8 UTF-8 diff --git a/src/main/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojo.java b/src/main/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojo.java index d6a3194..1a887a5 100644 --- a/src/main/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojo.java +++ b/src/main/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojo.java @@ -376,7 +376,7 @@ private void environment(CommandLine commandLine) throws IOException { } if (nonNull(environmentVariables)) { environmentVariables.forEach( - variable -> commandLine.addArgument(ENV_VARIABLES).addArgument(variable)); + variable -> commandLine.addArgument(ENV_VARIABLES).addArgument(variable, false)); } } @@ -443,7 +443,7 @@ private void privateEnvironment(CommandLine commandLine) throws IOException { } if (nonNull(privateEnvironmentVariables)) { privateEnvironmentVariables.forEach( - variable -> commandLine.addArgument(PRIVATE_ENV_VARIABLES).addArgument(variable)); + variable -> commandLine.addArgument(PRIVATE_ENV_VARIABLES).addArgument(variable, false)); } } diff --git a/src/test/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojoFastTest.java b/src/test/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojoFastTest.java index a1ebe59..0edc199 100644 --- a/src/test/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojoFastTest.java +++ b/src/test/java/uk/bot_by/maven_plugin/ijhttp_maven_plugin/RunMojoFastTest.java @@ -410,8 +410,10 @@ void fileArguments(String testName, File environmentFile, File privateEnvironmen @DisplayName("Multi-value arguments") @ParameterizedTest @CsvSource(value = {"single environment variable,abc=123,N/A,--env-variables/abc=123/*", + "environment variable with spaces,abc=name surname,N/A,--env-variables/abc=name surname/*", "multi environment variables,abc=123/qwerty=xzy,N/A,--env-variables/abc=123/--env-variables/qwerty=xzy/*", "single private environment variable,N/A,qwerty=xzy,--private-env-variables/qwerty=xzy/*", + "private environment variable with spaces,N/A,qwerty=xzy abc,--private-env-variables/qwerty=xzy abc/*", "multi environment variables,N/A,abc=123/qwerty=xzy,--private-env-variables/abc=123/--private-env-variables/qwerty=xzy/*"}, nullValues = "N/A") void multiValueArguments(String testName, @ConvertWith(SlashyStringToListConverter.class) List environmentVariables,