From b15ff9f3b9dfa61628f402432d81f5b5c2b05737 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 23 Sep 2022 21:08:26 +1000 Subject: [PATCH] improve testing Signed-off-by: Olivier Lamy --- .../invoker.properties | 0 .../pom.xml | 2 +- .../verify.groovy | 0 .../invoker.properties | 18 +++++++ .../MRELEASE-1104-stage-repo-only/pom.xml | 51 +++++++++++++++++++ .../verify.groovy | 26 ++++++++++ 6 files changed, 96 insertions(+), 1 deletion(-) rename maven-release-plugin/src/it/projects/stage/{MRELEASE-1104 => MRELEASE-1104-both-parameters}/invoker.properties (100%) rename maven-release-plugin/src/it/projects/stage/{MRELEASE-1104 => MRELEASE-1104-both-parameters}/pom.xml (97%) rename maven-release-plugin/src/it/projects/stage/{MRELEASE-1104 => MRELEASE-1104-both-parameters}/verify.groovy (100%) create mode 100644 maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/invoker.properties create mode 100644 maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/pom.xml create mode 100644 maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/verify.groovy diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104/invoker.properties b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/invoker.properties similarity index 100% rename from maven-release-plugin/src/it/projects/stage/MRELEASE-1104/invoker.properties rename to maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/invoker.properties diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104/pom.xml b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/pom.xml similarity index 97% rename from maven-release-plugin/src/it/projects/stage/MRELEASE-1104/pom.xml rename to maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/pom.xml index be320115b..0bbd41466 100644 --- a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104/pom.xml +++ b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.maven.plugin.release.its - mrelease-1104 + mrelease-1104-both-parameters 1.0-SNAPSHOT diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104/verify.groovy b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/verify.groovy similarity index 100% rename from maven-release-plugin/src/it/projects/stage/MRELEASE-1104/verify.groovy rename to maven-release-plugin/src/it/projects/stage/MRELEASE-1104-both-parameters/verify.groovy diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/invoker.properties b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/invoker.properties new file mode 100644 index 000000000..a5c864ac9 --- /dev/null +++ b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/invoker.properties @@ -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. + +invoker.goals = clean release:prepare release:stage -X \ No newline at end of file diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/pom.xml b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/pom.xml new file mode 100644 index 000000000..812a62ed7 --- /dev/null +++ b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.maven.plugin.release.its + mrelease-1104-stage-repo-only + 1.0-SNAPSHOT + + + scm:dummy|nul + scm:dummy|nul + + + + + + org.apache.maven.plugins + maven-release-plugin + @project.version@ + + + org.apache.maven.its.release + maven-scm-provider-dummy + 1.0 + + + + file://${project.build.directory}/dummy/staging + + + + + \ No newline at end of file diff --git a/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/verify.groovy b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/verify.groovy new file mode 100644 index 000000000..930fef4ae --- /dev/null +++ b/maven-release-plugin/src/it/projects/stage/MRELEASE-1104-stage-repo-only/verify.groovy @@ -0,0 +1,26 @@ +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.exists() + +assert buildLog.text.contains( "with additional arguments: -DaltDeploymentRepository=\"file://" ) + + +