<artifactId>wagon-http-lightweight</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<pluginManagement>
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<artifactId>archiva-test-utils</artifactId>
<version>${project.version}</version>
<scope>test</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<artifactId>wagon-http-lightweight</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<pluginManagement>
<artifactId>redback-common-test-resources</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
<plugins>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<artifactId>metadata-store-file</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
protected RemoteRepoInfo remoteSnapshots;
@Before
+ @Override
public void setUp()
throws Exception
{
super.setUp();
+ startRepository();
}
@Override
import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.apache.archiva.webdav.util.MavenIndexerCleaner;
+import org.apache.archiva.webdav.util.ReinitServlet;
import org.apache.catalina.Context;
import org.apache.catalina.deploy.ApplicationParameter;
import org.apache.catalina.startup.Tomcat;
applicationContext.getBean( MavenIndexerCleaner.class ).cleanupIndex();
+
+
+ }
+
+ protected void startRepository() throws Exception
+ {
tomcat = new Tomcat();
tomcat.setBaseDir( System.getProperty( "java.io.tmpdir" ) );
tomcat.setPort( 0 );
Tomcat.addServlet( context, "repository", new UnauthenticatedRepositoryServlet() );
context.addServletMapping( "/repository/*", "repository" );
+
+ Tomcat.addServlet( context, "reinitservlet", new ReinitServlet() );
+ context.addServletMapping( "/reinit/*", "reinitservlet" );
+
tomcat.start();
this.port = tomcat.getConnector().getLocalPort();
-
}
protected String getSpringConfigLocation()
webClient.getOptions().setJavaScriptEnabled( false );
webClient.getOptions().setCssEnabled( false );
webClient.getOptions().setAppletEnabled( false );
+ webClient.getOptions().setThrowExceptionOnFailingStatusCode( false );
webClient.setAjaxController( new NicelyResynchronizingAjaxController() );
return webClient;
}
protected static WebResponse getWebResponse( String path )
throws Exception
{
- return newClient().getPage( "http://localhost:" + port + path ).getWebResponse();
+ WebClient client = newClient();
+ client.getPage( "http://localhost:" + port + "/reinit/reload" );
+ return client.getPage( "http://localhost:" + port + path ).getWebResponse();
}
public static class GetMethodWebRequest
new File( repoRootInternal, "org/codehaus/mojo/" ).mkdirs();
new File( repoRootInternal, "net/sourceforge" ).mkdirs();
new File( repoRootInternal, "commons-lang" ).mkdirs();
+
+ startRepository();
}
@Test
import com.gargoylesoftware.htmlunit.WebResponse;
import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.archiva.webdav.httpunit.MkColMethodWebRequest;
+import org.junit.Before;
import org.junit.Test;
{
private static final String ARTIFACT_DEFAULT_LAYOUT = "/path/to/artifact/1.0.0/artifact-1.0.0.jar";
+ @Before
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ startRepository();
+ }
+
@Test
public void testPutWithMissingParentCollection()
throws Exception
import com.gargoylesoftware.htmlunit.WebRequest;
import com.gargoylesoftware.htmlunit.WebResponse;
import org.apache.commons.io.FileUtils;
+import org.junit.Before;
import org.junit.Test;
import java.io.File;
public class RepositoryServletNoProxyMetadataTest
extends AbstractRepositoryServletTestCase
{
+
+ @Before
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ startRepository();
+ }
+
@Test
public void testGetVersionMetadataDefaultLayout()
throws Exception
{
super.setUp();
archivaConfiguration.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>() );
+ startRepository();
}
@Test
FileUtils.deleteDirectory( repoRootInvalid );
saveConfiguration( archivaConfiguration );
+
+ startRepository();
}
@Override
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
+import org.junit.Before;
import org.junit.Test;
import java.io.File;
assertNull( repository );
}
+ @Before
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ startRepository();
+ }
+
@Test
public void testGetRepositoryAfterAdd()
throws Exception
<artifactId>log4j-1.2-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
<plugins>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<testResources>
<artifactId>test-repository</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>