<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<parent>
		<groupId>org.metawidget.modules</groupId>
		<artifactId>modules-parent</artifactId>
		<version>1.20</version>
		<relativePath>../</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.metawidget.modules.spring</groupId>
	<artifactId>metawidget-spring</artifactId>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>org.metawidget.modules.jsp</groupId>
			<artifactId>metawidget-jsp</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
		</dependency>		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.metawidget.modules</groupId>
			<artifactId>metawidget-core</artifactId>
			<type>test-jar</type>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- SpringAnnotationInspector needs 1.5 -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<target>1.5</target>
				</configuration>
			</plugin>		
			<!-- Downgrade other classes to Java 1.4 -->
			<!-- (don't use a second maven-compiler-plugin for this, as m2eclipse gets confused) -->
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-classes</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<delete>
									<fileset dir="target/classes">
										<exclude name="**/*.tld"/>									
										<exclude name="**/*.xml"/>
										<exclude name="**/SpringAnnotationInspector.class" />
										<exclude name="**/UiSpring*.class" />
									</fileset>
								</delete>
								<echo message="Downgrading to jsr14: debug=${maven.compile.debug}, debuglevel=${maven.compiler.debuglevel}, optimize=${maven.compiler.optimize}"/>
								<javac fork="true" srcdir="src/main/java" destdir="target/classes" target="jsr14" includeantruntime="false" debug="${maven.compile.debug}" debuglevel="${maven.compiler.debuglevel}" optimize="${maven.compiler.optimize}">
									<classpath refid="maven.dependency.classpath" />
								</javac>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>