Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remoteIndexUrl configurable as a property

git-svn-id: https://svn.apache.org/repos/asf/maven/sandbox/trunk@1297037 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit de3efb06f46b9d18c0d8d9aea5d108916db804b2 1 parent f9b087e
@olamy olamy authored
View
2  central-indexer-test/pom.xml
@@ -18,6 +18,7 @@
<properties>
<userAgent></userAgent>
+ <remoteIndexUrl>http://repo.maven.apache.org/maven2/.index</remoteIndexUrl>
</properties>
<dependencies>
@@ -48,6 +49,7 @@
<configuration>
<systemPropertyVariables>
<userAgent>${userAgent}</userAgent>
+ <remoteIndexUrl>${remoteIndexUrl}</remoteIndexUrl>
</systemPropertyVariables>
</configuration>
</plugin>
View
13 central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java
@@ -83,7 +83,11 @@ public void setUp()
httpWagon.setTimeout( 10000 );
- httpWagon.connect( new Repository( "central", "http://repo.maven.apache.org/maven2/.index" ) );
+ String remoteIndexUrl = System.getProperty( "remoteIndexUrl" );
+
+ System.out.println( "remoteIndexUrl:" + remoteIndexUrl );
+
+ httpWagon.connect( new Repository( "central", remoteIndexUrl ) );
ResourceFetcher resourceFetcher = new ResourceFetcher()
{
@@ -204,15 +208,14 @@ public void testSearchWithClassName()
NexusIndexer indexer = lookup( NexusIndexer.class );
BooleanQuery q = new BooleanQuery();
- q.add( indexer.constructQuery( MAVEN.CLASSNAMES, new StringSearchExpression(
- "NexusIndexer" ) ), BooleanClause.Occur.MUST );
+ q.add( indexer.constructQuery( MAVEN.CLASSNAMES, new StringSearchExpression( "NexusIndexer" ) ),
+ BooleanClause.Occur.MUST );
FlatSearchRequest searchRequest = new FlatSearchRequest( q );
searchRequest.setContexts( Arrays.asList( context ) );
FlatSearchResponse response = indexer.searchFlat( searchRequest );
System.out.println(
- "search with className NexusIndexer response getReturnedHitsCount : "
- + response.getReturnedHitsCount() );
+ "search with className NexusIndexer response getReturnedHitsCount : " + response.getReturnedHitsCount() );
assertTrue( response.getReturnedHitsCount() > 0 );
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.