maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r521213 - /maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java
Date Thu, 22 Mar 2007 11:13:58 GMT
Author: evenisse
Date: Thu Mar 22 04:13:57 2007
New Revision: 521213

URL: http://svn.apache.org/viewvc?view=rev&rev=521213
Log:
[SCM-289] Allow to store clearcase-settings.xml in ${maven.home}/conf instead of ${user.home}/.scm
Submitted by: Arne Degenring

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java?view=diff&rev=521213&r1=521212&r2=521213
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/util/ClearCaseUtil.java
Thu Mar 22 04:13:57 2007
@@ -34,6 +34,8 @@
  */
 public class ClearCaseUtil
 {
+	protected static final String CLEARCASE_SETTINGS_FILENAME = "clearcase-settings.xml";
+	
     private ClearCaseUtil()
     {
     }
@@ -41,7 +43,13 @@
     public static Settings getSettings()
     {
         File scmUserDir = new File( System.getProperty( "user.home" ), ".scm" );
-        File settingsFile = new File( scmUserDir, "clearcase-settings.xml" );
+        File settingsFile = new File( scmUserDir, CLEARCASE_SETTINGS_FILENAME );
+        
+        if (!settingsFile.exists())
+        {
+        	File scmGlobalDir = new File( System.getProperty( "maven.home"), "conf" );
+        	settingsFile = new File ( scmGlobalDir, CLEARCASE_SETTINGS_FILENAME ); 
+        }
 
         if ( settingsFile.exists() )
         {



Mime
View raw message