Maven generate-sources HtmlPolicy
See original GitHub issueHi,
is it possible to use a custom HtmlPolicy when using the maven plugin to generate sources during build?
I want to package the templates with my application (like this: https://github.com/casid/jte/blob/master/DOCUMENTATION.md#using-the-application-class-loader-since-120)
As I am using Html Attributes without a value for testing (i.e. <div data-test-important-content>
) I have to use a custom policy. Unfortunately my build is breaking because of the failed policy:
Failed to execute goal gg.jte:jte-maven-plugin:1.5.0:generate (default) on project service-frontend:
Execution default of goal gg.jte:jte-maven-plugin:1.5.0:generate failed:
Failed to compile tag/shop/communication.jte, error at line 1: Unquoted HTML attribute values are not allowed: data-test-shop-communication
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Maven: How to handle generated sources for test(only)?
1 Answer 1 ... It ensures that the directories added by this goal will be picked up automatically by the compiler plugin during...
Read more >Guide to generating Sources - Apache Maven
To generate sources you must first have a plugin that participates in the generate-sources phase like the ANTLR4 Maven Plugin.
Read more >jte/DOCUMENTATION.md at main · casid/jte - GitHub
The plugin generates *.java files for all jte templates during Maven's ... like configuring a custom HtmlPolicy class (this is because project classes...
Read more >5. User and Programmers Guide - AuthzForce - Read the Docs
Run Maven generate-sources . This will generate the JAXB-annotated class(es) from the XML schema into the folder ...
Read more >com.googlecode.owasp-java-html-sanitizer - Maven Repository
Takes third-party HTML and produces HTML that is safe to embed in your web application. Fast and easy to configure. License, Apache 2.0....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Fender123 Unquoted attributes without value should be allowed for all attributes, so e.g.
<input disabled>
should be allowed, too.The feature is intended to make the automatic attribute escaping less complex by not having to support various escaping mechanism based on quoting. If attributes do not contain variables, it’s probably OK to allow those, too, so e.g.
<input value=foo>
, but AFAIK most people default to quoting always.ok, thanks for the clarification.
Yes I experienced same strange hot reloading behavior, but not always…
Maybe I should have a look into CompilerMojo as well.