apache / apache/netbeans

Prepare for Maven 4

Open
#8,648 9 comments 3 reactions 0 assignees View on GitHub
kind:feature Maven needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

The current Apache Maven support in NetBeans is tightly bound to Maven 3.x.y.

Maven 4 introduces a number of improvements, one of which is a proper API in a separate package/module.
Moving from maven 3.9.x to maven 4 is not trivial, because of the API changes.
The Apache Maven project strives to be backward compatible, in particular with to respect to the supported Maven Model versions.

We that the introduction of a proper Maven API simplifies integration into NetBeans as Maven client application.

The new integration should :

* Support execution of Maven goals projects based on model versions > 4.0.0
* Support editor hints of a Maven 4 pom.xml file based on model version supported by Maven 4.
* Listening for and understanding of Maven goal execution events.
* Support Maven 4 features introduced with Maven model version >= 4.1.0

This issue will be used to log advancement in this endeavour.

Several suggestions have been made to move NetBeans forward in this direction.
One is to use the mvnw wrapper as execution vehicle for the time.
This can be based on Mavens [ExecutorTool](https://github.com/apache/maven/blob/master/impl/maven-executor/src/main/java/org/apache/maven/cling/executor/ExecutorTool.java) and [ToolboxTool](https://github.com/apache/maven/blob/master/impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java).
These Maven API interfaces may be usable be used to adapt NetBeans [MavenCommandLineExecutor](https://github.com/apache/netbeans/blob/master/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java).

### Use case/motivation

To move NetBeans forward.

### Related issues

Issue #8632

### Are you willing to submit a pull request?

Yes, when I have something worth pulling.

Contributor guide

Open the contributing guide

Research direction

Start with java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java and compare its integration points with Maven's ExecutorTool and ToolboxTool mentioned in the issue. Review related issue #8632, then define completion against the listed Maven 4 goals, model-version support, editor hints, and execution-event handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.