maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r727007 - in /maven/components/branches/maven-2.0.x: ./ apache-maven/ apache-maven/src/test/ apache-maven/src/test/java/ apache-maven/src/test/java/org/ apache-maven/src/test/java/org/apache/ apache-maven/src/test/java/org/apache/maven/ apa...
Date Tue, 16 Dec 2008 10:17:34 GMT
Author: bentmann
Date: Tue Dec 16 02:17:34 2008
New Revision: 727007

URL: http://svn.apache.org/viewvc?rev=727007&view=rev
Log:
o Added a unit test to smoke check the settings.xml shipped with the distro (merged from r726845)

Added:
    maven/components/branches/maven-2.0.x/apache-maven/src/test/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/
    maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
  (with props)
Modified:
    maven/components/branches/maven-2.0.x/   (props changed)
    maven/components/branches/maven-2.0.x/apache-maven/pom.xml

Propchange: maven/components/branches/maven-2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 16 02:17:34 2008
@@ -1,4 +1,4 @@
 /maven/components/branches/maven-2.0.10-RC:720697,725329-725330,725342,725349,725359,725748,726876-726881
 /maven/components/branches/maven-2.0.x:533160,636838,645583,645642,647357,649903,657432,659677,662033,662251,669665,670358,673499,673905,674059,675074,675087,675096,675375,675380,680604,682055
 /maven/components/branches/maven-2.1.x:720038
-/maven/components/trunk:720001,721902
+/maven/components/trunk:720001,721902,726845

Modified: maven/components/branches/maven-2.0.x/apache-maven/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/apache-maven/pom.xml?rev=727007&r1=727006&r2=727007&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/apache-maven/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/apache-maven/pom.xml Tue Dec 16 02:17:34 2008
@@ -42,6 +42,17 @@
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemProperties>
+            <property>
+              <name>basedir</name>
+              <value>${basedir}</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
+      <plugin>
         <artifactId>maven-shade-plugin</artifactId>
         <version>1.1</version>
         <executions>

Added: maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java?rev=727007&view=auto
==============================================================================
--- maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
(added)
+++ maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
Tue Dec 16 02:17:34 2008
@@ -0,0 +1,60 @@
+package org.apache.maven.settings;
+
+/*
+ * 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 java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests that the global settings.xml shipped with the distribution is in good state.
+ * 
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class GlobalSettingsTest
+    extends TestCase
+{
+
+    public void testValidGlobalSettings()
+        throws Exception
+    {
+        String basedir = System.getProperty( "basedir", System.getProperty( "user.dir" )
);
+
+        File globalSettingsFile = new File( basedir, "src/conf/settings.xml" );
+        assertTrue( globalSettingsFile.getAbsolutePath(), globalSettingsFile.isFile() );
+
+        Reader reader = new InputStreamReader( new FileInputStream( globalSettingsFile ),
"UTF-8" );
+        try
+        {
+            new SettingsXpp3Reader().read( reader );
+        }
+        finally
+        {
+            reader.close();
+        }
+    }
+
+}

Propchange: maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/branches/maven-2.0.x/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message