Author: bentmann
Date: Mon Dec 15 14:18:11 2008
New Revision: 726845
URL: http://svn.apache.org/viewvc?rev=726845&view=rev
Log:
o Added a unit test to smoke check the settings.xml shipped with the distro (it
shouldn't need a full blown IT to detect things like XML syntax errors...)
Added:
maven/components/trunk/maven-distribution/src/test/ (with props)
maven/components/trunk/maven-distribution/src/test/java/ (with props)
maven/components/trunk/maven-distribution/src/test/java/org/ (with props)
maven/components/trunk/maven-distribution/src/test/java/org/apache/ (with
props)
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/
(with props)
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/
(with props)
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
(with props)
Modified:
maven/components/trunk/maven-distribution/pom.xml
Modified: maven/components/trunk/maven-distribution/pom.xml
URL:
http://svn.apache.org/viewvc/maven/components/trunk/maven-distribution/pom.xml?rev=726845&r1=726844&r2=726845&view=diff
==============================================================================
--- maven/components/trunk/maven-distribution/pom.xml (original)
+++ maven/components/trunk/maven-distribution/pom.xml Mon Dec 15 14:18:11 2008
@@ -75,6 +75,21 @@
<artifactId>easymock</artifactId>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>basedir</name>
+ <value>${basedir}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<profiles>
<profile>
<!--
Propchange: maven/components/trunk/maven-distribution/src/test/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-distribution/src/test/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-distribution/src/test/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-distribution/src/test/java/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-distribution/src/test/java/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/apache/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/apache/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/apache/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-distribution/src/test/java/org/apache/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
URL:
http://svn.apache.org/viewvc/maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java?rev=726845&view=auto
==============================================================================
---
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
(added)
+++
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
Mon Dec 15 14:18:11 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/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/components/trunk/maven-distribution/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision