This document lists changes made to the Ant Project API.
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.
GeneratedFilesInterceptor
called by GeneratedFilesHelper
when it generates a file
CustomizerUtilities.createLicenseHeaderCustomizerPanel
AntProjectHelper.createSharabilityQuery2
getLibraryChooserImportHandler
method into ReferenceHelper
accepting URL
SourceGroupModifierImplementation
implementation for Ant-based projects
SourcesHelper
constructor accepting Project
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
AntProjectHelper.createSharabilityQuery2
getLibraryChooserImportHandler
method into ReferenceHelper
accepting URL
SourceGroupModifierImplementation
implementation for Ant-based projects
SourcesHelper
constructor accepting Project
GeneratedFilesInterceptor
called by GeneratedFilesHelper
when it generates a file
CustomizerUtilities.createLicenseHeaderCustomizerPanel
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
AntProjectHelper.createSharabilityQuery2
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
GeneratedFilesInterceptor
called by GeneratedFilesHelper
when it generates a file
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
getLibraryChooserImportHandler
method into ReferenceHelper
accepting URL
org.netbeans.spi.project.support.ant.SourcesHelper
SourceGroupModifierImplementation
implementation for Ant-based projects
SourcesHelper
constructor accepting Project
org.netbeans.spi.project.support.ant.ui.StoreGroup
org.netbeans.spi.project.support.ant.ui.VariablesSupport
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.
The following classes were moved from org.netbeans.modules.project.ant into the org.netbeans.modules.project.ant.ui module:
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.
GeneratedFilesInterceptor
called by GeneratedFilesHelper
when it generates a file
GeneratedFilesInterceptor
; made by: tzezula
Added GeneratedFilesInterceptor
callback called by GeneratedFilesHelper
when it
generates or regenerates a file.
CustomizerUtilities.createLicenseHeaderCustomizerPanel
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.
AntProjectHelper.createSharabilityQuery2
AntProjectHelper
; made by: jglick; issues:
#207288
AntProjectHelper.createSharabilityQuery2
was introduced
to avoid the deprecated SharabilityQueryImplementation
.
Project types using AntProjectHelper.createSharabilityQuery
should switch to the new method.
getLibraryChooserImportHandler
method into ReferenceHelper
accepting URL
ReferenceHelper
; made by: tzezula; issues:
#
A new method enables a client to specify target folder different from AntProjectHelper.getLibrariesLocation
SourceGroupModifierImplementation
implementation for Ant-based projects
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.
SourcesHelper
constructor accepting Project
SourcesHelper
; made by: jglick; issues:
#146852
The new constructor enables simplified control flow.
AntBasedProjectRegistration
; made by: jtulach; issues:
#153655
Introducing AntBasedProjectRegistration
to
simplify registering Ant based projects. Just write the
project class and annotate it.
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.
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.
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.
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.)
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.
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
AntProjectHelper
; made by: jlahoda; issues:
#134580
A new API method AntProjectHelper.createAuxiliaryProperties
.
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.
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.
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.
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.
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.
AntProjectHelper.notifyDeleted()
. Added ReferenceHelper.fixReferences
.
org.netbeans.spi.project.support.ant.ui.StoreGroup
; made by: phrebejk; issues:
#49648
StoreGroup
which
is capable of creating Swing models for simple Ant project properties and
storing modified values back into properties.
AntArtifact
; made by: dkonecny; issues:
#47788
#50484
#50092
Several enhancements of AntArtifact
were implemented:
ReferenceHelper
was simplified as part of the implementation.
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.
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.
To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.
Clients should begin requesting the new version to avoid a warning at startup.