mirror of https://github.com/apache/archiva.git
[MRM-1210] Dependency tree should include the artifact type
This commit is contained in:
parent
cc78ad2134
commit
2b03379852
|
@ -475,9 +475,7 @@ public class DefaultBrowseService
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
return dependencyTreeBuilder.buildDependencyTree( selectedRepos, groupId, artifactId, version );
|
return dependencyTreeBuilder.buildDependencyTree( selectedRepos, groupId, artifactId, version );
|
||||||
|
|
||||||
}
|
}
|
||||||
catch ( Exception e )
|
catch ( Exception e )
|
||||||
{
|
{
|
||||||
|
|
|
@ -331,6 +331,7 @@ browse.artifact.organization.name=Organization
|
||||||
browse.artifact.organization.issueManagement=Issue Tracker
|
browse.artifact.organization.issueManagement=Issue Tracker
|
||||||
browse.artifact.description=Description
|
browse.artifact.description=Description
|
||||||
browse.artifact.packaging=Packaging
|
browse.artifact.packaging=Packaging
|
||||||
|
browse.artifact.type=Extension
|
||||||
browse.home=Home
|
browse.home=Home
|
||||||
browse.refresh=Refresh
|
browse.refresh=Refresh
|
||||||
browse.delete=Delete
|
browse.delete=Delete
|
||||||
|
|
|
@ -1693,6 +1693,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
|
||||||
this.artifactId=null;
|
this.artifactId=null;
|
||||||
this.artifact=false;
|
this.artifact=false;
|
||||||
this.version=null;
|
this.version=null;
|
||||||
|
this.fileExtension=null;
|
||||||
}
|
}
|
||||||
mapVersionsList=function(data){
|
mapVersionsList=function(data){
|
||||||
if (data){
|
if (data){
|
||||||
|
@ -1963,44 +1964,36 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
|
||||||
this.bundleDescription=bundleDescription;
|
this.bundleDescription=bundleDescription;
|
||||||
|
|
||||||
// contains osgi metadata Bundle-Name if available
|
// contains osgi metadata Bundle-Name if available
|
||||||
//private String bundleName;
|
|
||||||
this.bundleName=bundleName;
|
this.bundleName=bundleName;
|
||||||
|
|
||||||
//contains osgi metadata Bundle-License if available
|
//contains osgi metadata Bundle-License if available
|
||||||
//private String bundleLicense;
|
|
||||||
this.bundleLicense=bundleLicense;
|
this.bundleLicense=bundleLicense;
|
||||||
|
|
||||||
///contains osgi metadata Bundle-DocURL if available
|
///contains osgi metadata Bundle-DocURL if available
|
||||||
//private String bundleDocUrl;
|
|
||||||
this.bundleDocUrl=bundleDocUrl;
|
this.bundleDocUrl=bundleDocUrl;
|
||||||
|
|
||||||
// contains osgi metadata Import-Package if available
|
// contains osgi metadata Import-Package if available
|
||||||
//private String bundleImportPackage;
|
|
||||||
this.bundleImportPackage=bundleImportPackage;
|
this.bundleImportPackage=bundleImportPackage;
|
||||||
|
|
||||||
///contains osgi metadata Require-Bundle if available
|
///contains osgi metadata Require-Bundle if available
|
||||||
//private String bundleRequireBundle;
|
|
||||||
this.bundleRequireBundle=bundleRequireBundle;
|
this.bundleRequireBundle=bundleRequireBundle;
|
||||||
|
|
||||||
//private String classifier;
|
|
||||||
this.classifier=classifier;
|
this.classifier=classifier;
|
||||||
|
|
||||||
//private String packaging;
|
|
||||||
this.packaging=packaging;
|
this.packaging=packaging;
|
||||||
|
|
||||||
//file extension of the artifact
|
//file extension of the artifact
|
||||||
//private String fileExtension;
|
|
||||||
this.fileExtension=fileExtension;
|
this.fileExtension=fileExtension;
|
||||||
|
|
||||||
this.size=size;
|
this.size=size;
|
||||||
|
|
||||||
this.crumbEntries=function(){
|
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 splitted = groupId.split(".");
|
||||||
var breadCrumbEntries=[];
|
var breadCrumbEntries=[];
|
||||||
var curGroupId="";
|
var curGroupId="";
|
||||||
|
@ -2012,12 +2005,14 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
|
||||||
var crumbEntryArtifact=new BreadCrumbEntry(groupId,artifactId);
|
var crumbEntryArtifact=new BreadCrumbEntry(groupId,artifactId);
|
||||||
crumbEntryArtifact.artifactId=artifactId;
|
crumbEntryArtifact.artifactId=artifactId;
|
||||||
crumbEntryArtifact.artifact=true;
|
crumbEntryArtifact.artifact=true;
|
||||||
|
crumbEntryArtifact.fileExtension=fileExtension;
|
||||||
breadCrumbEntries.push(crumbEntryArtifact);
|
breadCrumbEntries.push(crumbEntryArtifact);
|
||||||
|
|
||||||
var crumbEntryVersion=new BreadCrumbEntry(groupId,version);
|
var crumbEntryVersion=new BreadCrumbEntry(groupId,version);
|
||||||
crumbEntryVersion.artifactId=artifactId;
|
crumbEntryVersion.artifactId=artifactId;
|
||||||
crumbEntryVersion.artifact=false;
|
crumbEntryVersion.artifact=false;
|
||||||
crumbEntryVersion.version=version;
|
crumbEntryVersion.version=version;
|
||||||
|
crumbEntryVersion.fileExtension=fileExtension;
|
||||||
breadCrumbEntries.push(crumbEntryVersion);
|
breadCrumbEntries.push(crumbEntryVersion);
|
||||||
|
|
||||||
return breadCrumbEntries;
|
return breadCrumbEntries;
|
||||||
|
|
|
@ -844,6 +844,7 @@
|
||||||
| <b>${$.i18n.prop('browse.artifact.version')}:</b>
|
| <b>${$.i18n.prop('browse.artifact.version')}:</b>
|
||||||
<a class="cursor-hand"
|
<a class="cursor-hand"
|
||||||
onclick="generalDisplayArtifactVersionDetailViewModel(encodeURIComponent('${crumbEntry.groupId}'),encodeURIComponent('${crumbEntry.artifactId}'),encodeURIComponent('${crumbEntry.version}'))">${crumbEntry.version}</a>
|
onclick="generalDisplayArtifactVersionDetailViewModel(encodeURIComponent('${crumbEntry.groupId}'),encodeURIComponent('${crumbEntry.artifactId}'),encodeURIComponent('${crumbEntry.version}'))">${crumbEntry.version}</a>
|
||||||
|
| <b>${$.i18n.prop('browse.artifact.type')}:</b> ${crumbEntry.fileExtension}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if j < entries.length - 2}}
|
{{if j < entries.length - 2}}
|
||||||
/
|
/
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class TreeDependencyNodeVisitor
|
||||||
{
|
{
|
||||||
TreeEntry entry =
|
TreeEntry entry =
|
||||||
new TreeEntry( getModelMapper().map( dependencyNode.getDependency().getArtifact(), Artifact.class ) );
|
new TreeEntry( getModelMapper().map( dependencyNode.getDependency().getArtifact(), Artifact.class ) );
|
||||||
|
entry.getArtifact().setFileExtension( dependencyNode.getDependency().getArtifact().getExtension() );
|
||||||
entry.getArtifact().setScope( dependencyNode.getDependency().getScope() );
|
entry.getArtifact().setScope( dependencyNode.getDependency().getScope() );
|
||||||
entry.setParent( currentEntry );
|
entry.setParent( currentEntry );
|
||||||
currentEntry = entry;
|
currentEntry = entry;
|
||||||
|
|
Loading…
Reference in New Issue