Skip to content

Commit

Permalink
Add Javadoc to CompilerMojo
Browse files Browse the repository at this point in the history
  • Loading branch information
casid committed Jun 16, 2023
1 parent 4ec72fc commit 89e55d1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
34 changes: 34 additions & 0 deletions jte-maven-plugin/src/main/java/gg/jte/maven/CompilerMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,67 @@ public class CompilerMojo extends AbstractMojo {
@Parameter(required = true)
public String targetDirectory;

/**
* The compile-classpath to use. Defaults to project.compileClasspathElements
*/
@Parameter(defaultValue = "${project.compileClasspathElements}", required = true)
public List<String> compilePath;

/**
* The content type of all templates. Either Plain or Html.
*/
@Parameter(required = true)
public String contentType;

/**
* Trims control structures, resulting in prettier output.
*/
@Parameter
public boolean trimControlStructures;

/**
* Intercepts the given html tags during template compilation
* and calls the configured htmlInterceptor during template rendering.
*/
@Parameter
public String[] htmlTags;

/**
* Policy class that checks the parsed HTML at compile time. Must be an instance of {@link HtmlPolicy}
*/
@Parameter
public String htmlPolicyClass;

/**
* By default, jte omits all HTML/CSS/JS comments, when compiling with {@link ContentType#Html}.
* If you don't want this behavior, you can disable it here.
*/
@Parameter
public boolean htmlCommentsPreserved;

/**
* Setting, that UTF-8 encodes all static template parts at compile time.
* Only makes sense if you use a binary output, like {@link gg.jte.output.Utf8ByteOutput}.
*/
@Parameter
public boolean binaryStaticContent;

/**
* Sets additional compiler arguments for jte templates.
*/
@Parameter
public String[] compileArgs;

/**
* The package name, where template classes are generated to.
*/
@Parameter
public String packageName = Constants.PACKAGE_NAME_PRECOMPILED;

/**
* By default, this plugin deletes all generated jte source files after compilation.
* If you want to keep them, set this property to true.
*/
@Parameter
public boolean keepGeneratedSourceFiles;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@
import java.util.Map;

public class ExtensionSettings {

/**
* The class name of the extension, e.g. <code>gg.jte.models.generator.ModelExtension</code>
*/
@Parameter
private String className;
public String className;

/**
* The settings the extension should use.
*/
@Parameter
private Map<String, String> settings;
public Map<String, String> settings;

public String getClassName() {
return className;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class GeneratorMojo extends AbstractMojo {
public boolean binaryStaticContent;

/**
* The package name, where template classes are generated to
* The package name, where template classes are generated to.
*/
@Parameter
public String packageName = Constants.PACKAGE_NAME_PRECOMPILED;
Expand Down

0 comments on commit 89e55d1

Please sign in to comment.