Paullo612 / mlfx

OpenJFX's FXML language AOT compler
Apache License 2.0
11 stars 0 forks source link

Documentation questions #23

Closed ennerf closed 1 year ago

ennerf commented 1 year ago

Thanks for doing this project! I was actually thinking about doing something similar for the same reason, so hopefully I'll just be able to just use this.

I just tried it on a project, but unfortunately I didn't get any of the generated FXML classes. The micronaut accessors were generated as expected though. I'm on Windows, so it might be related to the Windows path issue.

Overall, it's a bit difficult to figure everything out from the test code (e.g. path conventions, absolute vs relative paths, etc.). It'd be great if you could set up a tiny sample project that includes a JavaFX application w/ FXML.

I'm also not clear on where the micronaut.mlfx.resourcesDirectory annotation processor option is supposed to go. Should that be set in the compiler plugin? in the maven properties section? I've never used Micronaut before.

Paullo612 commented 1 year ago

I'm on Windows, so it might be related to the Windows path issue.

Yeah, I've tried compiling on Windows, but it was long time ago. Looks like I've broken something. Will fix that and publish a new release in meantime.

I'm also not clear on where the micronaut.mlfx.resourcesDirectory annotation processor option is supposed to go.

micronaut.mlfx.resourcesDirectory is for specifying path to your resources directory (for simple Maven setup, if your resources are in src/main/resources) it is not needed. Here is an example for completeness:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        ...
        <compilerArgs combine.children="append">
            <arg>-Amicronaut.mlfx.resourcesDirectory=./resources</arg>
        </compilerArgs>
        ...
    </configuration>
<plugin>
Paullo612 commented 1 year ago

Added a link to sample project. So, closing this.

ennerf commented 1 year ago

Looks good, thanks!