mirror of https://github.com/apache/maven.git
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:
parent
2c09099b78
commit
aa438b8137
|
@ -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ø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";
|
||||||
|
}
|
||||||
|
}
|
|
@ -107,5 +107,11 @@
|
||||||
<implementation>org.apache.maven.artifact.handler.PomHandler</implementation>
|
<implementation>org.apache.maven.artifact.handler.PomHandler</implementation>
|
||||||
</component>
|
</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>
|
</components>
|
||||||
</component-set>
|
</component-set>
|
||||||
|
|
Loading…
Reference in New Issue