@Override public String getLocalizedMessage() { return getMessage(); }
public static ProjectVersionRef projectVersion( final String src ) { final String[] parts = src.split( ":" ); if ( parts.length != 3 ) { throw new IllegalArgumentException( "Invalid: '" + src + "'. Must contain exactly three fields separated by ':'" ); } try { return new SimpleProjectVersionRef( parts[0], parts[1], parts[2] ); } catch ( final InvalidVersionSpecificationException e ) { throw new IllegalArgumentException( "Invalid: '" + src + "'. Version: '" + parts[2] + "' is invalid: " + e.getMessage(), e ); } }
@Override public void fireErrorEvent( final ProjectRelationshipsErrorEvent evt ) { final ProjectVersionRef ref = evt.getRef(); logger.debug( "Unlocking {} due to error in model.", ref ); try { notifyOfGraph( ref ); } catch ( final InvalidVersionSpecificationException e ) { logger.error( String.format( "Cannot parse version for: '%s'. Failed to unlock waiting threads. Reason: %s", ref, e.getMessage() ), e ); } }
e.getMessage() ), e ); error = e;
e.getMessage() ), e ); error = e;
public void addReportPluginUsages( final URI source, final Builder builder, final MavenPomView pomView, final ProjectVersionRef projectRef ) throws CartoDataException { List<PluginView> plugins = null; try { plugins = pomView.getAllPluginsMatching( "//reporting/plugins/plugin" ); } catch ( final GalleyMavenException e ) { logger.error( String.format( "%s: Cannot retrieve reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } catch ( final InvalidVersionSpecificationException e ) { logger.error( String.format( "%s: Cannot retrieve reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } catch ( final InvalidRefException e ) { logger.error( String.format( "%s: Cannot retrieve reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } addPlugins( plugins, projectRef, builder, source, false ); }
locations, e.getMessage() ), e );
private void addSiteReportPluginUsages( final URI source, final Builder builder, final MavenPomView pomView, final ProjectVersionRef projectRef ) throws CartoDataException { // final List<ProjectVersionRefView> refs = pomView.getProjectVersionRefs( "//plugin[artifactId/text()=\"maven-site-plugin\"]//reportPlugin" ); List<PluginView> plugins = null; try { plugins = pomView.getAllPluginsMatching( "//plugin[artifactId/text()=\"maven-site-plugin\"]//reportPlugin" ); } catch ( final InvalidRefException e ) { logger.error( String.format( "%s: Cannot retrieve site-plugin nested reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } catch ( final InvalidVersionSpecificationException e ) { logger.error( String.format( "%s: Cannot retrieve site-plugin nested reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } catch ( final GalleyMavenException e ) { logger.error( String.format( "%s: Cannot retrieve site-plugin nested reporting plugins: %s", pomView.getRef(), e.getMessage() ), e ); } addPlugins( plugins, projectRef, builder, source, false ); }
public VersionPhrase getBaseVersion() throws InvalidVersionSpecificationException { if ( isRelease() ) { return this; } try { return new VersionPhrase( separator, parts.subList( 0, parts.size() - 2 ) ); } catch ( final InvalidVersionSpecificationException e ) { throw new InvalidVersionSpecificationException( e.getVersion(), "Cannot create base version for non-release: %s. Reason: %s", e, e.getVersion(), e.getMessage() ); } }
locations, e.getMessage() ), e );
e.getMessage() ), e ); logger.error( String.format( "%s: Cannot retrieve build plugins: %s", pomView.getRef(), e.getMessage() ), e );
public void unlockOnFileErrorEvent( @Observes final FileErrorEvent evt ) { final String path = evt.getTransfer() .getPath(); try { final ArtifactPathInfo info = ArtifactPathInfo.parse( path ); // logger.info( "Unlocking {} due to file download error.", info ); if ( info != null ) { final ProjectVersionRef ref = new SimpleProjectVersionRef( info.getGroupId(), info.getArtifactId(), info.getVersion() ); delegate.notifyOfGraph( ref ); } } catch ( final InvalidVersionSpecificationException e ) { logger.error( String.format( "Cannot parse version for path: '%s'. Failed to unlock waiting threads. Reason: %s", path, e.getMessage() ), e ); } }
path, e.getMessage() ), e );
locations, e.getMessage() ), e );
locations, e.getMessage() ), e );
logger.error( String.format( "%s: Cannot retrieve build extensions: %s", pomView.getRef(), e.getMessage() ), e ); pomView.getRef(), e.getMessage(), ext.toXML() ), e );
projectRef, e.getMessage(), dep.toXML() ), e );
projectRef, pluginRef, e.getMessage(), dep.toXML() ), e );