Full name:
org.kuali.maven.plugins:spring-maven-plugin:1.2.3:load
Description:
This mojo provides the ability to load a Spring context XML file. It uses a lightweight integration technique between Spring and Maven centered around java.util.Properties. Prior to the Spring context being loaded, it is injected with a java.util.Properties object containing the full set of Maven properties. The java.util.Properties object is registered in the context as a bean under the name mavenProperties.
One common use of the injected Maven properties in a Spring context is for replacing property placeholders.
For example:
<beans>
<context:property-placeholder properties-ref="mavenProperties" />
<bean id="artifactId" class="java.lang.String">
<constructor-arg value="${project.artifactId}" />
</bean>
</beans>
Attributes:
| Name | Type | Since | Description |
|---|---|---|---|
| location | String | - | Location of a Spring context XML file. This can be a file on the
local file system, or any URL Spring's Resource loading framework
understands eg classpath:my-context.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. |
| Name | Type | Since | Description |
|---|---|---|---|
| injectMojo | boolean | - | If true, this mojo object is injected into the Spring
context Default value is: false. |
| injectProject | boolean | - | If true, the MavenProject object is injected into the
Spring context Default value is: false. |
| injectProperties | boolean | - | If true, Maven properties are injected into the Spring context as a
java.util.Properties object Default value is: true. |
| locations | List | - | List of additional Spring context XML files to load (if any). |
| mojoBeanName | String | - | The name to use when registering this mojo object as a
bean in the Spring context. Default value is: mojo. |
| projectBeanName | String | - | The name to use when registering the MavenProject
object as a bean in the Spring context. Default value is: project. |
| properties | Properties | - | Additional properties to supply to the Spring context. |
| propertiesBeanName | String | - | The name to use when registering the
java.util.Properties object containing Maven
properties as a bean in the Spring context. Default value is: mavenProperties. |