@Override public void artifactInstalled(RepositoryEvent event) { logger.info("Installed " + event.getArtifact() + " to " + event.getFile()); }
@Override public void artifactInstalling(RepositoryEvent event) { logger.info("Installing " + event.getArtifact() + " to " + event.getFile()); }
@Override public void metadataInstalling(RepositoryEvent event) { logger.info("Installing " + event.getMetadata() + " to " + event.getFile()); }
@Override public void metadataInstalled(RepositoryEvent event) { logger.info("Installed " + event.getMetadata() + " to " + event.getFile()); }
public void metadataInstalled(RepositoryEvent event) { logger.debug("Installed " + event.getMetadata() + " to " + event.getFile()); }
public void metadataInstalling(RepositoryEvent event) { logger.debug("Installing " + event.getMetadata() + " to " + event.getFile()); }
public void metadataInstalled(RepositoryEvent event) { logger.debug("Installed " + event.getMetadata() + " to " + event.getFile()); }
public void metadataInstalling( RepositoryEvent event ) { out.println( "Installing " + event.getMetadata() + " to " + event.getFile() ); }
public void metadataInstalled( RepositoryEvent event ) { out.println( "Installed " + event.getMetadata() + " to " + event.getFile() ); }
public void artifactInstalled(RepositoryEvent event) { logger.debug("Installed " + event.getArtifact() + " to " + event.getFile()); }
public void artifactInstalling(RepositoryEvent event) { logger.debug("Installing " + event.getArtifact() + " to " + event.getFile()); }
public void artifactInstalled( RepositoryEvent event ) { out.println( "Installed " + event.getArtifact() + " to " + event.getFile() ); }
public void artifactInstalling( RepositoryEvent event ) { out.println( "Installing " + event.getArtifact() + " to " + event.getFile() ); }
public void artifactInstalled(RepositoryEvent event) { logger.debug("Installed " + event.getArtifact() + " to " + event.getFile()); }
public void artifactInstalling(RepositoryEvent event) { logger.debug("Installing " + event.getArtifact() + " to " + event.getFile()); }
public void metadataInstalling(RepositoryEvent event) { logger.debug("Installing " + event.getMetadata() + " to " + event.getFile()); }
/** * From Benjamin Bentmann: * Aether artifact resolution can succeed or fail, the event is fired in * both cases to signal the end of the resolution. * Checking the artifact file is another way to detect failure/success, by * definition, an artifact is considered resolved if and only if it has a file. */ @TestAccessible ArtifactOperationDTO resolveOperationType( final RepositoryEvent event ) { ArtifactOperationDTO result; if( null == event.getFile() ) { for( Exception e : event.getExceptions() ) { log.debug( "Artifact not found", e ); } result = ArtifactOperationDTO.NOT_FOUND; } else { result = ArtifactOperationDTO.valueOf( event.getType().name().substring( 9 ) ); } return result; }
/** * From Benjamin Bentmann: * Aether artifact resolution can succeed or fail, the event is fired in * both cases to signal the end of the resolution. * Checking the artifact file is another way to detect failure/success, by * definition, an artifact is considered resolved if and only if it has a file. */ @TestAccessible ArtifactOperationDTO resolveOperationType( final RepositoryEvent event ) { ArtifactOperationDTO result; if( null == event.getFile() ) { for( Exception e : event.getExceptions() ) { log.debug( "Artifact not found", e ); } result = ArtifactOperationDTO.NOT_FOUND; } else { result = ArtifactOperationDTO.valueOf( event.getType().name().substring( 9 ) ); } return result; }
public void handle(final RepositoryEvent event) throws Exception { log.debug("Repository event: {}", event); logRequestTrace(event); if( isInterestingArtifactEvent( event ) ) { // Converter checks for nulls. ArtifactDTO artifact = MavenArtifactConverter.convertAetherArtifact(event.getArtifact()); // getVersion vs getBaseVersion // getVersion is the timestamped snapshot vs -SNAPSHOT // Record both, MavenCoordinatesDTO.getVersion() should always return -SNAPSHOT for // snapshot artifacts, unless the pom is explicitly using a timestamp snapshot. // * INSTALLED vs DEPLOYED ramifications: // use of this as the version would cause deployed artifacts to not match any // registered installed artifacts because installed artifacts are -SNAPSHOT // * External -SNAPSHOT dependency DOWNLOADED and RESOLVED ramifications: // the aether getVersion is the timestamped format, which is handy to know the exact version used in the build // but if -SNAPSHOT was declared in the pom then the devs don't likely care that much. // TODO: Could also impact up/downstream triggered builds and fingerprinting? ArtifactOperationDTO operation = resolveOperationType( event ); // Null File is acceptable. getBuildRecorder().recordArtifactAction(artifact, operation, event.getFile()); //logRepositoryConfiguration(operation,event); } }
public void handle(final RepositoryEvent event) throws Exception { log.debug("Repository event: {}", event); logRequestTrace(event); if( isInterestingArtifactEvent( event ) ) { // Converter checks for nulls. ArtifactDTO artifact = MavenArtifactConverter.convertAetherArtifact(event.getArtifact()); // getVersion vs getBaseVersion // getVersion is the timestamped snapshot vs -SNAPSHOT // Record both, MavenCoordinatesDTO.getVersion() should always return -SNAPSHOT for // snapshot artifacts, unless the pom is explicitly using a timestamp snapshot. // * INSTALLED vs DEPLOYED ramifications: // use of this as the version would cause deployed artifacts to not match any // registered installed artifacts because installed artifacts are -SNAPSHOT // * External -SNAPSHOT dependency DOWNLOADED and RESOLVED ramifications: // the aether getVersion is the timestamped format, which is handy to know the exact version used in the build // but if -SNAPSHOT was declared in the pom then the devs don't likely care that much. // TODO: Could also impact up/downstream triggered builds and fingerprinting? ArtifactOperationDTO operation = resolveOperationType( event ); // Null File is acceptable. getBuildRecorder().recordArtifactAction(artifact, operation, event.getFile()); //logRepositoryConfiguration(operation,event); } }