SimpleLocalRepositoryManager implements LocalRepositoryManager { public String getPathForLocalArtifact( Artifact artifact ) { return getPathForArtifact( artifact, true ); } SimpleLocalRepositoryManager( File basedir );  SimpleLocalRepositoryManager( String basedir );   SimpleLocalRepositoryManager( File basedir, String type ); SimpleLocalRepositoryManager setLogger( Logger logger ); LocalRepository getRepository(); String getPathForLocalArtifact( Artifact artifact ); String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ); String getPathForLocalMetadata( Metadata metadata ); String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ); LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ); void add( RepositorySystemSession session, LocalArtifactRegistration request ); @Override String toString(); LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ); void add( RepositorySystemSession session, LocalMetadataRegistration request );  }
@Test public void testGetPathForLocalArtifact() throws Exception { Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-20110329.221805-4" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); artifact = new DefaultArtifact( "g.i.d", "a.i.d", "", "", "1.0-SNAPSHOT" ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT", manager.getPathForLocalArtifact( artifact ) ); }