*/
private String size;
+ /**
+ * @since 1.4-M3
+ */
+ private String type;
+
+
+ /**
+ * @since 1.4-M3
+ */
+ private String path;
+
public Artifact()
{
this.size = size;
}
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType( String type )
+ {
+ this.type = type;
+ }
+
+ public String getPath()
+ {
+ return path;
+ }
+
+ public void setPath( String path )
+ {
+ this.path = path;
+ }
+
@Override
public String toString()
{
sb.append( ", classifier='" ).append( classifier ).append( '\'' );
sb.append( ", packaging='" ).append( packaging ).append( '\'' );
sb.append( ", fileExtension='" ).append( fileExtension ).append( '\'' );
+ sb.append( ", size='" ).append( size ).append( '\'' );
+ sb.append( ", type='" ).append( type ).append( '\'' );
+ sb.append( ", path='" ).append( path ).append( '\'' );
sb.append( '}' );
return sb.toString();
}
public Artifact build()
{
ArtifactReference ref = new ArtifactReference();
- ref.setArtifactId( artifactMetadata.getId() );
+ ref.setArtifactId( artifactMetadata.getProject() );
ref.setGroupId( artifactMetadata.getNamespace() );
ref.setVersion( artifactMetadata.getVersion() );
artifact.setRepositoryId( artifactMetadata.getRepositoryId() );
artifact.setClassifier( classifier );
artifact.setPackaging( type );
+ artifact.setType( type );
artifact.setFileExtension( extension );
+ artifact.setPath( managedRepositoryContent.toPath( ref ) );
// TODO: find a reusable formatter for this
double s = this.artifactMetadata.getSize();
String symbol = "b";
l = new ArrayList<Artifact>();
this.artifacts.put( artifact.getVersion(), l );
}
+
ArtifactDownloadInfoBuilder builder = new ArtifactDownloadInfoBuilder().forArtifactMetadata(
artifact ).withManagedRepositoryContent(
repositoryFactory.getManagedRepositoryContent( repositoryId ) );
<c:set var="packageName">POM</c:set>
</c:when>
<%-- These types aren't usually set in the POM yet, so we fudge them for the well known ones --%>
- <c:when test="${a.type == 'maven-archetype' or a.namespace == 'org.apache.maven.archetypes'}">
+ <c:when test="${a.type == 'maven-archetype' or a.groupId == 'org.apache.maven.archetypes'}">
<c:url var="imageUrl" value="/images/download-type-archetype.png"/>
<c:set var="packageName">Maven Archetype</c:set>
</c:when>
- <c:when test="${a.type == 'maven-skin' or a.namespace == 'org.apache.maven.skins'}">
+ <c:when test="${a.type == 'maven-skin' or a.groupId == 'org.apache.maven.skins'}">
<c:url var="imageUrl" value="/images/download-type-skin.png"/>
<c:set var="packageName">Maven Skin</c:set>
</c:when>
</c:choose>
<c:url var="url" value="/repository/${a.repositoryId}/${a.path}" />
<tr>
- <td><a href="${url}" title="Download ${a.id}"><img src="${imageUrl}" alt="" width="24" height="24"/></a></td>
- <td class="type"><a href="${url}" title="Download ${a.id}">${packageName}</a></td>
+ <td>
+ <a href="${url}" title="Download ${a.artifactId}"><img src="${imageUrl}" alt="" width="24" height="24"/></a>
+ </td>
+ <td class="type"><a href="${url}" title="Download ${a.artifactId}">${packageName}</a></td>
<td class="size">${a.size}</td>
</tr>
</c:forEach>