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

PreConstruct PreDestroy should be own annotations #58

Closed
cstamas opened this issue Jun 21, 2022 · 4 comments · Fixed by #76
Closed

PreConstruct PreDestroy should be own annotations #58

cstamas opened this issue Jun 21, 2022 · 4 comments · Fixed by #76

Comments

@cstamas
Copy link
Member

cstamas commented Jun 21, 2022

Just like Description, and sisu should stop pulling in "unpopular" dependencies like javax stuff for only those two annotations. Maybe make the behave in similar way how Sisu;s Nullable is working (annotation from several packages are all recognized as Nullable annotation)

@cstamas
Copy link
Member Author

cstamas commented Sep 21, 2022

Example (but builds on my another PR to be able to build SISU on Java17):
cstamas#1

The PR the example PR is made against: #61

@cstamas
Copy link
Member Author

cstamas commented Sep 21, 2022

In short, this would allow users of sisu (like Maven) to not include jsr250 annotations on CP, but directly use SISU annotations, just the very same way as with Typed, Priority or Nullable

@mcculls
Copy link
Contributor

mcculls commented Sep 21, 2022

Good idea, thanks for the example

cstamas added a commit to cstamas/sisu.inject that referenced this issue Feb 15, 2023
"own" annotations for Lifecycle as well (while do support
JSR250 if present).

This closes eclipse-sisu#58
@cstamas
Copy link
Member Author

cstamas commented Feb 15, 2023

The indirect goal of this issue is targeting Maven: goal is to remove the annotation dependencies from Maven Core, as that caused troubles in past (leakage), but also confuses developers that Maven is full CDI, which is not.

Sisu is really "internal detail" of Maven, so Maven (internally) should use Sisu specific lifecycle annotations (as they are used in Maven Core already), and not JSR250 annotations, as that just spreads confusion among other devs.

cstamas added a commit that referenced this issue Feb 27, 2023
Just like other annotations like Typed, Priority add
"own" annotations for Lifecycle as well (while do support
JSR250 if present).

This closes #58
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 a pull request may close this issue.

2 participants