public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { try { updateRepositoryMetadata( localRepository, remoteRepository ); } catch ( IOException | XmlPullParserException e ) { throw new RepositoryMetadataStoreException( "Error updating group repository metadata", e ); } }
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) ); // ---------------------------------------------------------------------------- // I'm fully aware that the file could just be moved using File.rename but // there are bugs in various JVM that have problems doing this across // different filesystem. So we'll incur the small hit to actually copy // here and be safe. jvz. // ---------------------------------------------------------------------------- try { FileUtils.copyFile( file, destination ); } catch ( IOException e ) { throw new RepositoryMetadataStoreException( "Error copying POM to the local repository.", e ); } }
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { File f = transformedFile == null ? originalFile : transformedFile; if ( f == null ) { return; } File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) ); // ---------------------------------------------------------------------------- // I'm fully aware that the file could just be moved using File.rename but // there are bugs in various JVM that have problems doing this across // different filesystem. So we'll incur the small hit to actually copy // here and be safe. jvz. // ---------------------------------------------------------------------------- try { FileUtils.copyFile( f, destination ); } catch ( IOException e ) { throw new RepositoryMetadataStoreException( "Error copying POM to the local repository.", e ); } }
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) ); try { FileUtils.copyFile( file, destination ); } catch ( IOException e ) { throw new RepositoryMetadataStoreException( "Error copying ASC to the local repository.", e ); } }
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) ); destination.getParentFile().mkdirs(); Writer writer = null; try { writer = WriterFactory.newXmlWriter( destination ); new DecorationXpp3Writer().write( writer, decoration ); writer.close(); writer = null; } catch ( IOException e ) { throw new RepositoryMetadataStoreException( "Error saving in local repository", e ); } finally { IOUtil.close( writer ); } }