Fork me on GitHub

scalor:eclipse-restart

Full name:

com.carrotgarden.maven:scalor-maven-plugin_2.12:1.5.0.20190502181145:eclipse-restart

Description:

Manage test application process restart after full or incremental build in Eclipse/M2E. Requires goal=eclipse-config.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: test.

Optional Parameters

Name Type Since Description
<buildTestDependencyFolders> File[] - Project folders containing build classes which are dependency for compilation scope=test. Normally includes folder scope=[macro,main,test] (target/classes, target/test-classes).
Default value is: ${project.build.outputDirectory},${project.build.testOutputDirectory}.
User property is: scalor.buildTestDependencyFolders.
<buildTestDependencyScopes> String[] - Maven dependency scopes which control selection of project dependency artifacts to be included in the classpath of compilation scope=test. Scopes reference.
Default value is: compile,provided,system,test,runtime.
User property is: scalor.buildTestDependencyScopes.
<buildTestResourceFolders> Resource[] - Resource root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/resources. Component reference: Resource . Example custom entry in pom.xml:
<buildTestResourceFolders>
  <resource>
    <directory>${project.basedir}/src/test/resources</directory>
  </resource>  
  <resource>
    <directory>${project.basedir}/target/generated/test/resources</directory>
  </resource>  
</buildTestResourceFolders>

Default value is: ${project.build.testResources}.
User property is: scalor.buildTestResourceFolders.
<buildTestSourceJavaFolders> File[] - Java source root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/java. Example custom entry in pom.xml:
<buildTestSourceJavaFolders>
  <source>${project.build.testSourceDirectory}</source>
  <source>${project.basedir}/target/generated/test/java</source>
</buildTestSourceJavaFolders>

Default value is: ${project.build.testSourceDirectory}.
User property is: scalor.buildTestSourceJavaFolders.
<buildTestSourceScalaFolders> File[] - Scala source root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/scala. Example custom entry in pom.xml:
<buildTestSourceScalaFolders>
  <source>${project.build.testSourceDirectory}/../scala</source>
  <source>${project.basedir}/target/generated/test/scala</source>
</buildTestSourceScalaFolders>

Default value is: ${project.build.testSourceDirectory}/../scala.
User property is: scalor.buildTestSourceScalaFolders.
<buildTestTargetFolder> File - Build target folder with result classes of compilation scope=test. Normally uses target/test-classes.
Default value is: ${project.build.testOutputDirectory}.
User property is: scalor.buildTestTargetFolder.
<commonMappingPattern> String - Regular expression for plugin configuration map values provided in pom.xml. Extractor for pattern: key=value. Must define exactly two regex capture groups. Mapping regular expression is used as follows:
  case commonMappingPattern.r( key, value ) => ( key, value )
Note: <![CDATA[ ... ]]> brackets can help preserve text entries in pom.xml.
Default value is: \s*([^=\s]+)\s*=\s*([^\s]+)\s*.
User property is: scalor.commonMappingPattern.
<commonSequenceSeparator> String - Separator for plugin configuration list values provided in pom.xml. Separator regular expression is used as follows:
  string.split( commonSequenceSeparator ).map( _.trim ).filterNot( _.isEmpty )
Note: <![CDATA[ ... ]]> brackets can help preserve text entries in pom.xml. Note: to insert unicode symbol in Eclipse/GTK, type CTRL+SHIFT+U, then XXXX - a 4-hex-digit unicode value. For example, for star ★, use hex code 2605.
Default value is: [★\n]+.
User property is: scalor.commonSequenceSeparator.
<eclipseDetectPresent> boolean - Invoke Eclipse executions only when runnting inside Eclipse/M2E. When false, force executions regardless of the Eclipse detection state.
Default value is: true.
User property is: scalor.eclipseDetectPresent.
<eclipseRestartEnable> boolean - Enable test application with automatic restart management in Eclipse. Application parameter: eclipseRestartMainClass.
Default value is: true.
User property is: scalor.eclipseRestartEnable.
<eclipseRestartJavaArgs> String - List of command line arguments for Java executable. See options reference. Separator parameter: commonSequenceSeparator.
Default value is: -Dscalor.test.app=${project.artifactId} ★ -Xms1G ★ -Xmx1G ★ .
User property is: scalor.eclipseRestartJavaArgs.
<eclipseRestartJavaVars> String - List of environment variables for Java executable. Separator parameter: commonSequenceSeparator. Mapping parameter: commonMappingPattern.
Default value is: HOME=${project.basedir} ★ USER=scalor ★ .
User property is: scalor.eclipseRestartJavaVars.
<eclipseRestartLimitLogger> int - Limit number of records reported by loggers. Detector logger enablement: eclipseRestartLogDetected.
Default value is: 20.
User property is: scalor.eclipseRestartLimitLogger.
<eclipseRestartLogChanged> boolean - Enable to log all resource change events in the Eclipse workspace. Generates execessive logging, use only for problem discovery.
Default value is: false.
User property is: scalor.eclipseRestartLogChanged.
<eclipseRestartLogCommand> boolean - Enable to log command used to launch managed test application. Includes Java executable path, executable arguments, effective dependency class path, main class name.
Default value is: false.
User property is: scalor.eclipseRestartLogCommand.
<eclipseRestartLogDetected> boolean - Enable to log list of changed resources which have triggred test application restart. Detector parameter: eclipseRestartRegexList. Logs limit parameter: eclipseRestartLimitLogger.
Default value is: true.
User property is: scalor.eclipseRestartLogDetected.
<eclipseRestartLogParameters> boolean - Enable to log in Eclipse/M2E effective configuration parameters for this Maven execution.
Default value is: false.
User property is: scalor.eclipseRestartLogParameters.
<eclipseRestartMainClass> String - Fully qualified class name which represents test application used for auto-restart. This class must be a Scala object with Java "main" contract, for example, in file test/Main.scala:
package test
object Main {
  def main(args: Array[String]): Unit = {
    while(true) {
      println("test-main")
      Thread.sleep(5000)
    }
  }
}
Normally, this class should be placed in buildTestSourceScalaFolders (src/test/scala) registered source root. Test application will be restarted after full or incremental build in Eclipse, after resource change detection, following a settlement delay. Test application will also be restarted when it exits or crashes. Test application is launched in a separate JVM. Enablement parameter: eclipseRestartEnable. Settlement parameter: eclipseRestartPeriodSettle. Detection parameter: eclipseRestartRegexList. Java launch parameter: eclipseRestartJavaArgs.
Default value is: test.Main.
User property is: scalor.eclipseRestartMainClass.
<eclipseRestartPeriodInvoke> long - Restart management task checks invocation period, milliseconds. Defines frequency of test application liveness checks and resource change detection checks. Application parameter: eclipseRestartMainClass.
Default value is: 1000.
User property is: scalor.eclipseRestartPeriodInvoke.
<eclipseRestartPeriodPrevent> long - Test application wait-before-restart delay time window, milliseconds. Used as delay for application restart after an exit or crash, to prevent restart flood. Application parameter: eclipseRestartMainClass.
Default value is: 3000.
User property is: scalor.eclipseRestartPeriodPrevent.
<eclipseRestartPeriodSettle> long - Test application change detection settlement time window, milliseconds. Actual restart will occur only when there are no more resource changes during this delay time window. Application parameter: eclipseRestartMainClass.
Default value is: 3000.
User property is: scalor.eclipseRestartPeriodSettle.
<eclipseRestartRegexList> String - List of regular expressions used to detect test application restart condition. These resources are monitored in folders buildTestDependencyFolders included as effective project dependencies resolved by Eclipse/M2E, such as target/classes, target/test-classes, from current project as well as from accessible dependecy projects in the workspace. Normally matches Scala JVM classes, Scala.js IR classes, configuration files. Separator parameter: commonSequenceSeparator. Review actual class path with eclipseRestartLogCommand.
Default value is: ^.+[.]class$ ★ ^.+[.]sjsir$ ★ ^.+[.]conf$ ★ ^.+[.]js$ ★ .
User property is: scalor.eclipseRestartRegexList.
<eclipseRestartTaskName> String - Eclipse background management job name representing running test application. Canceling this management job in Eclipse UI will terminate running test application. M2E project update or clean/build in Eclipse UI will re-create both management job and test application. Job name must be unique in Eclipse workspace. Application parameter: eclipseRestartMainClass. To review current background jobs in Eclipse, navigate:
Eclipse -> Window -> Show View -> Progress 

Default value is: Scalor: application restart manager @ ${project.artifactId}.
User property is: scalor.eclipseRestartTaskName.
<eclipseRestartWorkDir> File - Working directory used to launch test application. Absolute path.
Default value is: ${project.build.directory}/scalor/test-main.
User property is: scalor.eclipseRestartWorkDir.
<skip> boolean - Force to skip all executions of this plugin.
Default value is: false.
User property is: scalor.skip.
<skipEclipse> boolean - Flag to skip goal execution: eclipse-*.
Default value is: false.
User property is: scalor.skipEclipse.
<skipLogReason> boolean - Enable logging of reason for skipping an execution.
Default value is: true.
User property is: scalor.skipLogReason.
<skipPackagingList> String[] - List of packaging types, which are skipped by this plugin.
Default value is: pom.
User property is: scalor.skipPackagingList.

Parameter Details

<buildTestDependencyFolders>

Project folders containing build classes which are dependency for compilation scope=test. Normally includes folder scope=[macro,main,test] (target/classes, target/test-classes).
  • Type: java.io.File[]
  • Required: No
  • User Property: scalor.buildTestDependencyFolders
  • Default: ${project.build.outputDirectory},${project.build.testOutputDirectory}

<buildTestDependencyScopes>

Maven dependency scopes which control selection of project dependency artifacts to be included in the classpath of compilation scope=test. Scopes reference.
  • Type: java.lang.String[]
  • Required: No
  • User Property: scalor.buildTestDependencyScopes
  • Default: compile,provided,system,test,runtime

<buildTestResourceFolders>

Resource root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/resources. Component reference: Resource . Example custom entry in pom.xml:
<buildTestResourceFolders>
  <resource>
    <directory>${project.basedir}/src/test/resources</directory>
  </resource>  
  <resource>
    <directory>${project.basedir}/target/generated/test/resources</directory>
  </resource>  
</buildTestResourceFolders>
  • Type: org.apache.maven.model.Resource[]
  • Required: No
  • User Property: scalor.buildTestResourceFolders
  • Default: ${project.build.testResources}

<buildTestSourceJavaFolders>

Java source root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/java. Example custom entry in pom.xml:
<buildTestSourceJavaFolders>
  <source>${project.build.testSourceDirectory}</source>
  <source>${project.basedir}/target/generated/test/java</source>
</buildTestSourceJavaFolders>
  • Type: java.io.File[]
  • Required: No
  • User Property: scalor.buildTestSourceJavaFolders
  • Default: ${project.build.testSourceDirectory}

<buildTestSourceScalaFolders>

Scala source root folders to be included in compilation scope=test. Absolute path. Normally uses src/test/scala. Example custom entry in pom.xml:
<buildTestSourceScalaFolders>
  <source>${project.build.testSourceDirectory}/../scala</source>
  <source>${project.basedir}/target/generated/test/scala</source>
</buildTestSourceScalaFolders>
  • Type: java.io.File[]
  • Required: No
  • User Property: scalor.buildTestSourceScalaFolders
  • Default: ${project.build.testSourceDirectory}/../scala

<buildTestTargetFolder>

Build target folder with result classes of compilation scope=test. Normally uses target/test-classes.
  • Type: java.io.File
  • Required: No
  • User Property: scalor.buildTestTargetFolder
  • Default: ${project.build.testOutputDirectory}

<commonMappingPattern>

Regular expression for plugin configuration map values provided in pom.xml. Extractor for pattern: key=value. Must define exactly two regex capture groups. Mapping regular expression is used as follows:
  case commonMappingPattern.r( key, value ) => ( key, value )
Note: <![CDATA[ ... ]]> brackets can help preserve text entries in pom.xml.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.commonMappingPattern
  • Default: \s*([^=\s]+)\s*=\s*([^\s]+)\s*

<commonSequenceSeparator>

Separator for plugin configuration list values provided in pom.xml. Separator regular expression is used as follows:
  string.split( commonSequenceSeparator ).map( _.trim ).filterNot( _.isEmpty )
Note: <![CDATA[ ... ]]> brackets can help preserve text entries in pom.xml. Note: to insert unicode symbol in Eclipse/GTK, type CTRL+SHIFT+U, then XXXX - a 4-hex-digit unicode value. For example, for star ★, use hex code 2605.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.commonSequenceSeparator
  • Default: [★\n]+

<eclipseDetectPresent>

Invoke Eclipse executions only when runnting inside Eclipse/M2E. When false, force executions regardless of the Eclipse detection state.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseDetectPresent
  • Default: true

<eclipseRestartEnable>

Enable test application with automatic restart management in Eclipse. Application parameter: eclipseRestartMainClass.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseRestartEnable
  • Default: true

<eclipseRestartJavaArgs>

List of command line arguments for Java executable. See options reference. Separator parameter: commonSequenceSeparator.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.eclipseRestartJavaArgs
  • Default: -Dscalor.test.app=${project.artifactId} ★ -Xms1G ★ -Xmx1G ★

<eclipseRestartJavaVars>

List of environment variables for Java executable. Separator parameter: commonSequenceSeparator. Mapping parameter: commonMappingPattern.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.eclipseRestartJavaVars
  • Default: HOME=${project.basedir} ★ USER=scalor ★

<eclipseRestartLimitLogger>

Limit number of records reported by loggers. Detector logger enablement: eclipseRestartLogDetected.
  • Type: int
  • Required: No
  • User Property: scalor.eclipseRestartLimitLogger
  • Default: 20

<eclipseRestartLogChanged>

Enable to log all resource change events in the Eclipse workspace. Generates execessive logging, use only for problem discovery.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseRestartLogChanged
  • Default: false

<eclipseRestartLogCommand>

Enable to log command used to launch managed test application. Includes Java executable path, executable arguments, effective dependency class path, main class name.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseRestartLogCommand
  • Default: false

<eclipseRestartLogDetected>

Enable to log list of changed resources which have triggred test application restart. Detector parameter: eclipseRestartRegexList. Logs limit parameter: eclipseRestartLimitLogger.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseRestartLogDetected
  • Default: true

<eclipseRestartLogParameters>

Enable to log in Eclipse/M2E effective configuration parameters for this Maven execution.
  • Type: boolean
  • Required: No
  • User Property: scalor.eclipseRestartLogParameters
  • Default: false

<eclipseRestartMainClass>

Fully qualified class name which represents test application used for auto-restart. This class must be a Scala object with Java "main" contract, for example, in file test/Main.scala:
package test
object Main {
  def main(args: Array[String]): Unit = {
    while(true) {
      println("test-main")
      Thread.sleep(5000)
    }
  }
}
Normally, this class should be placed in buildTestSourceScalaFolders (src/test/scala) registered source root. Test application will be restarted after full or incremental build in Eclipse, after resource change detection, following a settlement delay. Test application will also be restarted when it exits or crashes. Test application is launched in a separate JVM. Enablement parameter: eclipseRestartEnable. Settlement parameter: eclipseRestartPeriodSettle. Detection parameter: eclipseRestartRegexList. Java launch parameter: eclipseRestartJavaArgs.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.eclipseRestartMainClass
  • Default: test.Main

<eclipseRestartPeriodInvoke>

Restart management task checks invocation period, milliseconds. Defines frequency of test application liveness checks and resource change detection checks. Application parameter: eclipseRestartMainClass.
  • Type: long
  • Required: No
  • User Property: scalor.eclipseRestartPeriodInvoke
  • Default: 1000

<eclipseRestartPeriodPrevent>

Test application wait-before-restart delay time window, milliseconds. Used as delay for application restart after an exit or crash, to prevent restart flood. Application parameter: eclipseRestartMainClass.
  • Type: long
  • Required: No
  • User Property: scalor.eclipseRestartPeriodPrevent
  • Default: 3000

<eclipseRestartPeriodSettle>

Test application change detection settlement time window, milliseconds. Actual restart will occur only when there are no more resource changes during this delay time window. Application parameter: eclipseRestartMainClass.
  • Type: long
  • Required: No
  • User Property: scalor.eclipseRestartPeriodSettle
  • Default: 3000

<eclipseRestartRegexList>

List of regular expressions used to detect test application restart condition. These resources are monitored in folders buildTestDependencyFolders included as effective project dependencies resolved by Eclipse/M2E, such as target/classes, target/test-classes, from current project as well as from accessible dependecy projects in the workspace. Normally matches Scala JVM classes, Scala.js IR classes, configuration files. Separator parameter: commonSequenceSeparator. Review actual class path with eclipseRestartLogCommand.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.eclipseRestartRegexList
  • Default: ^.+[.]class$ ★ ^.+[.]sjsir$ ★ ^.+[.]conf$ ★ ^.+[.]js$ ★

<eclipseRestartTaskName>

Eclipse background management job name representing running test application. Canceling this management job in Eclipse UI will terminate running test application. M2E project update or clean/build in Eclipse UI will re-create both management job and test application. Job name must be unique in Eclipse workspace. Application parameter: eclipseRestartMainClass. To review current background jobs in Eclipse, navigate:
Eclipse -> Window -> Show View -> Progress 
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.eclipseRestartTaskName
  • Default: Scalor: application restart manager @ ${project.artifactId}

<eclipseRestartWorkDir>

Working directory used to launch test application. Absolute path.
  • Type: java.io.File
  • Required: No
  • User Property: scalor.eclipseRestartWorkDir
  • Default: ${project.build.directory}/scalor/test-main

<skip>

Force to skip all executions of this plugin.
  • Type: boolean
  • Required: No
  • User Property: scalor.skip
  • Default: false

<skipEclipse>

Flag to skip goal execution: eclipse-*.
  • Type: boolean
  • Required: No
  • User Property: scalor.skipEclipse
  • Default: false

<skipLogReason>

Enable logging of reason for skipping an execution.
  • Type: boolean
  • Required: No
  • User Property: scalor.skipLogReason
  • Default: true

<skipPackagingList>

List of packaging types, which are skipped by this plugin.
  • Type: java.lang.String[]
  • Required: No
  • User Property: scalor.skipPackagingList
  • Default: pom