Skip navigation links

Introduction

This document lists changes made to the Ant Project API.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: org.netbeans.modules.project.ant/1 > 1.20

Changes by affected class

org.netbeans.api.project.ant.AntArtifact

org.netbeans.spi.project.support.ant.AntBasedProjectRegistration

org.netbeans.api.project.ant.AntBuildExtender

org.netbeans.spi.project.ant.AntBuildExtenderFactory

org.netbeans.spi.project.ant.AntBuildExtenderImplementation

org.netbeans.spi.project.support.ant.AntProjectHelper

org.netbeans.spi.project.support.ant.ui.CustomizerUtilities

org.netbeans.api.project.ant.FileChooser

org.netbeans.spi.project.support.ant.FilterPropertyProvider

org.netbeans.spi.project.support.ant.GeneratedFilesHelper

org.netbeans.spi.project.ant.GeneratedFilesInterceptor

org.netbeans.spi.project.support.ant.PathMatcher

org.netbeans.spi.project.support.ant.ProjectGenerator

org.netbeans.spi.project.support.ant.PropertyUtils

org.netbeans.spi.project.support.ant.ReferenceHelper

org.netbeans.spi.project.support.ant.SourcesHelper

org.netbeans.spi.project.support.ant.ui.StoreGroup

org.netbeans.spi.project.support.ant.ui.VariablesSupport


Details of all changes by API and date


Ant Project API

Support for source root grouping

Mar 20 '17; API spec. version: 1.68; made by: sdedic

A SourceRootConfig can be identifier by a structured "identifier" so when a new SourceGroup should be created as an associcate to existing sources, it is created in appropriate "sibling" location. See SourceGroupModifier for more details.

Desktop dependent Ant Based Project Support UI extracted

May 27 '14; API spec. version: 1.61; made by: tstupka

The following classes were moved from org.netbeans.modules.project.ant into the org.netbeans.modules.project.ant.ui module:


Compatibility:

Runtime compatibility remains, compile time compatibility is mostly preserved too. It is however recommended to upgrade dependencies of client modules. Try running ant fix-dependencies in your Ant module.

Added GeneratedFilesInterceptor called by GeneratedFilesHelper when it generates a file

Oct 15 '13; API spec. version: 1.1.58; affected top-level classes: GeneratedFilesInterceptor; made by: tzezula

Added GeneratedFilesInterceptor callback called by GeneratedFilesHelper when it generates or regenerates a file.


Compatibility:

Added CustomizerUtilities.createLicenseHeaderCustomizerPanel

Mar 14 '13; API spec. version: 1.1.53; affected top-level classes: org.netbeans.spi.project.support.ant.ui.CustomizerUtilities; made by: mkleint; issues: #226773

CustomizerUtilities.createLicenseHeaderCustomizerPanel() was introduced to allow project modules to create license header selection and editing panel.


Compatibility:

Added AntProjectHelper.createSharabilityQuery2

Jan 20 '12; API spec. version: 1.47; affected top-level classes: AntProjectHelper; made by: jglick; issues: #207288

AntProjectHelper.createSharabilityQuery2 was introduced to avoid the deprecated SharabilityQueryImplementation.


Compatibility:

Project types using AntProjectHelper.createSharabilityQuery should switch to the new method.

Added getLibraryChooserImportHandler method into ReferenceHelper accepting URL

Apr 19 '11; API spec. version: 1.41; affected top-level classes: ReferenceHelper; made by: tzezula; issues: #

A new method enables a client to specify target folder different from AntProjectHelper.getLibrariesLocation

Added SourceGroupModifierImplementation implementation for Ant-based projects

Jun 4 '09; API spec. version: 1.33; affected top-level classes: SourcesHelper; made by: rmichalsky; issues: #143633

Added method SourcesHelper.createSourceGroupModifierImplementation creating SourceGroupModifierImplementation implementation for Ant-based projects. Also added SourcesHelper.SourceRootConfig class and SourcesHelper.sourceRoot(String location) method for more readable configuration of source roots. These support additional parameter hint(), which is required for the implementation to work. Existing SourcesHelper.addPrincipalSourceRoot and SourcesHelper.addTypedSourceRoot methods are deprecated.

Added SourcesHelper constructor accepting Project

Apr 2 '09; API spec. version: 1.31; affected top-level classes: SourcesHelper; made by: jglick; issues: #146852

The new constructor enables simplified control flow.

Register Ant based projects with @annotation

Mar 3 '09; API spec. version: 1.30; affected top-level classes: AntBasedProjectRegistration; made by: jtulach; issues: #153655

Introducing AntBasedProjectRegistration to simplify registering Ant based projects. Just write the project class and annotate it.

Added method SourcesHelper.registerExternalRoots with minimalSubfolders parameter

Sep 30 '08; API spec. version: 1.26; affected top-level classes: SourcesHelper; made by: tzezula; issues: #148185

Added SourcesHelper.registerExternalRoots with additional parameter minimalSubfolders controlling how the roots having an explicit include list are registered. When true only those subfolders which are included (or folders directly containing included files) will be registered, otherwise the whole source root is registered.

Enhance AntArtifact support with ability to specify build.xml location and name

Aug 27 '08; API spec. version: 1.25; affected top-level classes: AntProjectHelper; made by: dkonecny; issues: #144273

AntProjectHelper.createSimpleAntArtifact enhanced with new parameter: property name holding project relative location and name of Ant build script to use.

Project XML metadata automatically validated against schemas

Jul 11 '08; API spec. version: 1.24; affected top-level classes: AntProjectHelper; made by: jglick; issues: #42686

XML schemas may now be registered in ProjectXMLCatalog/**/*.xsd. Any attempts to read or write project.xml or private.xml will first try to validate against the registered schemas.


Compatibility:

Code which was previously trying to store primary configuration data, or auxiliary configuration fragments, which was invalid according to some schema will now fail, whereas before the invalid content would be quietly stored. Of course, it will only be known to be invalid according to that schema if the schema is now registered, and anyway such code was already broken.

XML fragments for which no associated schema exists are unaffected. (The document-scope schemas use lax validation of fragments.)

Support for (IDE) variables in Ant based project types

Jun 12 '08; API spec. version: 1.22; affected top-level classes: org.netbeans.api.project.ant.FileChooser org.netbeans.spi.project.support.ant.ui.VariablesSupport; made by: dkonecny; issues: #136516

FileChooser enhanced with "Use Variable Path" option. Following methods were added: FileChooser.getSelectedPathVariables and FileChooser.enableVariableBasedSelection. For backward compatibility "Use Variable Path" option is by default switched off and has to be enabled. Existing getSelectedPaths() method will keep returning either absolute or relative paths. If "Use Variable Path" option was selected it will return absolute path. Variable based paths are returned via new getSelectedPathVariables method.

Support class added for showing variables manager.

Support for adding/copying libraries used by build process only

Jun 11 '08; API spec. version: 1.23; affected top-level classes: AntBuildExtender; made by: mkubec; issues: #136623

Added methods for adding/copying global libraries that are needed for Ant build script. Added methods: AntBuildExtender.addLibrary, AntBuildExtender.removeLibrary

Added AntProjectHelper.createAuxiliaryProperties()

Jun 9 '08; API spec. version: 1.21; affected top-level classes: AntProjectHelper; made by: jlahoda; issues: #134580

A new API method AntProjectHelper.createAuxiliaryProperties.

Support for project-specific libraries

Jan 22 '08; API spec. version: 1.19; affected top-level classes: AntProjectHelper ReferenceHelper ProjectGenerator org.netbeans.api.project.ant.FileChooser; made by: jglick; issues: #44035

A new XML schema (http://www.netbeans.org/ns/ant-project-libraries/1), several new API methods (AntProjectHelper.getProjectLibrariesPropertyProvider, AntProjectHelper.isSharableProject, AntProjectHelper.getLibrariesLocation, AntProjectHelper.setLibrariesLocation, ProjectGenerator.createProject(FileObject, String, String), ReferenceHelper.createForeignFileReferenceAsIs, ReferenceHelper.createExtraForeignFileReferenceAsIs, ReferenceHelper.copyLibrary, ReferenceHelper.getLibraryChooserImportHandler, ReferenceHelper.createLibraryReference, ReferenceHelper.getProjectLibraryManager, ReferenceHelper.findLibrary) and custom file chooser (FileChooser) provide support for collocated library definitions referred to from Ant-based projects.

Support for adding external files owned by project

Oct 8 '07; API spec. version: 1.17; affected top-level classes: SourcesHelper; made by: mkubec; issues: #57656

Added a method for registering external file that is supposed to be owned by the project, typically used in freeform project to register build products that are external to project dir.

Support for externally extending the project's build script

Apr 10 '07; API spec. version: 1.16; affected top-level classes: AntBuildExtender GeneratedFilesHelper AntBuildExtenderImplementation AntBuildExtenderFactory; made by: mkleint; issues: #93509

Add framework for extending the project's build script with 3rd party snippets, allowing automated extensions to the build process.

Support for source root includes and excludes

Mar 1 '07; API spec. version: 1.15; affected top-level classes: SourcesHelper PathMatcher; made by: jglick; issues: #49026

Ant-based projects can now conveniently specify include and exclude lists for source groups based on Ant's standard patternset syntax.

Added utilities for constructing richer property evaluators

Sep 8 '06; API spec. version: 1.14; affected top-level classes: FilterPropertyProvider PropertyUtils; made by: jglick; issues: #49636

Added a new class and a new method to PropertyUtils to make it easier to write a customizer version of AntProjectHelper.getStandardPropertyEvaluator(), among other things.

Semantic changes in the ReferenceHelper behavior

Aug 28 '05; API spec. version: 1.10; made by: tzezula; issues: #63401
The ReferenceHelper was changed to support better sharability of projects. The collocated references are stored both into the project properties (as relative) and private properties (as absolute)

Basic Support SPI for Project Delete/Copy/Rename/Move

Jul 11 '05; API spec. version: 1.9; made by: jlahoda; issues: #51468
Added AntProjectHelper.notifyDeleted(). Added ReferenceHelper.fixReferences.

Support SPI for creating/storing Swing models for simple Ant properties

Jan 16 '05; API spec. version: 1.6; affected top-level classes: org.netbeans.spi.project.support.ant.ui.StoreGroup; made by: phrebejk; issues: #49648
Introduced new class StoreGroup which is capable of creating Swing models for simple Ant project properties and storing modified values back into properties.

AntArtifact enhancements

Jan 13 '05; API spec. version: 1.5; affected top-level classes: AntArtifact; made by: dkonecny; issues: #47788 #50484 #50092

Several enhancements of AntArtifact were implemented:

  1. execution of an artifact's target can be customized by properties
  2. an artifact can produce several build outputs
  3. an Ant script path is not persisted as a URI, but as a string possibly containing Ant properties

ReferenceHelper was simplified as part of the implementation.


Compatibility:

New schema was defined, but upgrade from old schema to new one is realized only after some new features are used. If project's artifact does not define any properties for artifact nor produce multiple outputs and Ant script lies under the project's directory then old schema is always used. Once project start using some of these new features the schema will be upgraded automatically to new version. This affects any project type which is using ant/project module.

Make ReferenceHelper.createForeignFileReference produce relative links based on properties

Jan 11 '05; API spec. version: 1.4; affected top-level classes: ReferenceHelper; made by: dkonecny; issues: #49550
ReferenceHelper should reuse external project folders as base directories for references it creates where appropriate. The new API allows addition or removal of these base folders.

Switched to major release version 1

Dec 22 '04; API spec. version: 1.3; made by: jglick; issues: #51468

To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.


Compatibility:

Clients should begin requesting the new version to avoid a warning at startup.