Skip navigation links

Introduction

This document lists changes made to the Maven 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.maven/1 > 1.20

Changes by affected class

org.netbeans.modules.maven.execute.ActionToGoalUtils

org.netbeans.modules.maven.api.Constants

org.netbeans.modules.maven.api.NbMavenProject

org.netbeans.modules.maven.api.execute.RunConfig

org.netbeans.modules.maven.api.execute.RunUtils


Details of all changes by API and date


Maven Project API

Allow extensions to declare run-like goals

Dec 6 '23; API spec. version: 2.161; made by: sdedic

The GUI recognizes user modifications to actions and refuses to configure a modified "run" action with vm and app arguments. It is now possible for a plugin to register an alternative goal, which is recognized as "exec"-like one and does not disable the GUI.

For an example, see MavenActionProvider.

Support for partially loaded projects

Oct 3 '23; API spec. version: 2.162; affected top-level classes: NbMavenProject; made by: sdedic
Added a getPartialProject that returns potentially incompletely loaded project instead of a mocked-up fallback (see isErrorPlaceholder(). Also added a isIncomplete() check that checks project's status.

Jan 23 '23; API spec. version: 2.157; affected top-level classes: RunUtils; made by: sdedic
Added a RunUtils.createRunConfig() variant that allows to create a RunConfig for a project-defined action. Clients can use this function to use all user customizations that may have been configured for the project action before executing it using RunUtils.run.

LifecycleParticipants can be ignored

Sep 9 '22; API spec. version: 2.156; made by: sdedic
NetBeans warns if a project / plugin provides AbstractLifecycleParticipants that can reconfigure the project after load. Now some harmless ones can be whitelisted so they do not produce warning / project problem. See LifecycleParticipants.

Project model can be customized for specific action or usage

Aug 10 '22; API spec. version: 2.155; affected top-level classes: NbMavenProject; made by: sdedic
Project state can be inspected with respect to an intended action to be run or used, and possible customized properties or profiles. This allows clients to more precisely follow customizations in the project file and/or action mapping that would be applied when actually using project actions.

Added helper method to get artifact paths from build plugin configurations.

Sep 24 '21; API spec. version: 2.151; made by: sdedic
In addition to String property values, or String lists, artifact-based paths, that are convertible to files, are sometimes present in plugin configuration. The new helper function getPluginPathProperty resolves a list of artifacts from the POM configuration and reports errors encountered.

Plugin-dependent Lookup

Jun 24 '21; API spec. version: 2.149; affected top-level classes: ActionToGoalUtils; made by: sdedic

Actions can be disabled by the MavenActionsProvider for a configuration.

Plugin-dependent Lookup

May 15 '21; API spec. version: 2.148; made by: sdedic

Register services for a specific maven plugin used in the project. See PluginLookup.

Default for frequency of indexing

Apr 1 '21; API spec. version: 2.147; made by: jtulach

Introducing branding APIs specify default frequency for downloading Maven index.

Allow project services, that are ordered after specific packaging type

Feb 10 '21; API spec. version: 2.144; made by: sdedic

Project lookup consists of base services, plus services for the project's packaging type. This change allows for generic post-processing after packaging-specific service. See MavenPackagingLookup for more details.

RunConfig provides access to action lookup for parameters extensibility

Feb 10 '21; API spec. version: 2.144; affected top-level classes: RunConfig; made by: sdedic

RunConfig now serves the originating action's context Lookup from RunConfig.getActionContext() so that the caller can pass extended one-time configuration for the action.


Binary-compatible

Allow to extend or override parameters for user execution from action caller

Feb 10 '21; API spec. version: 2.144; made by: sdedic
Added support for ExplicitProcessParameters for Maven-nature projects. The ExternaProcessParameterss instructions now append to or replace VM argsuments or user program arguments. See MavenCommandLineExecutor for more details.

Default for reusing tabs and compile on save

Oct 12 '20; API spec. version: 2.141; made by: jtulach

Introducing branding APIs to configure default value for reusing tabs and also for compile on save behavior in Maven projects.

Attach to Debugger on triggers

Dec 8 '17; API spec. version: 2.127; affected top-level classes: Constants; made by: monacotoni

New property to allow to attach debugger while goal execution is in progress: ACTION_PROPERTY_JPDAATTACH_TRIGGER. Read more about usage of this property in the nbactions.xml file.

Attach to Debugger after Goal Execution

Mar 10 '15; API spec. version: 2.113; affected top-level classes: Constants; made by: jtulach; issues: #229192

New properties to allow one to attach debugger after a goal is executed: ACTION_PROPERTY_JPDAATTACH, ACTION_PROPERTY_JPDAATTACH_ADDRESS, ACTION_PROPERTY_JPDAATTACH_PORT. Read more about usage of these properties in the nbactions.xml file.

nbactions.xml supports profiles section

Jul 15 '14; API spec. version: 2.107; made by: jtulach; issues: #229192

Format of nbactions.xml file has been extended to support profiles section.