[MRM-1210] Dependency tree should include the artifact type

This commit is contained in:
Olivier Lamy 2014-04-17 15:09:15 +10:00
parent cc78ad2134
commit 2b03379852
5 changed files with 8 additions and 12 deletions

View File

@ -475,9 +475,7 @@ public class DefaultBrowseService
try
{
return dependencyTreeBuilder.buildDependencyTree( selectedRepos, groupId, artifactId, version );
}
catch ( Exception e )
{

View File

@ -331,6 +331,7 @@ browse.artifact.organization.name=Organization
browse.artifact.organization.issueManagement=Issue Tracker
browse.artifact.description=Description
browse.artifact.packaging=Packaging
browse.artifact.type=Extension
browse.home=Home
browse.refresh=Refresh
browse.delete=Delete

View File

@ -1693,6 +1693,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
this.artifactId=null;
this.artifact=false;
this.version=null;
this.fileExtension=null;
}
mapVersionsList=function(data){
if (data){
@ -1963,44 +1964,36 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
this.bundleDescription=bundleDescription;
// contains osgi metadata Bundle-Name if available
//private String bundleName;
this.bundleName=bundleName;
//contains osgi metadata Bundle-License if available
//private String bundleLicense;
this.bundleLicense=bundleLicense;
///contains osgi metadata Bundle-DocURL if available
//private String bundleDocUrl;
this.bundleDocUrl=bundleDocUrl;
// contains osgi metadata Import-Package if available
//private String bundleImportPackage;
this.bundleImportPackage=bundleImportPackage;
///contains osgi metadata Require-Bundle if available
//private String bundleRequireBundle;
this.bundleRequireBundle=bundleRequireBundle;
//private String classifier;
this.classifier=classifier;
//private String packaging;
this.packaging=packaging;
//file extension of the artifact
//private String fileExtension;
this.fileExtension=fileExtension;
this.size=size;
this.crumbEntries=function(){
return calculateCrumbEntries(self.groupId,self.artifactId,self.version);
return calculateCrumbEntries(self.groupId,self.artifactId,self.version,self.fileExtension);
}
}
calculateCrumbEntries=function(groupId,artifactId,version){
calculateCrumbEntries=function(groupId,artifactId,version,fileExtension){
var splitted = groupId.split(".");
var breadCrumbEntries=[];
var curGroupId="";
@ -2012,12 +2005,14 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
var crumbEntryArtifact=new BreadCrumbEntry(groupId,artifactId);
crumbEntryArtifact.artifactId=artifactId;
crumbEntryArtifact.artifact=true;
crumbEntryArtifact.fileExtension=fileExtension;
breadCrumbEntries.push(crumbEntryArtifact);
var crumbEntryVersion=new BreadCrumbEntry(groupId,version);
crumbEntryVersion.artifactId=artifactId;
crumbEntryVersion.artifact=false;
crumbEntryVersion.version=version;
crumbEntryVersion.fileExtension=fileExtension;
breadCrumbEntries.push(crumbEntryVersion);
return breadCrumbEntries;

View File

@ -844,6 +844,7 @@
&nbsp;|&nbsp;<b>${$.i18n.prop('browse.artifact.version')}:</b>&nbsp;
<a class="cursor-hand"
onclick="generalDisplayArtifactVersionDetailViewModel(encodeURIComponent('${crumbEntry.groupId}'),encodeURIComponent('${crumbEntry.artifactId}'),encodeURIComponent('${crumbEntry.version}'))">${crumbEntry.version}</a>&nbsp;
|&nbsp;<b>${$.i18n.prop('browse.artifact.type')}:</b>&nbsp;${crumbEntry.fileExtension}
{{/if}}
{{if j < entries.length - 2}}
&nbsp;/&nbsp;

View File

@ -52,6 +52,7 @@ public class TreeDependencyNodeVisitor
{
TreeEntry entry =
new TreeEntry( getModelMapper().map( dependencyNode.getDependency().getArtifact(), Artifact.class ) );
entry.getArtifact().setFileExtension( dependencyNode.getDependency().getArtifact().getExtension() );
entry.getArtifact().setScope( dependencyNode.getDependency().getScope() );
entry.setParent( currentEntry );
currentEntry = entry;