From af8c615c0926f57c8dfd34d87e9160347021bc64 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sat, 28 Jan 2023 17:15:36 +0100 Subject: [PATCH] [MDEPLOY-224] DeployAtEnd - ITs use only in modules --- .../module1/pom.xml | 37 ++++++++ .../module2/pom.xml | 38 ++++++++ .../pom.xml | 87 +++++++++++++++++++ .../verify.groovy | 28 ++++++ 4 files changed, 190 insertions(+) create mode 100644 src/it/MDEPLOY-224_deploy-at-end-only-modules/module1/pom.xml create mode 100644 src/it/MDEPLOY-224_deploy-at-end-only-modules/module2/pom.xml create mode 100644 src/it/MDEPLOY-224_deploy-at-end-only-modules/pom.xml create mode 100644 src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy diff --git a/src/it/MDEPLOY-224_deploy-at-end-only-modules/module1/pom.xml b/src/it/MDEPLOY-224_deploy-at-end-only-modules/module1/pom.xml new file mode 100644 index 00000000..9f255085 --- /dev/null +++ b/src/it/MDEPLOY-224_deploy-at-end-only-modules/module1/pom.xml @@ -0,0 +1,37 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.mdeploy-224 + parent + 1.0 + + module1 + + + + org.apache.maven.plugins + maven-deploy-plugin + @project.version@ + + true + + + + + + diff --git a/src/it/MDEPLOY-224_deploy-at-end-only-modules/module2/pom.xml b/src/it/MDEPLOY-224_deploy-at-end-only-modules/module2/pom.xml new file mode 100644 index 00000000..081edc5a --- /dev/null +++ b/src/it/MDEPLOY-224_deploy-at-end-only-modules/module2/pom.xml @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.mdeploy-224 + parent + 1.0 + + module2 + pom + + + + + org.apache.maven.plugins + maven-deploy-plugin + @project.version@ + + true + + + + + diff --git a/src/it/MDEPLOY-224_deploy-at-end-only-modules/pom.xml b/src/it/MDEPLOY-224_deploy-at-end-only-modules/pom.xml new file mode 100644 index 00000000..f40c64ac --- /dev/null +++ b/src/it/MDEPLOY-224_deploy-at-end-only-modules/pom.xml @@ -0,0 +1,87 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mdeploy-224 + parent + 1.0 + pom + + + Tests deployment at end only in modules. + + + + true + + + + + it + file:///${basedir}/target/repo + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + @mavenCompilerPluginVersion@ + + + org.apache.maven.plugins + maven-deploy-plugin + @project.version@ + + false + + + + org.apache.maven.plugins + maven-install-plugin + @mavenInstallPluginVersion@ + + + org.apache.maven.plugins + maven-jar-plugin + @mavenJarPluginVersion@ + + + org.apache.maven.plugins + maven-resources-plugin + @mavenResourcesPluginVersion@ + + + org.apache.maven.plugins + maven-surefire-plugin + @mavenSurefirePluginVersion@ + + + + + + module1 + module2 + + diff --git a/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy b/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy new file mode 100644 index 00000000..ee4e5e75 --- /dev/null +++ b/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy @@ -0,0 +1,28 @@ +/* + * 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. + */ + +assert new File( basedir, "target/repo/org/apache/maven/its/mdeploy-224/parent/1.0/parent-1.0.pom" ).exists() +assert new File( basedir, "module1/target/repo/org/apache/maven/its/mdeploy-224/module1/1.0/module1-1.0.pom" ).exists() +assert new File( basedir, "module2/target/repo/org/apache/maven/its/mdeploy-224/module2/1.0/module2-1.0.pom" ).exists() + +def buildLog = new File ( basedir, "build.log").text + +assert ! buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:parent:1.0 at end') +assert buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:module1:1.0 at end') +assert buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:module2:1.0 at end')