jpa:list-entity-classnames

Full name:

com.edugility:jpa-maven-plugin:3-SNAPSHOT:list-entity-classnames

Description:

Generates a .properties file, suitable for use as a Maven filter, whose contents are the set of names of classes that have been annotated with the Entity, MappedSuperclass, Embeddable and IdClass annotations.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Since version: 1.0-SNAPSHOT.
  • Binds by default to the lifecycle phase: process-test-classes.

Optional Parameters

Name Type Since Description
db AnnotationDB 1.0-SNAPSHOT The AnnotationDB that will be cloned for use by this AbstractJPAMojo. This field may be null at any point, and may be populated by either Maven, the setAnnotationDB() method or the createAnnotationDB() method.
User property is: annotationDB.
defaultPropertyName String 1.0-SNAPSHOT The property key under which the entity classname listing will be stored. Maven will configure this by default to be entityClassnames. This field may be null at any point.
Default value is: entityClassnames.
User property is: defaultPropertyName.
encoding String 1.0-SNAPSHOT The character encoding to use when writing the outputFile. The default value as configured by Maven will be ${project.build.sourceEncoding}. This field may be null at any point.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
firstItemPrefix String 1.0-SNAPSHOT The textual prefix to prepend to the list of classnames.
User property is: firstItemPrefix.
lastItemSuffix String 1.0-SNAPSHOT The suffix to append to the list of classnames.
User property is: lastItemSuffix.
outputFile File 1.0-SNAPSHOT The File to which entity- and mapped superclass-annotated classnames will be written. This field may be null at any point. If this File is found to be relative, it will be relative to ${project.build.directory}${file.separator}generated-test-sources${file.separator}jpa-maven-plugin${file.separator}.
Default value is: ${project.build.directory}${file.separator}generated-test-sources${file.separator}jpa-maven-plugin${file.separator}entityClassnames.properties.
User property is: outputFile.
prefix String 1.0-SNAPSHOT The textual prefix to prepend to every element of the list of classnames, excluding the first element.
Default value is: <class>.
User property is: prefix.
propertyNames Map 1.0-SNAPSHOT A Map of property names indexed by package prefix segments. Class names found belonging to packages that start with the given package prefix segment will be stored in the outputFile indexed by the corresponding property name.

Segments in package names are delimited with a period (.). The following are examples of package prefix segments:

  • com.foobar.biz
  • com.foobar
  • com

User property is: propertyNames.
stripQuotes boolean 1.0-SNAPSHOT A workaround for MODELLO-256; if true then values for the prefix, suffix, firstItemPrefix and lastItemSuffix will have any leading and trailing quotes (if they are a matched pair) removed. This should protect these values from undesired trimming by Maven.
Default value is: true.
suffix String 1.0-SNAPSHOT The suffix to append to every element of the list of classnames, excluding the last element. be null at any point.
Default value is: </class>${line.separator}.
User property is: suffix.
urlFilter URLFilter 1.0-SNAPSHOT A URLFilter that will be used to construct the Set of URLs that will be scanned by this AbstractJPAMojo. This field may be null at any point and may be populated by either Maven or the setURLFilter() method.
User property is: URLFilter.
urls Set 1.0-SNAPSHOT The Set of URLs to scan. If not explicitly specified, this mojo will scan the test classpath.
User property is: URLs.
useOutputFile boolean 1.0-SNAPSHOT Whether or not to write properties to an external file.
Default value is: true.
User property is: useOutputFile.

Parameter Details

db:

The AnnotationDB that will be cloned for use by this AbstractJPAMojo. This field may be null at any point, and may be populated by either Maven, the setAnnotationDB() method or the createAnnotationDB() method.
  • Type: com.edugility.jpa.maven.plugin.AnnotationDB
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: annotationDB

defaultPropertyName:

The property key under which the entity classname listing will be stored. Maven will configure this by default to be entityClassnames. This field may be null at any point.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: defaultPropertyName
  • Default: entityClassnames

encoding:

The character encoding to use when writing the outputFile. The default value as configured by Maven will be ${project.build.sourceEncoding}. This field may be null at any point.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

firstItemPrefix:

The textual prefix to prepend to the list of classnames.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: firstItemPrefix

lastItemSuffix:

The suffix to append to the list of classnames.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: lastItemSuffix

outputFile:

The File to which entity- and mapped superclass-annotated classnames will be written. This field may be null at any point. If this File is found to be relative, it will be relative to ${project.build.directory}${file.separator}generated-test-sources${file.separator}jpa-maven-plugin${file.separator}.
  • Type: java.io.File
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: outputFile
  • Default: ${project.build.directory}${file.separator}generated-test-sources${file.separator}jpa-maven-plugin${file.separator}entityClassnames.properties

prefix:

The textual prefix to prepend to every element of the list of classnames, excluding the first element.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: prefix
  • Default: <class>

propertyNames:

A Map of property names indexed by package prefix segments. Class names found belonging to packages that start with the given package prefix segment will be stored in the outputFile indexed by the corresponding property name.

Segments in package names are delimited with a period (.). The following are examples of package prefix segments:

  • com.foobar.biz
  • com.foobar
  • com
  • Type: java.util.Map
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: propertyNames

stripQuotes:

A workaround for MODELLO-256; if true then values for the prefix, suffix, firstItemPrefix and lastItemSuffix will have any leading and trailing quotes (if they are a matched pair) removed. This should protect these values from undesired trimming by Maven.
  • Type: boolean
  • Since: 1.0-SNAPSHOT
  • Required: No
  • Default: true

suffix:

The suffix to append to every element of the list of classnames, excluding the last element. be null at any point.
  • Type: java.lang.String
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: suffix
  • Default: </class>${line.separator}

urlFilter:

A URLFilter that will be used to construct the Set of URLs that will be scanned by this AbstractJPAMojo. This field may be null at any point and may be populated by either Maven or the setURLFilter() method.
  • Type: com.edugility.jpa.maven.plugin.URLFilter
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: URLFilter

urls:

The Set of URLs to scan. If not explicitly specified, this mojo will scan the test classpath.
  • Type: java.util.Set
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: URLs

useOutputFile:

Whether or not to write properties to an external file.
  • Type: boolean
  • Since: 1.0-SNAPSHOT
  • Required: No
  • User Property: useOutputFile
  • Default: true