mirror of https://github.com/apache/archiva.git
Adding env variable for user config file
This commit is contained in:
parent
f9e5139851
commit
1ce7039d4f
|
@ -31,6 +31,11 @@ import java.util.Locale;
|
|||
*/
|
||||
public interface ArchivaConfiguration
|
||||
{
|
||||
|
||||
|
||||
String USER_CONFIG_PROPERTY = "archiva.user.configFileName";
|
||||
String USER_CONFIG_ENVVAR = "ARCHIVA_USER_CONFIG_FILE";
|
||||
|
||||
/**
|
||||
* Get the configuration.
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,7 @@ package org.apache.archiva.web.rss;
|
|||
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.archiva.configuration.ArchivaConfiguration;
|
||||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
|
||||
import org.apache.commons.codec.Encoder;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
@ -74,8 +75,8 @@ public class RssFeedServletTest
|
|||
public static void initConfigurationPath()
|
||||
throws Exception
|
||||
{
|
||||
PREVIOUS_ARCHIVA_PATH = System.getProperty( "archiva.user.configFileName" );
|
||||
System.setProperty( "archiva.user.configFileName",
|
||||
PREVIOUS_ARCHIVA_PATH = System.getProperty(ArchivaConfiguration.USER_CONFIG_PROPERTY);
|
||||
System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY,
|
||||
System.getProperty( "test.resources.path/" ) + "empty-archiva.xml" );
|
||||
}
|
||||
|
||||
|
@ -84,7 +85,7 @@ public class RssFeedServletTest
|
|||
public static void restoreConfigurationPath()
|
||||
throws Exception
|
||||
{
|
||||
System.setProperty( "archiva.user.configFileName", PREVIOUS_ARCHIVA_PATH );
|
||||
System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY, PREVIOUS_ARCHIVA_PATH );
|
||||
}
|
||||
|
||||
@Before
|
||||
|
|
Loading…
Reference in New Issue