org.netbeans.spi.project.support.ant

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » project.ant » org.netbeans.spi.project.support.ant 
org.netbeans.spi.project.support.ant
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.spi.project.support.ant.AntBasedProjectType} to the default lookup. This will get an instance of {@link org.netbeans.spi.project.support.ant.AntProjectHelper} for every project it creates; the helper does a lot of the work required to interact with the file structure outlined above.

To run Ant targets, use ActionUtils.

{@link org.netbeans.spi.project.support.ant.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.spi.project.support.ant.ProjectGenerator} provides the easiest way to create a new Ant-based project on disk. Use {@link org.netbeans.spi.project.support.ant.GeneratedFilesHelper} to make build scripts and {@link org.netbeans.spi.project.support.ant.ProjectXmlSavedHook} to be told when to recreate them.

To allow third-party extensions to build scripts, use {@link org.netbeans.spi.project.ant.AntBuildExtenderImplementation} and {@link org.netbeans.spi.project.support.ant.AntBuildExtenderFactory}.

{@link org.netbeans.spi.project.support.ant.EditableProperties} is a VCS-friendly alternative to {@link java.util.Properties}. {@link org.netbeans.spi.project.support.ant.PropertyUtils} also provides various methods for working with Ant concepts such as relative file paths, property substitution, etc.

Java Source File NameTypeComment
AntBasedProjectType.javaInterface Plugin for an Ant project type.
AntBasedTestUtil.javaClass Test-related utilities for use in ant/project.
AntBasedTestUtilTest.javaClass Test functionality of AntBasedTestUtil itself.
AntProjectEvent.javaClass Event object corresponding to a change made in an Ant project's metadata.
AntProjectHelper.javaClass Support class for implementing Ant-based projects.
AntProjectHelperTest.javaClass Test functionality of AntProjectHelper and AntBasedProjectFactorySingleton.
AntProjectListener.javaInterface Listener for changes in Ant project metadata.
CRC32Calculator.javaClass Makes a package-private method accessible to the Ant task.
EditableProperties.javaClass Similar to java.util.Properties but designed to retain additional information needed for safe hand-editing. Useful for various *.properties in a project:
  1. Can associate comments with particular entries.
  2. Order of entries preserved during modifications whenever possible.
  3. VCS-friendly: lines which are not semantically modified are not textually modified.
  4. Can automatically insert line breaks in new or modified values at positions that are likely to be semantically meaningful, e.g.
EditablePropertiesTest.javaClass
ExtensibleMetadataProviderImpl.javaClass Manages extensible (freeform) metadata in an Ant-based project.
FilterPropertyProvider.javaClass Property provider that delegates to another source.
FilterPropertyProviderTest.javaClass
GeneratedFilesHelper.javaClass Helps a project type (re-)generate, and manage the state and versioning of, build.xml and build-impl.xml.
GeneratedFilesHelperTest.javaClass Test functionality of GeneratedFilesHelper.
GlobFileBuiltQuery.javaClass Simple file built query based on glob patterns.
GlobFileBuiltQueryTest.javaClass Test functionality of GlobFileBuiltQuery.
PathMatcher.javaClass Utility to match Ant-style file patterns with extended glob syntax.

A path matcher can be given an optional list of include patterns, and an optional list of exclude patterns.

PathMatcherTest.javaClass Test of PathMatcher .
ProjectGenerator.javaClass Utilities to create new Ant-based projects on disk.
ProjectGeneratorTest.javaClass Test functionality of ProjectGenerator.
ProjectProperties.javaClass Manages the loaded property files for AntProjectHelper .
ProjectXmlSavedHook.javaClass Hook run when nbproject/project.xml is saved.
PropertyEvaluator.javaInterface 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.javaInterface 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.javaClass Support for working with Ant properties and property files.
PropertyUtilsTest.javaClass Test functionality of PropertyUtils.
ReferenceHelper.javaClass 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.
ReferenceHelperTest.javaClass Test functionality of ReferenceHelper.
SharabilityQueryImpl.javaClass Standard impl of SharabilityQueryImplementation .
SharabilityQueryImplTest.javaClass Test functionality of SharabilityQueryImpl.
SimpleAntArtifact.javaClass A basic AntArtifact implementation.
SimpleAntArtifactTest.javaClass Test functionality of SimpleAntArtifact.
SourcesHelper.javaClass Helper class to work with source roots and typed folders of a project.
SourcesHelperTest.javaClass Test functionality of SourcesHelper.
SubprojectProviderImpl.javaClass Translates a list of subproject names into actual subprojects for an Ant-based project.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.