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

Why a separate step to transform code genrator templates? #48

Closed
kspangsege opened this issue Aug 19, 2012 · 1 comment
Closed

Why a separate step to transform code genrator templates? #48

kspangsege opened this issue Aug 19, 2012 · 1 comment
Labels

Comments

@kspangsege
Copy link
Contributor

Apparently, there is a separate step in the build process that transforms the templates of the code generator from individual files into strings inside a Java class.

Why did we do that?

In my opinion, it serves only to complicate the build process.

Why don't we simply include the template files inside the JAR file? One would then have to use getResource() or getResourceAsStream() on Class or ClassLoader.

@ghost ghost assigned bmunkholm Aug 19, 2012
@ghost ghost assigned nmihajlovski Aug 27, 2012
@nmihajlovski
Copy link
Contributor

This is also a work-around for a resource loading problem I had when trying the getResourceAsStream() and similar approaches. I agree your suggested approach is elegant, it works fine when executing the annotation processing from the console, but at that time I didn't manage to load a resource file from a JAR that is configured for annotation processing in Eclipse (and I am still not sure if it is possible).

Anyway, if the annotation processing in future is executed inside an Eclipse plug-in, the problem will disappear and the work-around won't be needed anymore.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants