<repository>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
- <url>file://${appserver.home}/repositories/internal</url>
+ <url>file://${appserver.base}/repositories/internal</url>
<layout>default</layout>
<releases>true</releases>
<snapshots>false</snapshots>
<repository>
<id>snapshots</id>
<name>Archiva Managed Snapshot Repository</name>
- <url>file://${appserver.home}/repositories/snapshots</url>
+ <url>file://${appserver.base}/repositories/snapshots</url>
<layout>default</layout>
<releases>false</releases>
<snapshots>true</snapshots>
<proxyConnector>
<sourceRepoId>internal</sourceRepoId>
<targetRepoId>central</targetRepoId>
- <proxyId />
+ <proxyId/>
<policies>
<snapshots>disabled</snapshots>
<releases>once</releases>
<proxyConnector>
<sourceRepoId>internal</sourceRepoId>
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
- <proxyId />
+ <proxyId/>
<policies>
<snapshots>disabled</snapshots>
<releases>once</releases>
<repository>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
- <url>file://${appserver.home}/repositories/internal</url>
+ <url>file://${appserver.base}/repositories/internal</url>
<layout>default</layout>
<releases>true</releases>
<snapshots>false</snapshots>
<repository>
<id>snapshots</id>
<name>Archiva Managed Snapshot Repository</name>
- <url>file://${appserver.home}/repositories/internal</url>
+ <url>file://${appserver.base}/repositories/internal</url>
<layout>default</layout>
<releases>false</releases>
<snapshots>true</snapshots>
<proxyConnector>
<sourceRepoId>internal</sourceRepoId>
<targetRepoId>central</targetRepoId>
- <proxyId />
+ <proxyId/>
<snapshotsPolicy>disabled</snapshotsPolicy>
<releasePolicy>never</releasePolicy>
<failurePolicy>not-found</failurePolicy>
<proxyConnector>
<sourceRepoId>internal</sourceRepoId>
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
- <proxyId />
+ <proxyId/>
<snapshotsPolicy>disabled</snapshotsPolicy>
<releasePolicy>never</releasePolicy>
<failurePolicy>not-found</failurePolicy>
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
-public class ArchivaConfigurationTest extends PlexusTestCase
+public class ArchivaConfigurationTest
+ extends PlexusTestCase
{
- public void testDefaults() throws Exception
+ public void testDefaults()
+ throws Exception
{
ArchivaConfiguration archivaConfiguration =
(ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-defaults" );
-
+
Configuration configuration = archivaConfiguration.getConfiguration();
// check default configuration
assertTrue( "check configuration has default elements", configuration.getRepositories().isEmpty() );
}
- public void testGetConfiguration() throws Exception
+ public void testGetConfiguration()
+ throws Exception
{
ArchivaConfiguration archivaConfiguration =
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
RepositoryConfiguration repository =
(RepositoryConfiguration) configuration.getRepositories().iterator().next();
- assertEquals( "check managed repositories", "file://${appserver.home}/repositories/internal",
+ assertEquals( "check managed repositories", "file://${appserver.base}/repositories/internal",
repository.getUrl() );
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
assertEquals( "check managed repositories", "internal", repository.getId() );
assertEquals( "check managed repositories", "default", repository.getLayout() );
assertTrue( "check managed repositories", repository.isIndexed() );
-
+
WebappConfiguration webapp = (WebappConfiguration) configuration.getWebapp();
assertNotNull( "check webapp", webapp );
-
+
UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi();
- assertNotNull( "check webapp ui", ui );
+ assertNotNull( "check webapp ui", ui );
assertTrue( "check showFindArtifacts", ui.isShowFindArtifacts() );
assertTrue( "check appletFindEnabled", ui.isAppletFindEnabled() );
}
- public void testGetConfigurationSystemOverride() throws Exception
+ public void testGetConfigurationSystemOverride()
+ throws Exception
{
ArchivaConfiguration archivaConfiguration =
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
// assertEquals( "check indexPath", ".index", configuration.getIndexPath() );
}
- public void testStoreConfiguration() throws Exception
+ public void testStoreConfiguration()
+ throws Exception
{
File file = getTestFile( "target/test/test-file.xml" );
file.delete();
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
}
- public void testStoreConfigurationUser() throws Exception
+ public void testStoreConfigurationUser()
+ throws Exception
{
File baseFile = getTestFile( "target/test/test-file.xml" );
baseFile.delete();
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
}
- public void testStoreConfigurationFallback() throws Exception
+ public void testStoreConfigurationFallback()
+ throws Exception
{
File baseFile = getTestFile( "target/test/test-file.xml" );
baseFile.delete();
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
}
- public void testRemoveProxiedRepositoryAndStoreConfiguration() throws Exception
+ public void testRemoveProxiedRepositoryAndStoreConfiguration()
+ throws Exception
{
// MRM-300