From 082ee1efeacb6300dd490da38d211ea6e2b36b51 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 7 Oct 2008 22:09:31 +0000 Subject: [PATCH] o Added bootstrap project to populate local repo with required snapshot plugins git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@702655 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/it/IntegrationTestSuite.java | 5 + .../apache/maven/it/MavenITBootstrapTest.java | 51 ++++ .../src/test/resources/bootstrap/pom.xml | 274 ++++++++++++++++++ .../src/test/resources/it0031/settings.xml | 39 +++ 4 files changed, 369 insertions(+) create mode 100644 its/core-it-suite/src/test/java/org/apache/maven/it/MavenITBootstrapTest.java create mode 100644 its/core-it-suite/src/test/resources/bootstrap/pom.xml diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index ceabfc9186..55112a94ee 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -58,6 +58,11 @@ public class IntegrationTestSuite TestSuite suite = new TestSuite(); + /* + * This must be the first one to ensure the local repository is properly setup. + */ + suite.addTestSuite( MavenITBootstrapTest.class ); + /* * Add tests in reverse alpha order by number below. This makes testing new * ITs quicker and since it counts down to zero, it's easier to judge how close diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITBootstrapTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITBootstrapTest.java new file mode 100644 index 0000000000..62038d3566 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITBootstrapTest.java @@ -0,0 +1,51 @@ +package org.apache.maven.it; + +/* + * 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. + */ + +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +import java.io.File; + +/** + * + * @author Benjamin Bentmann + * @version $Id$ + */ +public class MavenITBootstrapTest + extends AbstractMavenIntegrationTestCase +{ + + /** + * Bootstraps the integration tests by downloading required artifacts. + */ + public void testBootstrap() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/bootstrap" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.executeGoal( "compile" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + } + +} diff --git a/its/core-it-suite/src/test/resources/bootstrap/pom.xml b/its/core-it-suite/src/test/resources/bootstrap/pom.xml new file mode 100644 index 0000000000..d2a4a8e063 --- /dev/null +++ b/its/core-it-suite/src/test/resources/bootstrap/pom.xml @@ -0,0 +1,274 @@ + + + + + + 4.0.0 + + org.apache.maven.its.bootstrap + maven-it-boostrap + 1.0 + jar + + Maven Integration Test :: Boostrap + + This project pulls down all the snapshot plugins required for the IT suite. Due to MNG-2974, snapshot versions of + plugins cannot be downloaded by Maven from non-default repositories configured in the POM if the plugin is invoked + directly from the command line. Also, having this in a central place spares us from copying the snapshot repo + config all around in the IT POMs. + + + + + + apache.snapshots + Apache Snapshot Repository + http://people.apache.org/repo/m2-snapshot-repository + + true + + + true + + + + + + apache.snapshots + Apache Snapshot Repository + http://people.apache.org/repo/m2-snapshot-repository + + true + + + true + + + + + + 2.1-SNAPSHOT + 0.1-stub-SNAPSHOT + + + + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-configuration + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-context-passing + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-dependency-resolution + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-expression + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-file + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-fork + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-generate-envar-properties + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-generate-properties + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-loadable + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-no-project + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-packaging + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-parameter-implementation + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-project-interpolation + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-setter + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-touch + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-uses-properties + ${itPluginVersion} + compile + + + org.apache.maven.its.plugins + maven-it-plugin-uses-wagon + ${itPluginVersion} + compile + + + + + org.apache.maven.plugins + maven-clean-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-compiler-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-deploy-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-ear-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-ejb-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-install-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-jar-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-javadoc-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-plugin-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-rar-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-resources-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-site-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-source-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-surefire-plugin + ${stubPluginVersion} + compile + + + org.apache.maven.plugins + maven-war-plugin + ${stubPluginVersion} + compile + + + diff --git a/its/core-it-suite/src/test/resources/it0031/settings.xml b/its/core-it-suite/src/test/resources/it0031/settings.xml index 56868179b6..b809c4ab8b 100644 --- a/its/core-it-suite/src/test/resources/it0031/settings.xml +++ b/its/core-it-suite/src/test/resources/it0031/settings.xml @@ -2,4 +2,43 @@ org.apache.maven.its.plugins + + + + MNG-2974-workaround + + true + + + + + apache.snapshots + Apache Snapshot Repository + http://people.apache.org/repo/m2-snapshot-repository + + true + + + true + + + + + + apache.snapshots + Apache Snapshot Repository + http://people.apache.org/repo/m2-snapshot-repository + + true + + + true + + + + +