## org.jvnet.maven.plugin.antrun
Class AttachArtifactTask

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.jvnet.maven.plugin.antrun.AttachArtifactTask

All Implemented Interfaces:
  java.lang.Cloneable

    public class AttachArtifactTask

extends org.apache.tools.ant.Task

Attaches the artifact to Maven.

Author:
  Kohsuke Kawaguchi

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`AttachArtifactTask()`

Method Summary
`void` `execute()`
`void` `setClassifier(java.lang.String classifier)` Optional classifier.
`void` `setFile(java.io.File file)` The file to be treated as an artifact.
`void` `setType(java.lang.String type)` Artifact type.

Methods inherited from class org.apache.tools.ant.Task
`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AttachArtifactTask

    public AttachArtifactTask()

Method Detail

### setFile

    public void setFile(java.io.File file)

  The file to be treated as an artifact.

### setClassifier

    public void setClassifier(java.lang.String classifier)

  Optional classifier. If left unset, the task will attach the main artifact.

### setType

    public void setType(java.lang.String type)

  Artifact type. Think of it as a file extension. Optional, and if omitted, infered from the file extension.

### execute

    public void execute()
                 throws org.apache.tools.ant.BuildException

  Overrides:
    `execute` in class `org.apache.tools.ant.Task`
  Throws:
    `org.apache.tools.ant.BuildException`

Copyright © 2011. All Rights Reserved.