Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Clicking on the green run button will start the application.
After the application has started, you can view your it at http://localhost:8080/ in your browser.


If you want to run the application locally in the production mode, use `spring-boot:run -Pproduction` command instead.
If you want to run the application locally in the production mode, use `package` and `java -jar target/spring-skeleton-1.0-SNAPSHOT.jar` commands instead.
### Running Integration Tests

Integration tests are implemented using [Vaadin TestBench](https://vaadin.com/testbench). The tests take a few minutes to run and are therefore included in a separate Maven profile. We recommend running tests with a production build to minimize the chance of development time toolchains affecting test stability. To run the tests using Google Chrome, execute

`mvn verify -Pit,production`
`mvn verify -Pit`

and make sure you have a valid TestBench license installed.

Expand Down
53 changes: 17 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.0-M3</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<repositories>
Expand Down Expand Up @@ -74,6 +74,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
Expand All @@ -97,6 +102,10 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!-- Set false to exclude optional dependencies like vaadin-dev. -->
<includeOptional>false</includeOptional>
Copy link

@knoobie knoobie Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: is the other PR of spring that automatically excludes development-tool(s) not better suited if applicable? This would reduce the need for users to customize their spring plugin if Vaadin Dev is automatically removed from the created artefact

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that works as expected, we could also remove need for adding vaadin-dev explicitly as a optional dependency. It's worth to explore that more, hopefully it can be used without braking change (beta release is coming soon), but this includeOptional alone achieves the goal to remove need of production profile.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new manifest property Spring-Boot-Jar-Type: development-tool excluded jar also when run with spring-boot:run goal. This makes it not suitable for us atm. since we want those dev tools included.
This doesn't mean we couldn't still utilize it later when it's more clear what's going on with it and others observes same as I did.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new manifest property Spring-Boot-Jar-Type: development-tool excluded jar also when run with spring-boot:run goal.

That sounds like a bug, wouldn't this also affect spring boot's own devtools?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change doesn't seem to touch any internal dev tooling logic.

</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
Expand Down Expand Up @@ -136,47 +145,19 @@
<goal>prepare-frontend</goal>
</goals>
</execution>
<execution>
<id>package-for-production</id>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<dependencies>
<!-- Exclude development dependencies from production -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>it</id>
<build>
Expand Down