michael-o commented on PR #15:
URL: https://github.com/apache/velocity-tools/pull/15#issuecomment-2310672841

   > > > > @ct-parker Thanks for the offer. I am waiting for a Core release 
first.
   > > > 
   > > > 
   > > > @michael-o I greatly appreciate your reconsideration of this issue. I 
am willing to continue the discussion as needed here or in the JIRA issue, so 
please just let me know of any support you need on this, and I will jump in. I 
am eager to resolve this.
   > > 
   > > 
   > > Please point me to the exact commit you want me to look at and propose 
as well. I want to check the approach taken.
   > 
   > It was 
[apache/freemarker#104](https://github.com/apache/freemarker/pull/104), which 
had a single commit: 
[apache/freemarker@c88ed78](https://github.com/apache/freemarker/commit/c88ed780669c53ce3979697bf4173cf53d199e6d)
   > 
   > At some time in the past, the FreeMarker project switched their build 
process from Ant to Gradle, which gave them the option of using a code 
generator for solving this issue.
   > 
   > Essentially, the code generator copies the source code for the 
package/classes of interest into a package named "freemarker.ext.jakarta" and 
does a search/replace on javax.servlet to jakarta.servlet prior to compiling. 
See [this 
part](https://github.com/apache/freemarker/pull/104/commits/c88ed780669c53ce3979697bf4173cf53d199e6d#diff-c0dfa6bc7a8685217f70a860145fbdf416d449eaff052fa28352c5cec1a98c06)
 in particular. I'm not suggesting using a code generator, but rather simply 
duplicating the packages into a jakarta package and search/replace for the 
"javax." imports.
   > 
   > The build itself apparently brings both the Servlet 3.1 and 6.0 APIs in as 
compile dependencies, but after compiling either version may be used in 
downstream projects.
   > 
   > The FreeMarker project commentary is 
[here](https://freemarker.apache.org/docs/versions_2_3_33.html#version_hisotry_freemarker_183_java_side):
   > 
   > > [FREEMARKER-218](https://issues.apache.org/jira/browse/FREEMARKER-218): 
Servlet, and JSP support classes now has a Jakarta variant in the new 
freemarker.ext.jakarta.jsp and freemarker.ext.jakarta.servlet packages. These 
are the slightly modified copies of freemarker.ext.servlet, freemarker.ext.jsp 
(which are also present in the same FreeMarker jar), that depend on the 
Jakarata API-s (jakarta.servlet, jakarta.servlet.jsp, jakarta.el, etc.), 
instead of the tradition javax Serlvet/JSP/EL API-s. There's also 
freemarker.ext.jakarta.servlet.WebappTemplateLoader, which is the Jakarta 
equivalent of freemarker.cache.WebappTemplateLoader. (Note that Jakarta 
packages/classes are not visible in the FreeMarker source code, as they are 
generated during build from the pre-Jakarta classes.)
   > 
   > I'm not familiar with the velocity-tools-view build process, but this is 
an approach that could easily be [replicated with 
Ant](https://stackoverflow.com/questions/8433588/retrieve-value-from-text-file-and-replace-a-string-constant-in-another-file-with).
   
   Do you consider it similar to mine: 
https://github.com/michael-o/activedirectory-dns-locator/blob/9dff8dfb3fce8890a8166be6de89b9c05ef77108/pom.xml#L92


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to