1

I am using Eclipse and I added in my pom.xml this dependency:

   <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
   </dependency>

So in another project the dependency worked well DevTools reloads my application with success but in my new Spring-Boot application I have external libraries like openCV3.2.0 jar and JavaFX.

Is this a problem? Or can you tell me what should I provide you to fix the problem?

Here is my full pom.xml file:

<?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>

<groupId>people.counter</groupId>
<artifactId>peoplecounter</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>

<name>PeopleCounterLicenta</name>
<description>People Counter project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.4.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars.bower/ngstorage -->
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>ngstorage</artifactId>
        <version>0.3.11</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars.bower/angular-sanitize -->
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>angular-sanitize</artifactId>
        <version>1.6.4</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars/angularjs -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>angularjs</artifactId>
        <version>1.6.4</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
        <version>3.3.7-1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars/angular-ui-router -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>angular-ui-router</artifactId>
        <version>1.0.3</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars.bower/angular-messages -->
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>angular-messages</artifactId>
        <version>1.6.4</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars.bower/ng-idle -->
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>ng-idle</artifactId>
        <version>1.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
        <scope>runtime</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.1.1</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <fork>true</fork>
            </configuration>
        </plugin>
    </plugins>
</build>

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Rares
  • 597
  • 1
  • 5
  • 21

3 Answers3

2

From Eclipse menu, entry Project, select "Build automatically"

HelLViS69
  • 299
  • 1
  • 4
  • 15
1

Add the following lines to your pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <fork>true</fork>
            </configuration>
        </plugin>
    </plugins>
</build>
Pawan Patil
  • 1,067
  • 5
  • 20
  • 46
0

On my project it's:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>
Moshe Arad
  • 3,587
  • 4
  • 18
  • 33
  • I already tried that and it does't work....I had that as default and after that I started to adapt it....maybe is something else.....I am using alot of thinks in my project: opencv , javafx, angular – Rares Jun 14 '17 at 18:42
  • General speaking, you don't need to do any tweaking, and if you're, it seems that you're doing it wrong. – Moshe Arad Jun 14 '17 at 18:43
  • probably something is blocking it. whatever...I will restart the app by my own...I'll lose time but...that's it – Rares Jun 14 '17 at 18:46