mirror of https://github.com/apache/archiva.git
Applying Tom Huybrechts patch rom MRM-226. Stops the indexer blo
wing up when it hits it and thinks its a -sources for a foo-test artifact git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@475959 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
371ebf103a
commit
a45320f77c
|
@ -87,6 +87,13 @@ public class DefaultArtifactDiscoverer
|
|||
type = "distribution-zip";
|
||||
remainingFilename = remainingFilename.substring( 0, remainingFilename.length() - ".zip".length() );
|
||||
}
|
||||
else if ( remainingFilename.endsWith( "-test-sources.jar" ) )
|
||||
{
|
||||
type = "java-source";
|
||||
classifier = "test-sources";
|
||||
remainingFilename =
|
||||
remainingFilename.substring( 0, remainingFilename.length() - "-test-sources.jar".length() );
|
||||
}
|
||||
else if ( remainingFilename.endsWith( "-sources.jar" ) )
|
||||
{
|
||||
type = "java-source";
|
||||
|
|
|
@ -364,6 +364,16 @@ public class DefaultArtifactDiscovererTest
|
|||
createArtifact( "org.apache.maven", "testing", "1.0", "java-source", "sources" ) ) );
|
||||
}
|
||||
|
||||
public void testTestSourcesInclusion()
|
||||
throws DiscovererException
|
||||
{
|
||||
List artifacts = discoverArtifactsWithSnapshots();
|
||||
assertNotNull( "Check artifacts not null", artifacts );
|
||||
|
||||
assertTrue( "Check normal included", artifacts.contains(
|
||||
createArtifact( "org.apache.maven", "testing", "1.0", "java-source", "test-sources" ) ) );
|
||||
}
|
||||
|
||||
public void testDistributionInclusion()
|
||||
throws DiscovererException
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue