mirror of https://github.com/apache/archiva.git
set repository id in ArtifactUpdateDatabaseConsumer only when repository id is null
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@747306 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a0da36af3c
commit
a9a04ebb7d
|
@ -57,7 +57,7 @@ import java.util.List;
|
|||
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";
|
||||
|
@ -161,10 +161,13 @@ public class ArtifactUpdateDatabaseConsumer
|
|||
{
|
||||
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 );
|
||||
|
|
Loading…
Reference in New Issue