Fork me on GitHub

scalor:format

Full name:

com.carrotgarden.maven:scalor-maven-plugin_2.12:1.5.0.20190502181145:format

Description:

Format sources for all compilation scopes. Invokes goals: format-*

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: generate-sources.

Optional Parameters

Name Type Since Description
<buildMacroResourceFolders> Resource[] - Resource root folders to be included in compilation scope=macro. There are no macro resource folders by default. Component reference: Resource . Example entry in pom.xml:
<buildMacroResourceFolders>
  <resource>
    <directory>${project.basedir}/src/macro/resources</directory>
  </resource>  
</buildMacroResourceFolders>

User property is: scalor.buildMacroResourceFolders.
<buildMacroSourceJavaFolders> File[] - Java source root folders to be included in compilation scope=macro. Normally uses src/macro/java.
Default value is: ${project.build.sourceDirectory}/../../macro/java.
User property is: scalor.buildMacroSourceJavaFolders.
<buildMacroSourceScalaFolders> File[] - Scala source root folders to be included in compilation scope=macro. Normally uses src/macro/scala.
Default value is: ${project.build.sourceDirectory}/../../macro/scala.
User property is: scalor.buildMacroSourceScalaFolders.
<buildMainResourceFolders> Resource[] - Resource root folders to be included in compilation scope=main. Normally uses src/main/resources. Absolute path. Component reference: Resource . Example custom entry in pom.xml:
<buildMainResourceFolders>
  <resource>
    <directory>${project.basedir}/src/main/resources</directory>
  </resource>  
  <resource>
    <directory>${project.basedir}/target/generated/main/resources</directory>
  </resource>  
</buildMainResourceFolders>

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

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

Default value is: ${project.build.sourceDirectory}/../scala.
User property is: scalor.buildMainSourceScalaFolders.
<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.
<formatJavaEnable> boolean - Java formatter enablement parameter. Enable formatter invocation in Maven. Enable formatter settings transfer in Eclipse.
Default value is: true.
User property is: scalor.formatJavaEnable.
<formatJavaSettings> String - Java formatter (org.eclipse.jdt.core) configuration file. Relative path to ${project.basedir}. Settings reference. Normally located in Maven project configuration folder .mvn. Applied to Eclipse JDT with goal=eclipse-format.
Default value is: .mvn/format-java.xml.
User property is: scalor.formatJavaSettings.
<formatLogChanged> boolean - Enable logging of formatted changed files.
Default value is: true.
User property is: scalor.formatLogChanged.
<formatLogFailure> boolean - Enable logging of files with formatting failures.
Default value is: true.
User property is: scalor.formatLogFailure.
<formatLogSuccess> boolean - Enable logging of successful (both changed and not changed) files.
Default value is: false.
User property is: scalor.formatLogSuccess.
<formatLogTotal> boolean - Enable logging of format invocation statistics: number of files in each category: total, changed, success, failure.
Default value is: true.
User property is: scalor.formatLogTotal.
<formatLogTraces> boolean - Enable logging of formatting failures stack traces.
Default value is: false.
User property is: scalor.formatLogTraces.
<formatParentLookup> boolean - Enable format configuration file lookup in parents of multi-module projects. In each project canditate, plugin will check for existence of relevant files: formatJavaSettings, formatScalaSettings.
Default value is: true.
User property is: scalor.formatParentLookup.
<formatRegexJavaExclude> String - Regular expression for Java source file discovery via exclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches no files when empty by default.
User property is: scalor.formatRegexJavaExclude.
<formatRegexJavaInclude> String - Regular expression for Java source file discovery via inclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches files with java extension by default.
Default value is: .+[.]java.
User property is: scalor.formatRegexJavaInclude.
<formatRegexScalaExclude> String - Regular expression for Scala source file discovery via exclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches no files when empty by default.
User property is: scalor.formatRegexScalaExclude.
<formatRegexScalaInclude> String - Regular expression for Scala source file discovery via inclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches files with scala extension by default.
Default value is: .+[.]scala.
User property is: scalor.formatRegexScalaInclude.
<formatScalaEnable> boolean - Scala formatter enablement parameter. Enable formatter invocation in Maven. Enable formatter settings transfer in Eclipse.
Default value is: true.
User property is: scalor.formatScalaEnable.
<formatScalaSettings> String - Scala formatter (scala-ide/scalariform) configuration file. Relative path to ${project.basedir}. Settings reference. Normally located in Maven project configuration folder .mvn. Applied to Scala IDE with goal=eclipse-format.
Default value is: .mvn/format-scala.props.
User property is: scalor.formatScalaSettings.
<formatSourceEncoding> String - Charset for source file reading and writing.
Default value is: UTF-8.
User property is: scalor.formatSourceEncoding.
<skip> boolean - Force to skip all executions of this plugin.
Default value is: false.
User property is: scalor.skip.
<skipFormat> boolean - Flag to skip goal execution: format-*.
Default value is: false.
User property is: scalor.skipFormat.
<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

<buildMacroResourceFolders>

Resource root folders to be included in compilation scope=macro. There are no macro resource folders by default. Component reference: Resource . Example entry in pom.xml:
<buildMacroResourceFolders>
  <resource>
    <directory>${project.basedir}/src/macro/resources</directory>
  </resource>  
</buildMacroResourceFolders>
  • Type: org.apache.maven.model.Resource[]
  • Required: No
  • User Property: scalor.buildMacroResourceFolders

<buildMacroSourceJavaFolders>

Java source root folders to be included in compilation scope=macro. Normally uses src/macro/java.
  • Type: java.io.File[]
  • Required: No
  • User Property: scalor.buildMacroSourceJavaFolders
  • Default: ${project.build.sourceDirectory}/../../macro/java

<buildMacroSourceScalaFolders>

Scala source root folders to be included in compilation scope=macro. Normally uses src/macro/scala.
  • Type: java.io.File[]
  • Required: No
  • User Property: scalor.buildMacroSourceScalaFolders
  • Default: ${project.build.sourceDirectory}/../../macro/scala

<buildMainResourceFolders>

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

<buildMainSourceJavaFolders>

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

<buildMainSourceScalaFolders>

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

<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

<formatJavaEnable>

Java formatter enablement parameter. Enable formatter invocation in Maven. Enable formatter settings transfer in Eclipse.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatJavaEnable
  • Default: true

<formatJavaSettings>

Java formatter (org.eclipse.jdt.core) configuration file. Relative path to ${project.basedir}. Settings reference. Normally located in Maven project configuration folder .mvn. Applied to Eclipse JDT with goal=eclipse-format.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatJavaSettings
  • Default: .mvn/format-java.xml

<formatLogChanged>

Enable logging of formatted changed files.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatLogChanged
  • Default: true

<formatLogFailure>

Enable logging of files with formatting failures.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatLogFailure
  • Default: true

<formatLogSuccess>

Enable logging of successful (both changed and not changed) files.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatLogSuccess
  • Default: false

<formatLogTotal>

Enable logging of format invocation statistics: number of files in each category: total, changed, success, failure.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatLogTotal
  • Default: true

<formatLogTraces>

Enable logging of formatting failures stack traces.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatLogTraces
  • Default: false

<formatParentLookup>

Enable format configuration file lookup in parents of multi-module projects. In each project canditate, plugin will check for existence of relevant files: formatJavaSettings, formatScalaSettings.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatParentLookup
  • Default: true

<formatRegexJavaExclude>

Regular expression for Java source file discovery via exclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches no files when empty by default.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatRegexJavaExclude

<formatRegexJavaInclude>

Regular expression for Java source file discovery via inclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches files with java extension by default.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatRegexJavaInclude
  • Default: .+[.]java

<formatRegexScalaExclude>

Regular expression for Scala source file discovery via exclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches no files when empty by default.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatRegexScalaExclude

<formatRegexScalaInclude>

Regular expression for Scala source file discovery via inclusion by match against absolute path. File match is defined as: include.hasMatch && ! exclude.hasMatch. Matches files with scala extension by default.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatRegexScalaInclude
  • Default: .+[.]scala

<formatScalaEnable>

Scala formatter enablement parameter. Enable formatter invocation in Maven. Enable formatter settings transfer in Eclipse.
  • Type: boolean
  • Required: No
  • User Property: scalor.formatScalaEnable
  • Default: true

<formatScalaSettings>

Scala formatter (scala-ide/scalariform) configuration file. Relative path to ${project.basedir}. Settings reference. Normally located in Maven project configuration folder .mvn. Applied to Scala IDE with goal=eclipse-format.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatScalaSettings
  • Default: .mvn/format-scala.props

<formatSourceEncoding>

Charset for source file reading and writing.
  • Type: java.lang.String
  • Required: No
  • User Property: scalor.formatSourceEncoding
  • Default: UTF-8

<skip>

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

<skipFormat>

Flag to skip goal execution: format-*.
  • Type: boolean
  • Required: No
  • User Property: scalor.skipFormat
  • 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