public class ArtifactUpdateDatabaseConsumer
extends AbstractMonitoredConsumer
implements KnownRepositoryContentConsumer, RegistryListener, Initializable
-{
+{
private static final String TYPE_NOT_ARTIFACT = "file-not-artifact";
private static final String DB_ERROR = "db-error";
{
return;
}
-
+
try
{
- artifact.getModel().setRepositoryId( this.repository.getId() );
+ if( artifact.getModel().getRepositoryId() == null )
+ {
+ artifact.getModel().setRepositoryId( this.repository.getId() );
+ }
// Calculate the hashcodes.
File artifactFile = new File( this.repositoryDir, path );