Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change lifecycle phases for adding sources #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hgschmie
Copy link

It seems that addSources and addTestSources are run in the initialize phase ever since
forever. These goals should be run right before compiling the sources / test sources (in the
generate-sources and generate-test-sources phases).

It seems that `addSources` and `addTestSources` are run in the `initialize` phase ever since
forever. These goals should be run right before compiling the sources / test sources (in the
`generate-sources` and `generate-test-sources` phases).
@keeganwitt
Copy link
Member

keeganwitt commented Aug 19, 2022

Hi @hgschmie, thank you for the PR! Can you explain what issue is caused by having it in the current phase?

I think the history of the current phase goes back to the original GMaven plugin, which bound to this same phase, as does the Scala Maven Plugin (though not the Clojure Maven Plugin).

I suspect the thinking was that this was needed for IDE integration, but at least for IntelliJ this doesn't appear to be the case.

@hgschmie
Copy link
Author

Hi @keeganwitt,

Thanks for getting back so quickly. I have a bunch of projects where I use groovy for unit testing but not in the regular build cycle. So it seems weird to execute e.g. the addTestSources goal when running only mvn compile. I agree that the change is not strictly necessary (and I can always bind them explicitly into other phases) but it feels that within the "spirit" of the maven lifecycle, these goals should be bound to the intended phases and not just at the earliest possible moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants