[ARCHETYPE-523] Failing call to archetype:generate doesn't fail calling build

Open
#785 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start by reproducing the archetype:generate goal during the generate-test-resources phase with an archetype that cannot be built. Trace how that failure is reported to the project build, and verify that a failed archetype generation causes the containing build to fail; the issue names no files or tests to begin with.

Written by the indexing model from the issue text.

Description

bug priority:major

Roland Asmann opened ARCHETYPE-523 and commented

At work, we have created an Archetype for a non-project artefact that we want to setup during the build of another project (for integration testing).
So, during the Phase 'generate-test-resources', we have configured the archetype-plugin to run the generate-goal. If the Archetype can be generated without problems, all is fine. However, if the archetype can't be build (for whatever reason), the plugin fails and cancels generating the archetype, but this does not fail the build of the project I was actually building, leading to (incorrect) failures during testing.

Shouldn't the failing of the plugin automatically trigger failing of the Project that was being built? If not, would it be possible to add a parameter for this behavior?


Affects: 2.4

Dominant language
Java
Stars
147
Forks
186
Avg merge
11h 43m
Merged PRs (30d)
35

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-archetype

All issues in apache/maven-archetype

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.