mirror of
https://github.com/apache/archiva.git
synced 2025-02-23 11:04:56 +00:00
clean up some tests and avoid creating bad ~/.m2/archiva.xml descriptor
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1140961 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7d53f8c9cc
commit
1f68b697b7
@ -30,8 +30,8 @@
|
|||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import sun.misc.BASE64Encoder;
|
import sun.misc.BASE64Encoder;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
public class RssFeedServletTest
|
public class RssFeedServletTest
|
||||||
extends TestCase
|
extends TestCase
|
||||||
@ -166,12 +166,6 @@ public void XXX_testUnauthorizedRequest()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Override
|
|
||||||
protected String getPlexusConfigLocation()
|
|
||||||
{
|
|
||||||
return "org/apache/maven/archiva/web/rss/RssFeedServletTest.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown()
|
protected void tearDown()
|
||||||
throws Exception
|
throws Exception
|
||||||
|
@ -44,14 +44,15 @@
|
|||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
|
@ContextConfiguration( locations = {"classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml",
|
||||||
|
"classpath:/spring-context-DependencyTreeTest.xml"} )
|
||||||
public class DependencyTreeTest
|
public class DependencyTreeTest
|
||||||
extends TestCase
|
extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!--
|
|
||||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
~ or more contributor license agreements. See the NOTICE file
|
|
||||||
~ distributed with this work for additional information
|
|
||||||
~ regarding copyright ownership. The ASF licenses this file
|
|
||||||
~ to you under the Apache License, Version 2.0 (the
|
|
||||||
~ "License"); you may not use this file except in compliance
|
|
||||||
~ with the License. You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing,
|
|
||||||
~ software distributed under the License is distributed on an
|
|
||||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
~ KIND, either express or implied. See the License for the
|
|
||||||
~ specific language governing permissions and limitations
|
|
||||||
~ under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<component-set>
|
|
||||||
<components>
|
|
||||||
<!-- Components that are common for all test cases -->
|
|
||||||
<component>
|
|
||||||
<role>org.apache.maven.archiva.webdav.util.MimeTypes</role>
|
|
||||||
<implementation>org.apache.maven.archiva.webdav.util.MimeTypes</implementation>
|
|
||||||
<description>MimeTypes</description>
|
|
||||||
<configuration>
|
|
||||||
<resource>archiva-mime-types.txt</resource>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
<component>
|
|
||||||
<role>org.apache.archiva.metadata.repository.RepositorySessionFactory</role>
|
|
||||||
<role-hint>default</role-hint>
|
|
||||||
<implementation>org.apache.archiva.metadata.repository.memory.TestRepositorySessionFactory</implementation>
|
|
||||||
</component>
|
|
||||||
</components>
|
|
||||||
</component-set>
|
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||||
|
http://www.springframework.org/schema/context
|
||||||
|
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||||
|
default-lazy-init="true">
|
||||||
|
|
||||||
|
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||||
|
|
||||||
|
<context:annotation-config/>
|
||||||
|
<context:component-scan base-package="org.apache.archiva.metadata.repository.memory"/>
|
||||||
|
|
||||||
|
<bean name="archivaConfiguration#test" class="org.apache.archiva.configuration.TestConfiguration" />
|
||||||
|
<alias name="archivaConfiguration#test" alias="archivaConfiguration#default" />
|
||||||
|
</beans>
|
@ -40,5 +40,4 @@
|
|||||||
|
|
||||||
<bean name="metadataResolver#test" class="org.apache.archiva.metadata.repository.memory.TestMetadataResolver"/>
|
<bean name="metadataResolver#test" class="org.apache.archiva.metadata.repository.memory.TestMetadataResolver"/>
|
||||||
<alias name="metadataResolver#test" alias="metadataResolver#default"/>
|
<alias name="metadataResolver#test" alias="metadataResolver#default"/>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
@ -43,7 +43,6 @@
|
|||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactCollector;
|
import org.apache.maven.artifact.resolver.ArtifactCollector;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ResolutionListener;
|
|
||||||
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
|
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
|
||||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||||
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
|
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
|
||||||
@ -77,9 +76,6 @@
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import javax.inject.Named;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -90,6 +86,9 @@
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of <code>DependencyTreeBuilder</code>. Customized wrapper for maven-dependency-tree to use
|
* Default implementation of <code>DependencyTreeBuilder</code>. Customized wrapper for maven-dependency-tree to use
|
||||||
|
Loading…
x
Reference in New Issue
Block a user