You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/09/30 23:23:54 UTC
svn commit: r700584 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/it0069/ resources/it0069/repo/
resources/it0069/repo/org/ resources/it0069/repo/org/apache/
resources/it0069/repo/org/apache/mave...
Author: bentmann
Date: Tue Sep 30 14:23:53 2008
New Revision: 700584
URL: http://svn.apache.org/viewvc?rev=700584&view=rev
Log:
o Decoupled it0069 from production dependency
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.jar (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.pom
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml (with props)
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/src/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java?rev=700584&r1=700583&r2=700584&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java Tue Sep 30 14:23:53 2008
@@ -37,15 +37,50 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0069" );
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List cliOptions = new ArrayList();
- cliOptions.add( "-o" );
- verifier.setCliOptions( cliOptions );
- verifier.executeGoal( "compile" );
- verifier.assertFilePresent( "target/classes/org/apache/maven/it0069/ClassworldBasedThing.class" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
+ {
+ // phase 1: run build in online mode to fill local repo
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
+ verifier.assertFilePresent( "target/compile.txt" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+ new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
+ }
+
+ {
+ // phase 2: run build in offline mode to check it still passes (after deleting test repo, to be sure)
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.deleteDirectory( "repo" );
+ List cliOptions = new ArrayList();
+ cliOptions.add( "-o" );
+ verifier.setCliOptions( cliOptions );
+ verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
+ verifier.assertFilePresent( "target/compile.txt" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+ new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
+ }
+
+ {
+ // phase 3: delete test artifact and run build in offline mode to check it fails now
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.deleteArtifact( "org.apache.maven.its.it0069", "it", "1.0.3", "jar" );
+ List cliOptions = new ArrayList();
+ cliOptions.add( "-o" );
+ verifier.setCliOptions( cliOptions );
+ try
+ {
+ verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
+ fail( "Build did not fail!" );
+ }
+ catch( VerificationException e )
+ {
+ // expected, should fail
+ }
+ verifier.resetStreams();
+ new File( testDir, "log.txt").renameTo( new File( testDir, "log3.txt" ) );
+ }
}
-}
+}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/pom.xml?rev=700584&r1=700583&r2=700584&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/pom.xml Tue Sep 30 14:23:53 2008
@@ -1,16 +1,58 @@
+<?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>
- <name>Maven Integration Test :: it0069</name>
+
<groupId>org.apache.maven.its.it0069</groupId>
<artifactId>maven-it-it0069</artifactId>
- <description>Test offline mode.</description>
<version>1.0-SNAPSHOT</version>
+ <name>Maven Integration Test :: it0069</name>
+ <description>Test offline mode.</description>
+
<dependencies>
<dependency>
- <groupId>classworlds</groupId>
- <artifactId>classworlds</artifactId>
- <version>1.1-alpha-2</version>
+ <groupId>org.apache.maven.its.it0069</groupId>
+ <artifactId>it</artifactId>
+ <version>1.0.3</version>
</dependency>
</dependencies>
+
+ <repositories>
+ <repository>
+ <id>it0018</id>
+ <url>file:///${basedir}/repo</url>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <configuration>
+ <compileClassPath>target/compile.txt</compileClassPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.jar?rev=700584&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.pom?rev=700584&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/1.0.3/it-1.0.3.pom Tue Sep 30 14:23:53 2008
@@ -0,0 +1,36 @@
+<?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.it0069</groupId>
+ <artifactId>it</artifactId>
+ <version>1.0.3</version>
+ <packaging>jar</packaging>
+
+ <distributionManagement>
+ <repository>
+ <id>it0069</id>
+ <url>file:///${basedir}/repo</url>
+ </repository>
+ </distributionManagement>
+</project>
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml?rev=700584&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml Tue Sep 30 14:23:53 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>org.apache.maven.its.it0069</groupId>
+ <artifactId>it</artifactId>
+ <version>1.0.3</version>
+ <versioning>
+ <versions>
+ <version>1.0.3</version>
+ </versions>
+ <lastUpdated>20080930194953</lastUpdated>
+ </versioning>
+</metadata>
\ No newline at end of file
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0069/repo/org/apache/maven/its/it0069/it/maven-metadata.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision