org.netbeans.modules.ruby.spi.project.support.rake |
Principal package for implementing typical Ant-based projects.
A typical project based on Ant follows a standard pattern of having a project
folder containing:
build.xml
A top-level editable build script.
- various folders such as
src
Development files.
- various folders such as
build
Build products. Not sharable in a VCS.
nbproject/build-impl.xml
Main logic for the build; regenerated from nbproject/project.xml
but sharable.
nbproject/project.xml
General project metadata, including a declaration of the type of project,
its name, some structural parameters relating to the build, a list of
subprojects, etc.
nbproject/project.properties
Sharable build configuration for the project.
nbproject/private/private.xml
Per-user (or per-checkout) project metadata, if any.
nbproject/private/private.properties
Per-user build configuration for the project.
nbproject/private/cache
Cache directory containing disposable files that might speed up various
operations.
Note that since Ant is not aware of the NetBeans Filesystems API, all these
files must be physically present on disk, not e.g. in an archive or remote
filesystem.
There may also be a file named build.properties located in the
NetBeans user directory which can supply additional definitions needed for a
build: e.g. the locations of Java platforms and libraries. A typical
build-impl.xml loads property definitions from this global
properties file as well as the project's
nbproject/project.properties and
nbproject/private/private.properties .
The basic operations commonly performed on an Ant-based project are:
Creation from wizard, including build.xml .
Loading metadata from disk.
Modifying metadata and build properties in memory, and subsequently saving
to disk.
Regenerating nbproject/build-impl.xml , typically based on
transforming nbproject/project.xml with an XSLT stylesheet.
Running a build target of a well-known name in build.xml
using Ant.
Enumerating important build outputs ("artifacts").
Adding dependencies on "subprojects" by getting information about their artifacts
and storing references to them.
Interpreting values of Ant properties found on disk, to be used in
providing information to the IDE about various development files (e.g. when
implementing queries).
A new category of Ant-based project can be registered in the system by
adding an implementation of
{@link org.netbeans.modules.ruby.spi.project.support.rake.RakeBasedProjectType} to the default
lookup. This will get an instance of
{@link org.netbeans.modules.ruby.spi.project.support.rake.RakeProjectHelper} for every project
it creates; the helper does a lot of the work required to interact with the file
structure outlined above.
{@link org.netbeans.modules.ruby.spi.project.support.rake.ActionHelper} provides a number
of utilities which make it easy to run Ant targets.
{@link org.netbeans.modules.ruby.spi.project.support.rake.ReferenceHelper}s can also be
created by an Ant-based project and used to manage references to subprojects and
their artifacts in a high-level manner.
{@link org.netbeans.modules.ruby.spi.project.support.rake.ProjectGenerator} provides the
easiest way to create a new Ant-based project on disk. Use
{@link org.netbeans.modules.ruby.spi.project.support.rake.GeneratedFilesHelper} to make
build scripts and
{@link org.netbeans.modules.ruby.spi.project.support.rake.ProjectXmlSavedHook} to be told when
to recreate them.
{@link org.netbeans.modules.ruby.spi.project.support.rake.EditableProperties} is a
VCS-friendly alternative to {@link java.util.Properties}.
{@link org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils} also provides various
methods for working with Ant concepts such as relative file paths, property
substitution, etc.
|
Java Source File Name | Type | Comment |
EditableProperties.java | Class | Similar to
java.util.Properties but designed to retain additional
information needed for safe hand-editing.
Useful for various *.properties in a project:
- Can associate comments with particular entries.
- Order of entries preserved during modifications whenever possible.
- VCS-friendly: lines which are not semantically modified are not textually modified.
- Can automatically insert line breaks in new or modified values at positions
that are likely to be semantically meaningful, e.g.
|
ExtensibleMetadataProviderImpl.java | Class | Manages extensible (freeform) metadata in an Ant-based project. |
FilterPropertyProvider.java | Class | Property provider that delegates to another source. |
GeneratedFilesHelper.java | Class | Helps a project type (re-)generate, and manage the state and versioning of,
build.xml and build-impl.xml . |
ProjectGenerator.java | Class | Utilities to create new Ant-based projects on disk. |
ProjectProperties.java | Class | Manages the loaded property files for
RakeProjectHelper . |
ProjectXmlSavedHook.java | Class | Hook run when nbproject/project.xml is saved. |
PropertyEvaluator.java | Interface | A way of mapping property names to values.
This interface defines no independent thread safety, but in typical usage
it will be used with the project manager mutex. |
PropertyProvider.java | Interface | Provides a set of Ant property definitions that might be evaluated in
some context.
This interface defines no independent thread safety, but in typical usage
it will be used with the project manager mutex. |
PropertyUtils.java | Class | Support for working with Ant properties and property files. |
RakeBasedProjectType.java | Interface | Plugin for an Ant project type. |
RakeProjectEvent.java | Class | Event object corresponding to a change made in an Ant project's metadata. |
RakeProjectHelper.java | Class | Support class for implementing Ant-based projects. |
RakeProjectListener.java | Interface | Listener for changes in Ant project metadata. |
ReferenceHelper.java | Class | Helps manage inter-project references.
Normally you would create an instance of this object and keep it in your
project object in order to support
SubprojectProvider and various
operations that change settings which might refer to build artifacts from
other projects: e.g. |
SharabilityQueryImpl.java | Class | Standard impl of
SharabilityQueryImplementation . |
SimpleRakeArtifact.java | Class | A basic RakeArtifact implementation. |
SourcesHelper.java | Class | Helper class to work with source roots and typed folders of a project. |
SubprojectProviderImpl.java | Class | Translates a list of subproject names into actual subprojects
for an Ant-based project. |