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. Given the location of a Spring XML context, the mojo loads and injects it with a java.util.Properties object containing an augmented set of Maven properties. The java.util.Properties object is registered in the context as a bean under propertiesBeanName which defaults to maven.spring.properties. One typical use of the injected Maven properties in a Spring context is for replacing property placeholders.

For example:

 <beans>

  <context:property-placeholder properties-ref="maven.spring.properties" />

  <bean id="artifactId" class="java.lang.String">
   <constructor-arg value="${project.artifactId}" />
  </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.0</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.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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