private void write( File metadataFile, Metadata metadata ) throws RepositoryException { metadataFile.getParentFile().mkdirs(); try ( Writer writer = WriterFactory.newXmlWriter( metadataFile ) ) { new MetadataXpp3Writer().write( writer, metadata ); } catch ( IOException e ) { throw new RepositoryException( "Could not write metadata " + metadataFile + ": " + e.getMessage(), e ); } }
public void merge( File current, File result ) throws RepositoryException { try { if ( current.exists() ) { FileUtils.copyFile( current, result ); } ArtifactRepository localRepo = new MetadataRepository( result ); metadata.storeInLocalRepository( localRepo, localRepo ); merged = true; } catch ( Exception e ) { throw new RepositoryException( e.getMessage(), e ); } }
static Metadata read( File metadataFile ) throws RepositoryException { if ( metadataFile.length() <= 0 ) { return new Metadata(); } try ( Reader reader = ReaderFactory.newXmlReader( metadataFile ) ) { return new MetadataXpp3Reader().read( reader, false ); } catch ( IOException e ) { throw new RepositoryException( "Could not read metadata " + metadataFile + ": " + e.getMessage(), e ); } catch ( XmlPullParserException e ) { throw new RepositoryException( "Could not parse metadata " + metadataFile + ": " + e.getMessage(), e ); } }
new RepositoryException( "Artifact relocations form a cycle: " + visited ); invalidDescriptor( session, trace, a, exception ); if ( ( getPolicy( session, a, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )
private void write( File metadataFile, Metadata metadata ) throws RepositoryException { metadataFile.getParentFile().mkdirs(); try ( Writer writer = WriterFactory.newXmlWriter( metadataFile ) ) { new MetadataXpp3Writer().write( writer, metadata ); } catch ( IOException e ) { throw new RepositoryException( "Could not write metadata " + metadataFile + ": " + e.getMessage(), e ); } }
private void write( File metadataFile, Metadata metadata ) throws RepositoryException { metadataFile.getParentFile().mkdirs(); try ( Writer writer = WriterFactory.newXmlWriter( metadataFile ) ) { new MetadataXpp3Writer().write( writer, metadata ); } catch ( IOException e ) { throw new RepositoryException( "Could not write metadata " + metadataFile + ": " + e.getMessage(), e ); } }
private void write( File metadataFile, Metadata metadata ) throws RepositoryException { Writer writer = null; try { metadataFile.getParentFile().mkdirs(); writer = WriterFactory.newXmlWriter( metadataFile ); new MetadataXpp3Writer().write( writer, metadata ); } catch ( IOException e ) { throw new RepositoryException( "Could not write metadata " + metadataFile + ": " + e.getMessage(), e ); } finally { IOUtil.close( writer ); } }
static Metadata read( File metadataFile ) throws RepositoryException { if ( metadataFile.length() <= 0 ) { return new Metadata(); } try ( Reader reader = ReaderFactory.newXmlReader( metadataFile ) ) { return new MetadataXpp3Reader().read( reader, false ); } catch ( IOException e ) { throw new RepositoryException( "Could not read metadata " + metadataFile + ": " + e.getMessage(), e ); } catch ( XmlPullParserException e ) { throw new RepositoryException( "Could not parse metadata " + metadataFile + ": " + e.getMessage(), e ); } }
static Metadata read( File metadataFile ) throws RepositoryException { if ( metadataFile.length() <= 0 ) { return new Metadata(); } try ( Reader reader = ReaderFactory.newXmlReader( metadataFile ) ) { return new MetadataXpp3Reader().read( reader, false ); } catch ( IOException e ) { throw new RepositoryException( "Could not read metadata " + metadataFile + ": " + e.getMessage(), e ); } catch ( XmlPullParserException e ) { throw new RepositoryException( "Could not parse metadata " + metadataFile + ": " + e.getMessage(), e ); } }
static Metadata read( File metadataFile ) throws RepositoryException { if ( metadataFile.length() <= 0 ) { return new Metadata(); } Reader reader = null; try { reader = ReaderFactory.newXmlReader( metadataFile ); return new MetadataXpp3Reader().read( reader, false ); } catch ( IOException e ) { throw new RepositoryException( "Could not read metadata " + metadataFile + ": " + e.getMessage(), e ); } catch ( XmlPullParserException e ) { throw new RepositoryException( "Could not parse metadata " + metadataFile + ": " + e.getMessage(), e ); } finally { IOUtil.close( reader ); } }
throw new RepositoryException( "missing conflict id for node " + node );
throw new RepositoryException( "missing conflict id for node " + node );
public DependencyNode transformGraph(DependencyNode node, DependencyGraphTransformationContext context) throws RepositoryException { List<?> sortedConflictIds = (List<?>) context.get(TransformationContextKeys.SORTED_CONFLICT_IDS); if (sortedConflictIds == null) { ConflictIdSorter sorter = new ConflictIdSorter(); sorter.transformGraph(node, context); sortedConflictIds = (List<?>) context.get(TransformationContextKeys.SORTED_CONFLICT_IDS); } Map<?, ?> conflictIds = (Map<?, ?>) context.get(TransformationContextKeys.CONFLICT_IDS); if (conflictIds == null) { throw new RepositoryException("conflict groups have not been identified"); } Map<DependencyNode, Integer> depths = new TreeMap<DependencyNode, Integer>(DependencyNodeComparator.INSTANCE); for (Object key : sortedConflictIds) { ConflictGroup group = new ConflictGroup(key); depths.clear(); selectVersion(node, null, 0, depths, group, conflictIds); updateNonSelectedVersions(group, conflictIds); } return node; }
if ( conflictIdCycles == null ) throw new RepositoryException( "conflict id cycles have not been identified" ); if ( conflictIds == null ) throw new RepositoryException( "conflict groups have not been identified" ); if ( ctx.winner == null ) throw new RepositoryException( "conflict resolver did not select winner among " + state.items );
if ( conflictIdCycles == null ) throw new RepositoryException( "conflict id cycles have not been identified" ); if ( conflictIds == null ) throw new RepositoryException( "conflict groups have not been identified" ); if ( ctx.winner == null ) throw new RepositoryException( "conflict resolver did not select winner among " + state.items );
problems = result.getDependencyResolutionResult().getCollectionErrors(); if (problems != null && !problems.isEmpty()) { throw new RepositoryException("collection errors: " + problems.toString(), problems.get(0));
new RepositoryException( "Artifact relocations form a cycle: " + visited ); invalidDescriptor( session, trace, artifact, exception );
new RepositoryException( "Artifact relocations form a cycle: " + visited ); invalidDescriptor( session, trace, artifact, exception ); if ( ( getPolicy( session, artifact, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )
new RepositoryException( "Artifact relocations form a cycle: " + visited ); invalidDescriptor( session, trace, a, exception ); if ( ( getPolicy( session, a, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )
new RepositoryException( "Artifact relocations form a cycle: " + visited ); invalidDescriptor( session, trace, a, exception ); if ( ( getPolicy( session, a, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 )