public synchronized URL addPath ( Path path , Path remoteFile ) throws IOException , MalformedURLException { if ( paths . containsKey ( remoteFile ) ) { throw new IllegalArgumentException ( "duplicate path registered" ) ; } if ( remoteFile . isAbsolute ( ) ) { throw new IllegalArgumentException ( "not expecting an absolute path" ) ; } URL fileURL = new URL ( baseURL , remoteFile . toString ( ) ) ; router . addAny ( fileURL . getPath ( ) , new VirtualFileServerHandler ( path ) ) ; paths . put ( remoteFile , fileURL ) ; return fileURL ; }
Adds a path to the artifact server .