spring-boot/spring-boot-integration-tests/pom.xml
Andy Wilkinson 918e122ddc Fix remote DevTools' support for adding and removing classes
Previously, remote DevTools only correctly supported modifying
existing classes. New classes that were added would be missed, and
deleted classes could cause a failure as they would be found by
component scanning but hidden by RestartClassLoader.

This commit introduces a DevTools-specific ResourcePatternResolver
that is installed as the application context's resource loader. This
custom resolver is aware of the files that have been added and
deleted and modifies the result returned from getResource and
getResources accordingly.

New intergration tests have been introduced to verify DevTools'
behaviour. The tests cover four scenarios:

- Adding a new controller
- Removing an existing controller
- Adding a request mapping to a controller
- Removing a request mapping from a controller

These four scenarios are tested with:

- DevTools updating a local application
- DevTools updating a remote application packaged in a jar file
- DevTools updating a remote application that's been exploded

Closes gh-7379
2016-11-17 19:19:54 +00:00

111 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.4.3.BUILD-SNAPSHOT</version>
<relativePath>../spring-boot-parent</relativePath>
</parent>
<artifactId>spring-boot-integration-tests</artifactId>
<packaging>pom</packaging>
<name>Spring Boot Integration Tests</name>
<description>Spring Boot Integration Tests</description>
<url>http://projects.spring.io/spring-boot/</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>http://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/..</main.basedir>
<java.version>1.8</java.version>
</properties>
<modules>
<module>spring-boot-devtools-tests</module>
<module>spring-boot-gradle-tests</module>
<module>spring-boot-launch-script-tests</module>
<module>spring-boot-security-tests</module>
</modules>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<!-- Invoke integration tests in the install phase, after the maven-plugin
is available -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<settingsFile>src/it/settings.xml</settingsFile>
<projectsDirectory>${main.basedir}/spring-boot-samples/</projectsDirectory>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<skipInvocation>${skipTests}</skipInvocation>
<streamLogs>true</streamLogs>
<profiles>
<profile>integration-test</profile>
</profiles>
<localRepositoryPath> </localRepositoryPath>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>install</phase>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>clean-samples</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete includeemptydirs="true">
<fileset dir="${main.basedir}/spring-boot-samples" includes="**/target/" />
</delete>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>clean-samples</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>full</id>
</profile>
</profiles>
</project>