o Adding a artifact handler for sources.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163235 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Trygve Laugstol 2004-11-22 12:46:55 +00:00
parent 2c09099b78
commit aa438b8137
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package org.apache.maven.artifact.handler;
import java.io.File;
import org.apache.maven.artifact.Artifact;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
public class SourceHandler
extends AbstractArtifactHandler
{
public File source( String basedir, Artifact artifact )
{
return new File( basedir, artifact.getArtifactId() + "-" + artifact.getVersion() + "-sources." + extension() );
}
public String extension()
{
return "jar";
}
public String directory()
{
return "sources";
}
}

View File

@ -107,5 +107,11 @@
<implementation>org.apache.maven.artifact.handler.PomHandler</implementation>
</component>
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>source</role-hint>
<implementation>org.apache.maven.artifact.handler.SourceHandler</implementation>
</component>
</components>
</component-set>