@Override public void artifactError(final ArtifactContext ac, final Exception e) { Exception exception = e; if (ac.getPom() != null || ac.getArtifact() != null) { final StringBuilder sb = new StringBuilder("Found a problem while indexing"); if (ac.getArtifact() != null) { sb.append(" artifact '" + ac.getArtifact().getAbsolutePath() + "'"); } if (ac.getPom() != null) { sb.append(" pom '" + ac.getPom().getAbsolutePath() + "'"); } exception = new Exception(sb.toString(), e); } exceptions.add(exception); }
File pom = ac.getPom();
public void artifactError( ArtifactContext ac, Exception e ) { if ( !quiet ) { System.err.printf( "! %6d %s - %s\n", count, formatFile( ac.getPom() ), e.getMessage() ); System.err.printf( " %s\n", formatFile( ac.getArtifact() ) ); if ( debug ) { e.printStackTrace(); } } ts = System.currentTimeMillis(); }
File pom = ac.getPom();
@Override public void artifactDiscovered(ArtifactContext ac) { if (canceled.get()) { throw new Cancellation(); } count++; if (handle != null) { String label = ac.getArtifactInfo().groupId + ":" + ac.getArtifactInfo().artifactId + ":" + ac.getArtifactInfo().version; File art = ac.getArtifact(); if (art == null) { art = ac.getPom(); } if (art != null) { File d = art.getParentFile(); if (expectedDirs.contains(d)) { encounteredDirs.add(d); } } handle.progress(label, encounteredDirs.size()); } }
File pom = ac.getPom();
public void artifactDiscovered( ArtifactContext ac ) { count++; long t = System.currentTimeMillis(); ArtifactInfo ai = ac.getArtifactInfo(); if ( !quiet && debug && "maven-plugin".equals( ai.getPackaging() ) ) { System.err.printf( "Plugin: %s:%s:%s - %s %s\n", // ai.getGroupId(), ai.getArtifactId(), ai.getVersion(), ai.getPrefix(), "" + ai.getGoals() ); } if ( !quiet && ( debug || ( t - ts ) > 2000L ) ) { System.err.printf( " %6d %s\n", count, formatFile( ac.getPom() ) ); ts = t; } }
return new ArtifactContext(ac.getPom(), ac.getArtifact(), ac.getMetadata(), new ArtifactInfo(ai.repository, ai.groupId, ai.artifactId, ai.version, null) { private String uinfo = null; @Override public String getUinfo() {
public Model getPomModel() File pom = getPom(); if ( pom != null && pom.isFile() )
public Model getPomModel() File pom = getPom(); if ( pom != null && pom.isFile() )