org.netbeans.api.project.ant |
Ways of getting information about Ant-based projects useful from other projects.
An {@link org.netbeans.api.project.ant.AntArtifact} is a representation of a
build product created from a (somehow Ant-based) project. Rather than relying on
details of how another project arranges its builds, a parent project can use
{@link org.netbeans.api.project.ant.AntArtifactQuery} to find Ant artifacts from
another project (or, perhaps, arbitrary source not formally contained in a
project). Using artifact information it is possible to tell what build product
(file or directory) will be created and what general sort it is (e.g. JAR vs.
Javadoc); which Ant script and target to run to create that build product; and
how to request that it be cleaned. This information suffices to create an Ant
build script in the parent project that can run sub-builds.
|
Java Source File Name | Type | Comment |
AntArtifact.java | Class | 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. |
AntArtifactQuery.java | Class | Find out how to create a certain build artifact by calling some Ant script. |
AntArtifactQueryTest.java | Class | Test functionality of AntArtifactQuery, StandardAntArtifactQueryImpl, etc. |
AntArtifactTest.java | Class | |
AntBuildExtender.java | Class | Allows extending the project's build script with 3rd party additions.
Check the Project's lookup to see if the feature is supported by a given Ant project type.
Typical usage:
- Lookup the instance of AntBuildExtender in the project at hand
- Create the external build script file with your targets and configuration
- Use the AntBuildExtender to wire your script and targets into the main build lifecycle
- Call
org.netbeans.api.project.ProjectManager.saveProject to persist the changes and
regenerate the main build script
Please note that it's easy to break the build script functionality and any script extensions
shall be done with care. |
AntBuildExtenderAccessorImpl.java | Class | |
AntBuildExtenderTest.java | Class | Test functionality of AntBuildExtender. |
FileChooser.java | Class | Custom file chooser allowing user to choose how a file will be referenced
from a project - via absolute path, or relative path. |