mirror of https://github.com/apache/archiva.git
[MRM-347] prevent creating /${appserver.home} directory which is not populated under the appserver for some reason. The base directory is the appropriate location for data anyway - so these are the values that should have been used.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@562369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f8e12362f6
commit
af94415b0e
|
@ -5,7 +5,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>internal</id>
|
<id>internal</id>
|
||||||
<name>Archiva Managed Internal Repository</name>
|
<name>Archiva Managed Internal Repository</name>
|
||||||
<url>file://${appserver.home}/repositories/internal</url>
|
<url>file://${appserver.base}/repositories/internal</url>
|
||||||
<layout>default</layout>
|
<layout>default</layout>
|
||||||
<releases>true</releases>
|
<releases>true</releases>
|
||||||
<snapshots>false</snapshots>
|
<snapshots>false</snapshots>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>snapshots</id>
|
<id>snapshots</id>
|
||||||
<name>Archiva Managed Snapshot Repository</name>
|
<name>Archiva Managed Snapshot Repository</name>
|
||||||
<url>file://${appserver.home}/repositories/snapshots</url>
|
<url>file://${appserver.base}/repositories/snapshots</url>
|
||||||
<layout>default</layout>
|
<layout>default</layout>
|
||||||
<releases>false</releases>
|
<releases>false</releases>
|
||||||
<snapshots>true</snapshots>
|
<snapshots>true</snapshots>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<proxyConnector>
|
<proxyConnector>
|
||||||
<sourceRepoId>internal</sourceRepoId>
|
<sourceRepoId>internal</sourceRepoId>
|
||||||
<targetRepoId>central</targetRepoId>
|
<targetRepoId>central</targetRepoId>
|
||||||
<proxyId />
|
<proxyId/>
|
||||||
<policies>
|
<policies>
|
||||||
<snapshots>disabled</snapshots>
|
<snapshots>disabled</snapshots>
|
||||||
<releases>once</releases>
|
<releases>once</releases>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<proxyConnector>
|
<proxyConnector>
|
||||||
<sourceRepoId>internal</sourceRepoId>
|
<sourceRepoId>internal</sourceRepoId>
|
||||||
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
|
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
|
||||||
<proxyId />
|
<proxyId/>
|
||||||
<policies>
|
<policies>
|
||||||
<snapshots>disabled</snapshots>
|
<snapshots>disabled</snapshots>
|
||||||
<releases>once</releases>
|
<releases>once</releases>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>internal</id>
|
<id>internal</id>
|
||||||
<name>Archiva Managed Internal Repository</name>
|
<name>Archiva Managed Internal Repository</name>
|
||||||
<url>file://${appserver.home}/repositories/internal</url>
|
<url>file://${appserver.base}/repositories/internal</url>
|
||||||
<layout>default</layout>
|
<layout>default</layout>
|
||||||
<releases>true</releases>
|
<releases>true</releases>
|
||||||
<snapshots>false</snapshots>
|
<snapshots>false</snapshots>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>snapshots</id>
|
<id>snapshots</id>
|
||||||
<name>Archiva Managed Snapshot Repository</name>
|
<name>Archiva Managed Snapshot Repository</name>
|
||||||
<url>file://${appserver.home}/repositories/internal</url>
|
<url>file://${appserver.base}/repositories/internal</url>
|
||||||
<layout>default</layout>
|
<layout>default</layout>
|
||||||
<releases>false</releases>
|
<releases>false</releases>
|
||||||
<snapshots>true</snapshots>
|
<snapshots>true</snapshots>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<proxyConnector>
|
<proxyConnector>
|
||||||
<sourceRepoId>internal</sourceRepoId>
|
<sourceRepoId>internal</sourceRepoId>
|
||||||
<targetRepoId>central</targetRepoId>
|
<targetRepoId>central</targetRepoId>
|
||||||
<proxyId />
|
<proxyId/>
|
||||||
<snapshotsPolicy>disabled</snapshotsPolicy>
|
<snapshotsPolicy>disabled</snapshotsPolicy>
|
||||||
<releasePolicy>never</releasePolicy>
|
<releasePolicy>never</releasePolicy>
|
||||||
<failurePolicy>not-found</failurePolicy>
|
<failurePolicy>not-found</failurePolicy>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<proxyConnector>
|
<proxyConnector>
|
||||||
<sourceRepoId>internal</sourceRepoId>
|
<sourceRepoId>internal</sourceRepoId>
|
||||||
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
|
<targetRepoId>maven2-repository.dev.java.net</targetRepoId>
|
||||||
<proxyId />
|
<proxyId/>
|
||||||
<snapshotsPolicy>disabled</snapshotsPolicy>
|
<snapshotsPolicy>disabled</snapshotsPolicy>
|
||||||
<releasePolicy>never</releasePolicy>
|
<releasePolicy>never</releasePolicy>
|
||||||
<failurePolicy>not-found</failurePolicy>
|
<failurePolicy>not-found</failurePolicy>
|
||||||
|
|
|
@ -30,13 +30,15 @@ import java.util.List;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
* @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 archivaConfiguration =
|
||||||
(ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-defaults" );
|
(ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-defaults" );
|
||||||
|
|
||||||
Configuration configuration = archivaConfiguration.getConfiguration();
|
Configuration configuration = archivaConfiguration.getConfiguration();
|
||||||
|
|
||||||
// check default configuration
|
// check default configuration
|
||||||
|
@ -44,7 +46,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
assertTrue( "check configuration has default elements", configuration.getRepositories().isEmpty() );
|
assertTrue( "check configuration has default elements", configuration.getRepositories().isEmpty() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetConfiguration() throws Exception
|
public void testGetConfiguration()
|
||||||
|
throws Exception
|
||||||
{
|
{
|
||||||
ArchivaConfiguration archivaConfiguration =
|
ArchivaConfiguration archivaConfiguration =
|
||||||
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
|
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
|
||||||
|
@ -75,23 +78,24 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
RepositoryConfiguration repository =
|
RepositoryConfiguration repository =
|
||||||
(RepositoryConfiguration) configuration.getRepositories().iterator().next();
|
(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() );
|
repository.getUrl() );
|
||||||
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
assertEquals( "check managed repositories", "Archiva Managed Internal Repository", repository.getName() );
|
||||||
assertEquals( "check managed repositories", "internal", repository.getId() );
|
assertEquals( "check managed repositories", "internal", repository.getId() );
|
||||||
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
assertEquals( "check managed repositories", "default", repository.getLayout() );
|
||||||
assertTrue( "check managed repositories", repository.isIndexed() );
|
assertTrue( "check managed repositories", repository.isIndexed() );
|
||||||
|
|
||||||
WebappConfiguration webapp = (WebappConfiguration) configuration.getWebapp();
|
WebappConfiguration webapp = (WebappConfiguration) configuration.getWebapp();
|
||||||
assertNotNull( "check webapp", webapp );
|
assertNotNull( "check webapp", webapp );
|
||||||
|
|
||||||
UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi();
|
UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi();
|
||||||
assertNotNull( "check webapp ui", ui );
|
assertNotNull( "check webapp ui", ui );
|
||||||
assertTrue( "check showFindArtifacts", ui.isShowFindArtifacts() );
|
assertTrue( "check showFindArtifacts", ui.isShowFindArtifacts() );
|
||||||
assertTrue( "check appletFindEnabled", ui.isAppletFindEnabled() );
|
assertTrue( "check appletFindEnabled", ui.isAppletFindEnabled() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetConfigurationSystemOverride() throws Exception
|
public void testGetConfigurationSystemOverride()
|
||||||
|
throws Exception
|
||||||
{
|
{
|
||||||
ArchivaConfiguration archivaConfiguration =
|
ArchivaConfiguration archivaConfiguration =
|
||||||
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
|
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-configuration" );
|
||||||
|
@ -104,7 +108,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
// assertEquals( "check indexPath", ".index", configuration.getIndexPath() );
|
// 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 file = getTestFile( "target/test/test-file.xml" );
|
||||||
file.delete();
|
file.delete();
|
||||||
|
@ -134,7 +139,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
|
// 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" );
|
File baseFile = getTestFile( "target/test/test-file.xml" );
|
||||||
baseFile.delete();
|
baseFile.delete();
|
||||||
|
@ -164,7 +170,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
|
// 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" );
|
File baseFile = getTestFile( "target/test/test-file.xml" );
|
||||||
baseFile.delete();
|
baseFile.delete();
|
||||||
|
@ -194,7 +201,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase
|
||||||
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
|
// assertEquals( "check value", "index-path", configuration.getIndexPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRemoveProxiedRepositoryAndStoreConfiguration() throws Exception
|
public void testRemoveProxiedRepositoryAndStoreConfiguration()
|
||||||
|
throws Exception
|
||||||
{
|
{
|
||||||
// MRM-300
|
// MRM-300
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue