git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1343416 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.4-M3
@@ -372,7 +372,7 @@ public class DefaultFileUploadService | |||
String filename = artifactPath.substring( lastIndex + 1 ); | |||
if ( VersionUtil.isSnapshot( version ) ) | |||
{ | |||
filename = filename.replaceAll( "SNAPSHOT", timestamp + "-" + newBuildNumber ); | |||
filename = filename.replaceAll( VersionUtil.SNAPSHOT, timestamp + "-" + newBuildNumber ); | |||
} | |||
boolean fixChecksums = |
@@ -281,13 +281,17 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock | |||
mainContent.find("#artifact_content_tree").html(""); | |||
mainContent.find("#artifact-content-text" ).html(""); | |||
var idValue = $(this ).attr("id"); | |||
var classifier=idValue.substringBeforeLast(":"); | |||
var type = idValue.substringAfterLast(":"); | |||
$.log("click:" + idValue + " -> " + classifier + ":" + type ); | |||
var splitted = idValue.split(":"); | |||
var classifier=splitted[0];//idValue.substringBeforeLast(":"); | |||
var version=splitted[1]; | |||
var type = splitted[2]; | |||
$.log("click:" + idValue + " -> " + classifier + ":" + type + ":" + version); | |||
if (type=="pom"){ | |||
$.log("show pom"); | |||
var pomContentUrl = "restServices/archivaServices/browseService/artifactContentText/"+encodeURIComponent(self.groupId); | |||
pomContentUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version); | |||
pomContentUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(version); | |||
pomContentUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository()); | |||
pomContentUrl+="&t=pom"; | |||
mainContent.find("#artifact-content-text" ).html(smallSpinnerImg()); | |||
@@ -304,7 +308,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock | |||
return; | |||
} | |||
var entriesUrl = "restServices/archivaServices/browseService/artifactContentEntries/"+encodeURIComponent(self.groupId); | |||
entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version); | |||
entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(version); | |||
entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository()); | |||
if(classifier){ | |||
entriesUrl+="&c="+encodeURIComponent(classifier); | |||
@@ -315,7 +319,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock | |||
},function(file) { | |||
$.log("file:"+file.substringBeforeLast("/")+',classifier:'+classifier); | |||
var fileContentUrl = "restServices/archivaServices/browseService/artifactContentText/"+encodeURIComponent(self.groupId); | |||
fileContentUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version); | |||
fileContentUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(version); | |||
fileContentUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository()); | |||
if(type){ | |||
fileContentUrl+="&t="+encodeURIComponent(type); |
@@ -811,8 +811,8 @@ | |||
<div class="span4"> | |||
<ul id="artifact-content-list-files"> | |||
{{each artifactDownloadInfos}} | |||
<li id="${$value.classifier}:${$value.type}"> | |||
<a href="#">${$value.type}</a> | |||
<li id="${$value.classifier}:${$value.version}:${$value.type}"> | |||
<a href="#">${$value.type}:${$value.version}</a> | |||
</li> | |||
{{/each}} | |||
</ul> |
@@ -26,15 +26,16 @@ import org.apache.archiva.admin.model.beans.ManagedRepository; | |||
import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; | |||
import org.apache.archiva.audit.AuditEvent; | |||
import org.apache.archiva.audit.Auditable; | |||
import org.apache.archiva.common.utils.VersionUtil; | |||
import org.apache.archiva.metadata.model.ArtifactMetadata; | |||
import org.apache.archiva.metadata.repository.MetadataRepository; | |||
import org.apache.archiva.metadata.repository.RepositorySession; | |||
import org.apache.archiva.metadata.repository.filter.Filter; | |||
import org.apache.archiva.metadata.repository.filter.IncludesFilter; | |||
import org.apache.archiva.redback.components.taskqueue.TaskQueueException; | |||
import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler; | |||
import org.apache.archiva.scheduler.repository.RepositoryTask; | |||
import org.apache.archiva.stagerepository.merge.Maven2RepositoryMerger; | |||
import org.apache.archiva.redback.components.taskqueue.TaskQueueException; | |||
import org.springframework.context.annotation.Scope; | |||
import org.springframework.stereotype.Controller; | |||
@@ -296,7 +297,7 @@ public class MergeAction | |||
for ( ArtifactMetadata metadata : sourceArtifacts ) | |||
{ | |||
if ( metadata.getProjectVersion().contains( "SNAPSHOT" ) ) | |||
if ( metadata.getProjectVersion().contains( VersionUtil.SNAPSHOT ) ) | |||
{ | |||
artifactsWithOutSnapshots.add( metadata ); | |||
} |
@@ -35,6 +35,7 @@ import org.apache.archiva.maven2.metadata.MavenMetadataReader; | |||
import org.apache.archiva.model.ArchivaRepositoryMetadata; | |||
import org.apache.archiva.model.ArtifactReference; | |||
import org.apache.archiva.model.SnapshotVersion; | |||
import org.apache.archiva.redback.components.taskqueue.TaskQueueException; | |||
import org.apache.archiva.repository.ManagedRepositoryContent; | |||
import org.apache.archiva.repository.RepositoryContentFactory; | |||
import org.apache.archiva.repository.RepositoryException; | |||
@@ -54,7 +55,6 @@ import org.apache.commons.io.IOUtils; | |||
import org.apache.commons.lang.StringUtils; | |||
import org.apache.maven.model.Model; | |||
import org.apache.maven.model.io.xpp3.MavenXpp3Writer; | |||
import org.apache.archiva.redback.components.taskqueue.TaskQueueException; | |||
import org.springframework.context.annotation.Scope; | |||
import org.springframework.stereotype.Controller; | |||
@@ -343,7 +343,7 @@ public class UploadAction | |||
String filename = artifactPath.substring( lastIndex + 1 ); | |||
if ( VersionUtil.isSnapshot( version ) ) | |||
{ | |||
filename = filename.replaceAll( "SNAPSHOT", timestamp + "-" + newBuildNumber ); | |||
filename = filename.replaceAll( VersionUtil.SNAPSHOT, timestamp + "-" + newBuildNumber ); | |||
} | |||
boolean fixChecksums = |
@@ -111,7 +111,7 @@ public class RepositoryModelResolver | |||
{ | |||
// is a SNAPSHOT ? so we can try to find locally before asking remote repositories. | |||
if ( StringUtils.contains( version, "SNAPSHOT" ) ) | |||
if ( StringUtils.contains( version, VersionUtil.SNAPSHOT ) ) | |||
{ | |||
File localSnapshotModel = findTimeStampedSnapshotPom( groupId, artifactId, version, model.getParent() ); | |||
if ( localSnapshotModel != null ) |