public abstract class AntArtifact extends Object
SimpleAntArtifact
Modifier | Constructor and Description |
---|---|
protected |
AntArtifact()
Empty constructor for use from subclasses.
|
Modifier and Type | Method and Description |
---|---|
FileObject |
getArtifactFile()
Deprecated.
use
AntArtifact.getArtifactFiles() instead |
FileObject[] |
getArtifactFiles()
Convenience method to find the actual artifacts, if they currently exist.
|
URI |
getArtifactLocation()
Deprecated.
use
AntArtifact.getArtifactLocations() instead |
URI[] |
getArtifactLocations()
Get the locations of the build artifacts relative to the Ant script.
|
abstract String |
getCleanTargetName()
Get the name of an Ant target that will delete this artifact.
|
String |
getID()
Returns identifier of the AntArtifact which must be unique within
one project.
|
Project |
getProject()
Find the project associated with this script, if any.
|
Properties |
getProperties()
Optional properties which are used for Ant target execution.
|
FileObject |
getScriptFile()
Convenience method to find the actual script file, if it currently exists.
|
abstract File |
getScriptLocation()
Get a location for the Ant script that is able to produce this artifact.
|
abstract String |
getTargetName()
Get the name of the Ant target that is able to produce this artifact.
|
abstract String |
getType()
Get the type of the build artifact.
|
public abstract String getType()
Particular type identifiers should be agreed upon between
providers and clients.
For example, JavaProjectConstants.ARTIFACT_TYPE_JAR
is defined for JAR outputs.
Others may be defined as needed; for example, tag library JARs,
WARs, EJB JARs, deployment descriptor fragments, etc.
Since the type will be stored in XML, avoid whitespace.
public abstract File getScriptLocation()
public abstract String getTargetName()
public abstract String getCleanTargetName()
@Deprecated public URI getArtifactLocation()
AntArtifact.getArtifactLocations()
insteadAntArtifact.getArtifactLocations()
.AntArtifact.getScriptLocation()
;
may be either relative, or an absolute file
-protocol URIpublic URI[] getArtifactLocations()
AntArtifact.getScriptLocation()
;
may be either relative, or an absolute file
-protocol URIpublic String getID()
@Deprecated public final FileObject getArtifactFile()
AntArtifact.getArtifactFiles()
insteadAntArtifact.getArtifactFiles()
.public final FileObject[] getArtifactFiles()
AntArtifact.getScriptFile()
or AntArtifact.getScriptLocation()
and resolves AntArtifact.getArtifactLocations()
from it.
Note that a project which has been cleaned more recently than it has been built
will generally not have the build artifacts on disk and so this call may easily
return empty array. If you do not rely on the actual presence of the file but just need to
refer to it abstractly, use AntArtifact.getArtifactLocations()
instead.public final FileObject getScriptFile()
AntArtifact.getScriptLocation()
.
The script must exist on disk (Ant cannot run scripts from NetBeans
filesystems unless they are represented on disk).public Project getProject()
AntArtifact.getScriptLocation()
and FileOwnerQuery
,
but subclasses may override that to return something else.public Properties getProperties()