Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 9512 invoked from network); 4 Dec 2010 23:24:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Dec 2010 23:24:46 -0000 Received: (qmail 39082 invoked by uid 500); 4 Dec 2010 23:24:46 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 39014 invoked by uid 500); 4 Dec 2010 23:24:46 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 39007 invoked by uid 99); 4 Dec 2010 23:24:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 23:24:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 23:24:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6735223888CF; Sat, 4 Dec 2010 23:24:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042262 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-2738/ Date: Sat, 04 Dec 2010 23:24:21 -0000 To: commits@maven.apache.org From: bentmann@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101204232421.6735223888CF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bentmann Date: Sat Dec 4 23:24:20 2010 New Revision: 1042262 URL: http://svn.apache.org/viewvc?rev=1042262&view=rev Log: [MNG-2738] 1-char profile names cannot be activated with -P o Added IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml (with props) Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=1042262&r1=1042261&r2=1042262&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Sat Dec 4 23:24:20 2010 @@ -451,6 +451,7 @@ public class IntegrationTestSuite suite.addTestSuite( MavenITmng2744checksumVerificationTest.class ); suite.addTestSuite( MavenITmng2741PluginMetadataResolutionErrorMessageTest.class ); suite.addTestSuite( MavenITmng2739RequiredRepositoryElementsTest.class ); + suite.addTestSuite( MavenITmng2738ProfileIdCollidesWithCliOptionTest.class ); suite.addTestSuite( MavenITmng2720SiblingClasspathArtifactsTest.class ); suite.addTestSuite( MavenITmng2695OfflinePluginSnapshotsTest.class ); suite.addTestSuite( MavenITmng2693SitePluginRealmTest.class ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java?rev=1042262&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java Sat Dec 4 23:24:20 2010 @@ -0,0 +1,61 @@ +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; + +/** + * This is a test set for MNG-2738. + * + * @author Benjamin Bentmann + */ +public class MavenITmng2738ProfileIdCollidesWithCliOptionTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng2738ProfileIdCollidesWithCliOptionTest() + { + super( "[2.1.0,3.0-alpha-1),[3.0,)" ); + } + + /** + * Verify that the CLI parsing properly handles activation of profiles whose id happens to match a short command + * line option. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2738" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.getCliOptions().add( "-Pe" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertFilePresent( "target/touch.txt" ); + } + +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2738ProfileIdCollidesWithCliOptionTest.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml?rev=1042262&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml Sat Dec 4 23:24:20 2010 @@ -0,0 +1,62 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng2738 + test + 0.1 + + Maven Integration Test :: MNG-2738 + + Verify that the CLI parsing properly handles activation of profiles whose id happens to match a short command + line option. + + + + + + e + + + + org.apache.maven.its.plugins + maven-it-plugin-log-file + 2.1-SNAPSHOT + + + default + validate + + reset + + + target/touch.txt + + + + + + + + + Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2738/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision