spring:load

Full name:

org.kuali.maven.plugins:spring-maven-plugin:1.1.3-SNAPSHOT:load

Description:

Load a Spring context XML file optionally filtering it using Maven properties before doing so. If exportProperties is true, Maven properties are exported to the file system prior to loading and filtering the Spring context. The path to the exported properties file is automatically added to the Maven properties under the key maven.spring.properties. This combination allows the injection of Maven properties into a Spring context by setting filterContext=true in the Maven pom and adding one line to the Spring XML configuration file:
<context:property-placeholder location="${maven.spring.properties}" />
OR
<util:properties id="mavenProperties" location="${maven.spring.properties}" />

Attributes:

  • Requires a Maven project to be executed.

Required Parameters

Name Type Since Description
contextLocation String - Location of a Spring context XML file. This can be any URL Spring's Resource loading framework understands eg classpath:mycontext.xml
Default value is: classpath:${project.artifactId}-context.xml.
serviceClassname String - The implementation of org.kuali.common.util.service.SpringService to use
Default value is: org.kuali.common.util.service.DefaultSpringService.

Optional Parameters

Name Type Since Description
encoding String - Character encoding for the context XML file
Default value is: ${project.build.sourceEncoding}.
exportExclude String - Comma separated list of properties to exclude from the export
exportExcludes List - List of properties to exclude. No properties are excluded by default.
exportInclude String - Comma separated list of properties to include in the export
exportIncludes List - List of properties to include. All properties are included by default.
exportProperties boolean - If true, Maven properties are exported to the file system prior to filtering and loading the Spring context.
Default value is: false.
exportPropertiesFile File - The file to export properties to when exportProperties is true
Default value is: ${project.build.directory}/spring/maven.properties.
exportPropertiesFileProperty String - If exportProperties is true, the path to the exported properties file will be included as a property under this key
Default value is: maven.spring.properties.
filterContext boolean - If true contextLocation is filtered before being loaded
Default value is: false.
filterExclude String - Comma separated list of properties to exclude when filtering the context
filterExcludes List - List of properties to exclude. No properties are excluded by default.
filterInclude String - Comma separated list of properties to include when filtering the context
filterIncludes List - List of properties to include. All properties are included by default.
properties Properties - Additional properties supplied directly to the mojo
workingDir File - Working directory for the plugin.
Default value is: ${project.build.directory}/spring.

Parameter Details

contextLocation:

Location of a Spring context XML file. This can be any URL Spring's Resource loading framework understands eg classpath:mycontext.xml
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${spring.contextLocation}
  • Default: classpath:${project.artifactId}-context.xml

encoding:

Character encoding for the context XML file
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.encoding}
  • Default: ${project.build.sourceEncoding}

exportExclude:

Comma separated list of properties to exclude from the export
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.exportExclude}

exportExcludes:

List of properties to exclude. No properties are excluded by default.
  • Type: java.util.List
  • Required: No

exportInclude:

Comma separated list of properties to include in the export
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.exportInclude}

exportIncludes:

List of properties to include. All properties are included by default.
  • Type: java.util.List
  • Required: No

exportProperties:

If true, Maven properties are exported to the file system prior to filtering and loading the Spring context.
  • Type: boolean
  • Required: No
  • Expression: ${spring.exportProperties}
  • Default: false

exportPropertiesFile:

The file to export properties to when exportProperties is true
  • Type: java.io.File
  • Required: No
  • Expression: ${spring.exportPropertiesFile}
  • Default: ${project.build.directory}/spring/maven.properties

exportPropertiesFileProperty:

If exportProperties is true, the path to the exported properties file will be included as a property under this key
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.exportPropertiesFileProperty}
  • Default: maven.spring.properties

filterContext:

If true contextLocation is filtered before being loaded
  • Type: boolean
  • Required: No
  • Expression: ${spring.filterContext}
  • Default: false

filterExclude:

Comma separated list of properties to exclude when filtering the context
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.filterExclude}

filterExcludes:

List of properties to exclude. No properties are excluded by default.
  • Type: java.util.List
  • Required: No

filterInclude:

Comma separated list of properties to include when filtering the context
  • Type: java.lang.String
  • Required: No
  • Expression: ${spring.filterInclude}

filterIncludes:

List of properties to include. All properties are included by default.
  • Type: java.util.List
  • Required: No

properties:

Additional properties supplied directly to the mojo
  • Type: java.util.Properties
  • Required: No

serviceClassname:

The implementation of org.kuali.common.util.service.SpringService to use
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${spring.serviceClassname}
  • Default: org.kuali.common.util.service.DefaultSpringService

workingDir:

Working directory for the plugin.
  • Type: java.io.File
  • Required: No
  • Expression: ${spring.workingDir}
  • Default: ${project.build.directory}/spring