|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.api.project.ant.AntArtifact
Represents one artifact of an Ant build. For example, if a build script is known to generate a JAR of a certain name as a result of running a certain target, this object will name that JAR and point to the script and target responsible for creating it. You can use this information to add an <ant> task to another project which will generate that JAR as a dependency before using it.
SimpleAntArtifact
Constructor Summary | |
protected |
AntArtifact()
Empty constructor for use from subclasses. |
Method Summary | |
FileObject |
getArtifactFile()
Deprecated. use getArtifactFiles() instead |
FileObject[] |
getArtifactFiles()
Convenience method to find the actual artifacts, if they currently exist. |
URI |
getArtifactLocation()
Deprecated. use 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AntArtifact()
Method Detail |
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.
XXX format - NMTOKEN maybe
public abstract File getScriptLocation()
public abstract String getTargetName()
public abstract String getCleanTargetName()
public URI getArtifactLocation()
getArtifactLocations()
instead
getArtifactLocations()
.
getScriptLocation()
;
may be either relative, or an absolute file
-protocol URIpublic URI[] getArtifactLocations()
getScriptLocation()
;
may be either relative, or an absolute file
-protocol URIpublic String getID()
public final FileObject getArtifactFile()
getArtifactFiles()
instead
getArtifactFiles()
.
public final FileObject[] getArtifactFiles()
getScriptFile()
or getScriptLocation()
and resolves 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 getArtifactLocations()
instead.
public final FileObject getScriptFile()
getScriptLocation()
.
The script must exist on disk (Ant cannot run scripts from NetBeans
filesystems unless they are represented on disk).
public Project getProject()
getScriptLocation()
and FileOwnerQuery
,
but subclasses may override that to return something else.
public Properties getProperties()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |