[
https://issues.apache.org/jira/browse/FREEMARKER-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913352#comment-17913352
]
Matteo Franci edited comment on FREEMARKER-229 at 1/15/25 6:05 PM:
-------------------------------------------------------------------
Ok thanks [~ddekany] then I need to sign and send the license agreement as in
the document :
[https://www.apache.org/licenses/contributor-agreements.html] ?
About the pull request, i'm almost done, on this for you can find the work
[https://github.com/fugerit-org/freemarker/tree/1-add-graalvm-support-to-apache-freemarker]
There are three commit currently :
# Add GraalVM support to Apache FreeMarker (I didn't add any logic to the
Logger, but there is a constant to check if we are running in a native build.
But from my tests maybe no actions is needed).
# Add test project for GraalVM support (a new folder containing a test project
: freemarker-test-native, currently not a submodule. I'm not sure if you
prefere to reference it in the main gradle project. I provided a README.md in
the folder).
# Add GraalVM native test pipeline (right now it is a new pipeline, running
only on ubuntu, it is a Proof of concent, do you think is better to integrate
it in the main CI or maybe better to have a separate one?)
Do you want me to create the pull request? Or before better some other
modifications?
PS about the run of the new pipeline, you can see it one run log :
[https://github.com/fugerit-org/freemarker/actions/runs/12791709704]
In the end a FreeMarker template is applied and the result printed :
INFO: name : FreeMarker Native Demo, version : 2.3.35-nightly
[217|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:218]Jan
15, 2025 3:42:13 PM freemarker.log._JULLoggerFactory$JULLogger info
[218|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:219]INFO:
result :
[219|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:220]<html>
[220|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:221]
<head>
[221|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:222]
<title>Hello : FreeMarker Native Demo</title>
[222|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:223]
</head>
[223|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:224]
<body>
[224|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:225]
<h1>Hello : FreeMarker Native Demo</h1>
[225|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:226]
<p>Test template for Apache FreeMarker native support (2.3.35-nightly)</p>
[226|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:227]
</body>
[227|https://github.com/fugerit-org/freemarker/actions/runs/12791709704/job/35660448354#step:10:228]</html>
Thanks in advance.
was (Author: fugerit):
Ok thanks [~ddekany] then I need to sign and send the license agreement as in
the document :
[https://www.apache.org/licenses/contributor-agreements.html] ?
About the pull request, i'm almost done, on this for you can find the work
[https://github.com/fugerit-org/freemarker/tree/1-add-graalvm-support-to-apache-freemarker]
There are three commit currently :
# Add GraalVM support to Apache FreeMarker (I didn't add any logic to the
Logger, but there is a constant to check if we are running in a native build.
But from my tests maybe no actions is needed).
# Add test project for GraalVM support (a new folder containing a test project
: freemarker-test-native, currently not a submodule. I'm not sure if you
prefere to reference it in the main gradle project. I provided a README.md in
the folder).
# Add GraalVM native test pipeline (right now it is a new pipeline, running
only on ubuntu, it is a Proof of concent, do you think is better to integrate
it in the main CI or maybe better to have a separate one?)
Do you want me to create the pull request? Or before better some other
modifications?
PS about the run of the new pipeline, you can see it one run log :
[https://github.com/fugerit-org/freemarker/actions/runs/12791709704]
In the end a FreeMarker template is applied and the result printed.
Thanks in advance.
> Add GraalVM native support for Apache FreeMarker
> ------------------------------------------------
>
> Key: FREEMARKER-229
> URL: https://issues.apache.org/jira/browse/FREEMARKER-229
> Project: Apache Freemarker
> Issue Type: New Feature
> Reporter: Matteo Franci
> Priority: Minor
> Attachments: image-2025-01-15-16-43-13-865.png
>
>
> First of all I want to thank you for the great work on Apache FreeMarker. The
> team I work with and I have been using on many projects.
> As we are using more and more GraalVM native applications in our team, It
> would be nice to have some sort of built-in support.
> Currently I only found a community support on [GraalVM reachbility
> metadata.|https://github.com/oracle/graalvm-reachability-metadata/blob/master/metadata/org.freemarker/freemarker/index.json]
> So I created a github repo we are using to add GraalVM support to projects :
> [https://github.com/fugerit-org/freemarker-native]
> NOTE: main limitations is that requires java 11+ because of [GraalVM SDK
> Substitute
> Annotation|https://www.graalvm.org/sdk/javadoc/com/oracle/svm/core/annotate/Substitute.html].
> this is needed to fix missing org.apache.log4j.MDC class in
> [https://github.com/apache/freemarker/blob/v2.3.34/freemarker-core/src/main/java/freemarker/log/_Log4jOverSLF4JTester.java#L35]
> I had a look at the main repository :
> [https://github.com/apache/freemarker/tree/2.3-gae]
> And maybe it is possible to include all the necessary changes in it, or build
> a "native support" module, alongside the main distribution.
> What do you think?
> If I can help you anyway I'm here.
> Thanks in advance.
> NOTE: here you can find more details on how GraalVM support has been added
> [https://github.com/fugerit-org/freemarker-native/blob/main/src/main/docs/native-support/index.adoc]
> .
--
This message was sent by Atlassian Jira
(v8.20.10#820010)