Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`@Execute` with a custom phase or `"none"` fails descriptor extraction

Open Beginner friendly
#1,232 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@CaptainAni187 is already working on this.

Since Oct 6, 2026.

  • #1235 by @CaptainAni187 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
build-system

Research direction

Start in maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/datamodel/ExecuteAnnotationContent.java at phase(String), especially the overwrite identified around line 75. Reproduce descriptor extraction with @Execute(phase = "none") and a custom phase such as "my-phase"; done means both values no longer throw and standard lifecycle phases still work.

Written by the indexing model from the issue text.

Description

bug
Affected version

4.0.0-beta-3; the code is unchanged on master

Bug description

ExecuteAnnotationContent.phase(String) matches the value against LifecyclePhase and otherwise keeps it as a custom phase, then its last line overwrites the result with LifecyclePhase.valueOf(phase) (ExecuteAnnotationContent.java:75). A standard phase id such as generate-sources returns from the loop before reaching that line. Any other value throws, so the Maven 4 API @Execute cannot fork a custom phase (the case MPLUGIN-439 added customPhase for), and @Execute(phase = "none") fails too:

Error extracting plugin descriptor: 'java.lang.reflect.InvocationTargetException': No enum constant org.apache.maven.plugins.annotations.LifecyclePhase.none

Reproduced with maven-plugin-plugin 4.0.0-beta-3 under Maven 4.0.0-rc-7 with @Execute(phase = "none") and with @Execute(phase = "my-phase") on an otherwise empty mojo.

The loop came in with 010c9b2e (MPLUGIN-508); line 75 is the method's earlier body and should go.

Dominant language
Java
Stars
63
Forks
76
Avg merge
1d 4h
Merged PRs (30d)
27

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/maven-plugin-tools

All issues in apache/maven-plugin-tools

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.