aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-database/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-database/src/main')
-rw-r--r--archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java
index 569e1d63f..d59cbf9cc 100644
--- a/archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java
+++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java
@@ -42,17 +42,20 @@ public class ArtifactPersistence
{
return new String[] { "ArtifactKeys" };
}
-
- private ArtifactKey toKey(Artifact artifact)
+
+ private ArtifactKey toKey( Artifact artifact )
{
ArtifactKey key = new ArtifactKey();
key.setGroupId( artifact.getGroupId() );
key.setArtifactId( artifact.getArtifactId() );
- key.set
+ key.setVersion( artifact.getVersion() );
+ key.setClassifier( artifact.getClassifier() );
+ key.setType( artifact.getType() );
return key;
}
- public void create( Artifact artifact ) throws ArchivaDatabaseException
+ public void create( Artifact artifact )
+ throws ArchivaDatabaseException
{
SqlMapClient sqlMap = ibatisHelper.getSqlMapClient();
@@ -62,7 +65,6 @@ public class ArtifactPersistence
getLogger().info( "Adding artifact." );
sqlMap.update( "addArtifact", artifact );
-
sqlMap.commitTransaction();
}