maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r810108 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4335/ resources/mng-4335/repo/ resources/mng-4335/repo/org/ resources/mng-4335/repo/org/apache/ resources/mng-4335/repo/org/a...
Date Tue, 01 Sep 2009 16:23:21 GMT
Author: bentmann
Date: Tue Sep  1 16:23:20 2009
New Revision: 810108

URL: http://svn.apache.org/viewvc?rev=810108&view=rev
Log:
[MNG-4335] [regression] <settings><offline>true</offline</settings> is
not honored

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.jar
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.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=810108&r1=810107&r2=810108&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
Tue Sep  1 16:23:20 2009
@@ -85,6 +85,7 @@
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng4335SettingsOfflineModeTest.class );
         suite.addTestSuite( MavenITmng4332DefaultPluginExecutionOrderTest.class );
         suite.addTestSuite( MavenITmng4331DependencyCollectionTest.class );
         suite.addTestSuite( MavenITmng4328PrimitiveMojoParameterConfigurationTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java?rev=810108&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
Tue Sep  1 16:23:20 2009
@@ -0,0 +1,69 @@
+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 <a href="http://jira.codehaus.org/browse/MNG-4335">MNG-4335</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4335SettingsOfflineModeTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4335SettingsOfflineModeTest()
+    {
+        super( ALL_MAVEN_VERSIONS );
+    }
+
+    /**
+     * Test that offline mode is enabled when specified in the settings.xml
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4335"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4335" );
+        verifier.getCliOptions().add( "-s" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties()
);
+        try
+        {
+            verifier.executeGoal( "validate" );
+            verifier.verifyErrorFreeLog();
+            fail( "Build did not fail to resolve missing dependency although Maven ought
to work offline!" );
+        }
+        catch( VerificationException e )
+        {
+            // expected, should fail
+        }
+        verifier.resetStreams();
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4335SettingsOfflineModeTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/pom.xml?rev=810108&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/pom.xml
Tue Sep  1 16:23:20 2009
@@ -0,0 +1,60 @@
+<?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.mng4335</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+
+  <name>Maven Integration Test :: MNG-4335</name> 
+  <description>
+    Test that offline mode is enabled when specified in the settings.xml
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng4335</groupId>
+      <artifactId>a</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.jar?rev=810108&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.pom?rev=810108&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.pom
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/repo/org/apache/maven/its/mng4335/a/0.1/a-0.1.pom
Tue Sep  1 16:23:20 2009
@@ -0,0 +1,39 @@
+<?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.mng4335</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-4335 :: Dependency</name>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml?rev=810108&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml
Tue Sep  1 16:23:20 2009
@@ -0,0 +1,45 @@
+<?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.
+-->
+
+<settings>
+  <!-- if the offline setting is honored, the repository below should not be available
-->
+  <offline>true</offline>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4335/settings-template.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message