Skip to content

Self containing jar #62

@1fexd

Description

@1fexd

Hey,

I have just migrated my page from pebble to jte and I love it. Thank you very much for this great project!

When trying to compile a self containing a jar, I tried your approach, which did not properly work for some reason, and also fcked up my project since the build/ directory got added to the srcSet. So what I did instead, is quite simple, and seems to work very well:

I used the other approach, but kept the precompiled-loading from the other approach (TemplateEngine.createPrecompiled(ContentType.Html)). I then added this snippet to my gradle jar task:

from fileTree("jte-classes") {
    include "**/*.class"
}

Which copies the compile output to the jar. (I also had to add dependsOn precompileJte at the beginning of my jar task). Just wanted to let you know, maybe it is of some use to you or fellow users of this library.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions