Plugin Documentation

Goals available for this plugin:

GoalDescription
spring:load

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, to inject the Maven version number into a Spring context:

 <beans>
  <context:property-placeholder properties-ref="mavenProperties" />
  <bean id="version" class="java.lang.String">
   <constructor-arg value="${project.version}" />
  </bean>
 </beans>

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.6
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>spring-maven-plugin</artifactId>
          <version>1.2.5-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>spring-maven-plugin</artifactId>
        <version>1.2.5-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"