This one has me scratching my head.
I have a Spring Boot 1.5.12 web app (with maven project) that has a dependency that is another Spring Boot 1.5.12 JAR file (as maven project). I want the web app to auto restart whenever the JAR file is rebuilt. However, even though I appear to have everything configured properly, the web app is not restarting properly.
I am using the command-line mvn command.
I am specifying the correct name for the JAR file in the spring-devtools.properties
file in the web app:
restart.include.icamp-shared=icamp-shared-1.0-SNAPSHOT.jar
When I start up the web app, I see the following message in the log:
23:06:18.586 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : [xstream-1.4.9.jar, icamp-shared-1.0-SNAPSHOT.jar, xstream-hibernate-1.4.9.jar, json-io-4.9.4.jar, xstream-1.4.9.jar, xstream-hibernate-1.4.9.jar, json-io-4.9.4.jar, xstream-1.4.9.jar, xstream-hibernate-1.4.9.jar, json-io-4.9.4.jar]
23:06:18.590 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
23:06:18.594 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/Users/gerald/dev/ahs/redstone/git/iib/target/classes/, file:/Users/gerald/.m2/repository/com/cedarsoftware/json-io/4.9.4/json-io-4.9.4.jar, file:/Users/gerald/.m2/repository/com/thoughtworks/xstream/xstream-hibernate/1.4.9/xstream-hibernate-1.4.9.jar, file:/Users/gerald/.m2/repository/com/icsynergy/icamp-shared/1.0-SNAPSHOT/icamp-shared-1.0-SNAPSHOT.jar, file:/Users/gerald/.m2/repository/com/thoughtworks/xstream/xstream/1.4.9/xstream-1.4.9.jar`
The file URL for the dependent JAR is correct- it is located in my Maven repository.
I start up the application, and recompile the dependent jar file- the change is not detected. When I change a class within the project and rebuild the project, the change is properly detected. This is all from the command-line using the mvn command.
BTW, it also doesn't detect any changes to any of the other JARs that were listed in the properties file.
I have the following in my POM:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Here is my complete spring-devtools.properties file:
restart.include.jsonio=json-io-4.9.4.jar
restart.include.xstream=xstream-1.4.9.jar
restart.include.xstream-hibernate=xstream-hibernate-1.4.9.jar
restart.include.icamp-shared=icamp-shared-1.0-SNAPSHOT.jar
Any ideas?