j2cl:watch

Full name:

com.vertispan.j2cl:j2cl-maven-plugin:0.21.0:watch

Description:

Attempts to do the setup for various test and build goals declared in the current project or in child projects, but also allows the configuration for this goal to further customize them. For example, this goal will be configured to use a particular compilation level, or directory to copy output to. If run in a parent pom, the webappDirectory configuration must be set.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator plugin.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is not marked as thread-safe and thus does not support parallel builds.

Required Parameters

Name Type Since Description
<bootstrapClasspath> String - (no description)
Default value is: com.vertispan.j2cl:javac-bootstrap-classpath:0.11.0-9336533b6.
Alias is: javacBootstrapClasspathJar.
<bootstrapJsZip> String - (no description)
Default value is: com.vertispan.j2cl:bootstrap:zip:jszip:0.11.0-9336533b6.
<gwt3BuildCacheDir> File - Specifies the path to the build cache. This defaults to a directory in target, but for easier reuse and faster builds between projects, it can make sense to set this globally to a shared directory.
Default value is: ${project.build.directory}/gwt3BuildCache.
User property is: gwt3.cache.dir.
<internalAnnotationsJar> String - (no description)
Default value is: com.vertispan.j2cl:gwt-internal-annotations:0.11.0-9336533b6.
<jreJar> String - (no description)
Default value is: com.vertispan.j2cl:jre:0.11.0-9336533b6.
<jreJsZip> String - (no description)
Default value is: com.vertispan.j2cl:jre:zip:jszip:0.11.0-9336533b6.
<jsinteropAnnotationsJar> String - (no description)
Default value is: com.google.jsinterop:jsinterop-annotations:2.0.0.
<junitAnnotations> String - (no description)
Default value is: com.vertispan.j2cl:junit-annotations:0.11.0-9336533b6.
<localBuildCache> File - (no description)
Default value is: ${project.build.directory}/j2cl-maven-plugin-local-cache.
<testJsZip> String - (no description)
Default value is: com.vertispan.j2cl:closure-test:zip:jszip:0.11.0-9336533b6.

Optional Parameters

Name Type Since Description
<annotationProcessorMode> AnnotationProcessorMode - (no description)
Default value is: AVOID_MAVEN.
<checkAssertions> boolean - Whether or not to leave Java assert checks in the compiled code. In j2cl:watch, defaults to true. Has no effect when the compilation level isn't set to ADVANCED_OPTIMIZATIONS, assertions will always remain enabled.
Default value is: true.
<compilationLevel> String - Describes how the output should be built - presently supports five modes, four of which are closure-compiler "compilationLevel" argument options, and an additional special case for J2cl-base applcations. The quoted descriptions here explain how closure-compiler defines them.
  • ADVANCED_OPTIMIZATIONS - "ADVANCED_OPTIMIZATIONS aggressively reduces code size by renaming function names and variables, removing code which is never called, etc." This is typically what is expected for production builds.
  • SIMPLE_OPTIMIZATIONS - "SIMPLE_OPTIMIZATIONS performs transformations to the input JS that do not require any changes to JS that depend on the input JS." Generally not useful in this plugin - slower than BUNDLE, much bigger than ADVANCED_OPTIMIZATIONS
  • WHITESPACE_ONLY - "WHITESPACE_ONLY removes comments and extra whitespace in the input JS." Generally not useful in this plugin - slower than BUNDLE, much bigger than ADVANCED_OPTIMIZATIONS
  • BUNDLE - "Simply orders and concatenates files to the output." The GWT fork of closure also prepends define statements, and provides wiring for sourcemaps.
  • BUNDLE_JAR - Not a "real" closure-compiler option. but instead invokes BUNDLE on each classpath entry and generates a single JS file which will load those bundled files in order. Enables the compiler to cache results for each dependency, rather than re-generate a single large JS file.

Default value is: BUNDLE_JAR.
User property is: compilationLevel.
<dependencyMode> String - Deprecated. Will be removed in 0.21
Default value is: SORT_ONLY.
<dependencyReplacements> List - (no description)
<enableSourcemaps> boolean - True to enable sourcemaps to be built into the project output.
Default value is: true.
<env> String - Closure flag: "Determines the set of builtin externs to load. Options: BROWSER, CUSTOM. Defaults to BROWSER." Presently we default to BROWSER, but are considering changing this to CUSTOM if we include externs files in the generate jsinterop artifacts, so that each set of bindings is self-contained.
Default value is: BROWSER.
<incrementalEnabled> boolean - (no description)
Default value is: false.
User property is: j2cl.incremental.
<languageOut> String - ECMAScript language level of generated JavasScript. Values correspond to the Closure Compiler reference: https://github.com/google/closure-compiler/wiki/Flags-and-Options
Default value is: ECMASCRIPT5.
User property is: languageOut.
<rewritePolyfills> boolean - Closure flag: "Rewrite ES6 library calls to use polyfills provided by the compiler's runtime." Unlike in closure-compiler, defaults to false.
Default value is: false.
<shutdownWaitSeconds> int - (no description)
<taskMappings> Map - (no description)
<webappDirectory> String - The output directory for this goal. Note that this is used in conjunction with the initialScriptFilename for each execution run by this so that all are built to the same location but might have their own subdirectories and individual JavaScript output files.
Default value is: ${j2cl.webappDirectory}.
<workerThreadCount> String - (no description)

Parameter Details

<annotationProcessorMode>

(no description)
  • Type: com.vertispan.j2cl.mojo.AnnotationProcessorMode
  • Required: No
  • Default: AVOID_MAVEN

<bootstrapClasspath>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:javac-bootstrap-classpath:0.11.0-9336533b6
  • Alias: javacBootstrapClasspathJar

<bootstrapJsZip>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:bootstrap:zip:jszip:0.11.0-9336533b6

<checkAssertions>

Whether or not to leave Java assert checks in the compiled code. In j2cl:watch, defaults to true. Has no effect when the compilation level isn't set to ADVANCED_OPTIMIZATIONS, assertions will always remain enabled.
  • Type: boolean
  • Required: No
  • Default: true

<compilationLevel>

Describes how the output should be built - presently supports five modes, four of which are closure-compiler "compilationLevel" argument options, and an additional special case for J2cl-base applcations. The quoted descriptions here explain how closure-compiler defines them.
  • ADVANCED_OPTIMIZATIONS - "ADVANCED_OPTIMIZATIONS aggressively reduces code size by renaming function names and variables, removing code which is never called, etc." This is typically what is expected for production builds.
  • SIMPLE_OPTIMIZATIONS - "SIMPLE_OPTIMIZATIONS performs transformations to the input JS that do not require any changes to JS that depend on the input JS." Generally not useful in this plugin - slower than BUNDLE, much bigger than ADVANCED_OPTIMIZATIONS
  • WHITESPACE_ONLY - "WHITESPACE_ONLY removes comments and extra whitespace in the input JS." Generally not useful in this plugin - slower than BUNDLE, much bigger than ADVANCED_OPTIMIZATIONS
  • BUNDLE - "Simply orders and concatenates files to the output." The GWT fork of closure also prepends define statements, and provides wiring for sourcemaps.
  • BUNDLE_JAR - Not a "real" closure-compiler option. but instead invokes BUNDLE on each classpath entry and generates a single JS file which will load those bundled files in order. Enables the compiler to cache results for each dependency, rather than re-generate a single large JS file.
  • Type: java.lang.String
  • Required: No
  • User Property: compilationLevel
  • Default: BUNDLE_JAR

<dependencyMode>

Deprecated. Will be removed in 0.21
(no description)
  • Type: java.lang.String
  • Required: No
  • Default: SORT_ONLY

<dependencyReplacements>

(no description)
  • Type: java.util.List
  • Required: No

<enableSourcemaps>

True to enable sourcemaps to be built into the project output.
  • Type: boolean
  • Required: No
  • Default: true

<env>

Closure flag: "Determines the set of builtin externs to load. Options: BROWSER, CUSTOM. Defaults to BROWSER." Presently we default to BROWSER, but are considering changing this to CUSTOM if we include externs files in the generate jsinterop artifacts, so that each set of bindings is self-contained.
  • Type: java.lang.String
  • Required: No
  • Default: BROWSER

<gwt3BuildCacheDir>

Specifies the path to the build cache. This defaults to a directory in target, but for easier reuse and faster builds between projects, it can make sense to set this globally to a shared directory.
  • Type: java.io.File
  • Required: Yes
  • User Property: gwt3.cache.dir
  • Default: ${project.build.directory}/gwt3BuildCache

<incrementalEnabled>

(no description)
  • Type: boolean
  • Required: No
  • User Property: j2cl.incremental
  • Default: false

<internalAnnotationsJar>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:gwt-internal-annotations:0.11.0-9336533b6

<jreJar>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:jre:0.11.0-9336533b6

<jreJsZip>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:jre:zip:jszip:0.11.0-9336533b6

<jsinteropAnnotationsJar>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.google.jsinterop:jsinterop-annotations:2.0.0

<junitAnnotations>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:junit-annotations:0.11.0-9336533b6

<languageOut>

ECMAScript language level of generated JavasScript. Values correspond to the Closure Compiler reference: https://github.com/google/closure-compiler/wiki/Flags-and-Options
  • Type: java.lang.String
  • Required: No
  • User Property: languageOut
  • Default: ECMASCRIPT5

<localBuildCache>

(no description)
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/j2cl-maven-plugin-local-cache

<rewritePolyfills>

Closure flag: "Rewrite ES6 library calls to use polyfills provided by the compiler's runtime." Unlike in closure-compiler, defaults to false.
  • Type: boolean
  • Required: No
  • Default: false

<shutdownWaitSeconds>

(no description)
  • Type: int
  • Required: No

<taskMappings>

(no description)
  • Type: java.util.Map
  • Required: No

<testJsZip>

(no description)
  • Type: java.lang.String
  • Required: Yes
  • Default: com.vertispan.j2cl:closure-test:zip:jszip:0.11.0-9336533b6

<webappDirectory>

The output directory for this goal. Note that this is used in conjunction with the initialScriptFilename for each execution run by this so that all are built to the same location but might have their own subdirectories and individual JavaScript output files.
  • Type: java.lang.String
  • Required: No
  • Default: ${j2cl.webappDirectory}

<workerThreadCount>

(no description)
  • Type: java.lang.String
  • Required: No