Author: olamy
Date: Mon Dec  5 10:37:48 2011
New Revision: 1210404

URL: http://svn.apache.org/viewvc?rev=1210404&view=rev
Log:
enhance it to add a use where a SNAPSHOT has been installed locally and ensure 
now it's a -SNAPSHOT rather than a timestamped one.

Added:
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
   (with props)
Modified:
    
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0146InstallerSnapshotNaming.java
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/pom.xml

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0146InstallerSnapshotNaming.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0146InstallerSnapshotNaming.java?rev=1210404&r1=1210403&r2=1210404&view=diff
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0146InstallerSnapshotNaming.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0146InstallerSnapshotNaming.java
 Mon Dec  5 10:37:48 2011
@@ -19,21 +19,16 @@ package org.apache.maven.it;
  * under the License.
  */
 
-import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
 import org.mortbay.jetty.Handler;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.handler.DefaultHandler;
 import org.mortbay.jetty.handler.HandlerList;
 import org.mortbay.jetty.handler.ResourceHandler;
-import org.mortbay.resource.FileResource;
-import org.mortbay.resource.Resource;
 
 import java.io.File;
 import java.io.IOException;
 import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
 import java.util.Properties;
 
 public class MavenIT0146InstallerSnapshotNaming
@@ -60,7 +55,6 @@ public class MavenIT0146InstallerSnapsho
 
         ResourceHandler resourceHandler = new ResourceHandler();
         resourceHandler.setResourceBase( new File( testDir, "repo" 
).getAbsolutePath() );
-       // org/apache/maven/its/it0146/dep/0.1-SNAPSHOT/maven-metadata.xml
         HandlerList handlers = new HandlerList();
         handlers.setHandlers( new Handler[]{ resourceHandler, new 
DefaultHandler() } );
 
@@ -73,7 +67,6 @@ public class MavenIT0146InstallerSnapsho
     }
 
 
-
     protected void tearDown()
         throws Exception
     {
@@ -102,7 +95,6 @@ public class MavenIT0146InstallerSnapsho
 
         verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", 
properties );
 
-
         verifier.getCliOptions().add( "--settings" );
         verifier.getCliOptions().add( "settings.xml" );
 
@@ -120,4 +112,44 @@ public class MavenIT0146InstallerSnapsho
 
     }
 
+
+    public void testitNonTimestampedNameWithInstalledSNAPSHOT()
+        throws Exception
+    {
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.deleteArtifacts( "org.apache.maven.its.it0146" );
+        verifier.getCliOptions().add( "-f" );
+        verifier.getCliOptions().add( "project/pom.xml" );
+        verifier.deleteDirectory( "project/target" );
+        verifier.setLogFileName( "log2.txt" );
+
+        verifier.executeGoal( "install" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier = newVerifier( testDir.getAbsolutePath() );
+
+        Properties properties = verifier.newDefaultFilterProperties();
+        properties.setProperty( "@host@", 
InetAddress.getLocalHost().getCanonicalHostName() );
+        properties.setProperty( "@port@", Integer.toString( port ) );
+
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", 
properties );
+
+        verifier.getCliOptions().add( "--settings" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.setLogFileName( "log3.txt" );
+
+
+        verifier.getCliOptions().add( "-X" );
+
+        verifier.deleteDirectory( "target" );
+
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertFilePresent( 
"target/appassembler/repo/dep-0.1-SNAPSHOT.jar" );
+
+    }
 }

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/pom.xml?rev=1210404&r1=1210403&r2=1210404&view=diff
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/pom.xml
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/pom.xml
 Mon Dec  5 10:37:48 2011
@@ -29,6 +29,7 @@ under the License.
   <name>Maven Integration Test :: it-0146</name>
   <description>
     Verify that download remote snapshot are correctly installed locally via 
Installer with timestamped name.
+    see issue related in this thread: 
http://mail-archives.apache.org/mod_mbox/maven-dev/201112.mbox/%3ccapcjjnhjsqed0tzuztwwtqcspyvn_k0-0xq2b7qxtn5arz-...@mail.gmail.com%3e
   </description>
 
   <dependencies>

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml?rev=1210404&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
 Mon Dec  5 10:37:48 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.it0146</groupId>
+  <artifactId>dep</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+</project>

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt?rev=1210404&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
 Mon Dec  5 10:37:48 2011
@@ -0,0 +1 @@
+empty file
\ No newline at end of file

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0146/project/src/main/resources/empty.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to