+ "] and layout specified type [" + expectedType + "] (which maps to extension: ["
+ expectedExtension + "]) on path [" + path + "]" );
}
-
-// if ( classifier != null && !filename.endsWith( "-" + classifier + "." + extension ) )
-// {
-// throw new LayoutException( INVALID_ARTIFACT_PATH + "mismatch on filename [" + filename
-// + "] and layout specified type [" + expectedType + "] (which maps to classifier: ["
-// + classifier + "]) on path [" + path + "]" );
-// }
}
return artifact;
public void testBadClassifierFooLibSources()
throws LayoutException
{
- String path = "com.foo.lib/java-sources/foo-lib-2.1-alpha-1.jar";
-
- try
- {
- parser.toArtifactReference( path );
- fail( "Expected an exception" );
- }
- catch ( LayoutException e )
- {
- assertTrue( true );
- }
+ assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1.jar", "missing required classifier" );
+ assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1-javadoc.jar", "incorrect classifier" );
+ assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1-other.jar", "incorrect classifier" );
}
/**