> Markdown version of [Automatic Restart with Jetty Maven Plugin](https://vaadin.com/docs/next/flow/configuration/live-reload/jetty). Section index: [llms.txt](https://vaadin.com/docs/next/flow/llms.txt)

# Automatic Restart with the Jetty Maven Plugin

The [Jetty Maven plugin](https://www.eclipse.org/jetty/documentation/jetty-11/index.html#jetty-maven-plugin) with the `scan` configuration set to a positive value performs complete application restart when the given number of seconds have elapsed since the last Java change. For instance:

```xml
<plugins>
    <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>11.0.13</version>
        <configuration>
            <scan>2</scan>
        </configuration>
    </plugin>

    <!-- more plugins -->
</plugins>
```

Since the plugin performs a full server restart, all Java changes are picked up. This includes modifications to server startup listeners, as well as changes to code that connects frontend and backend components, such as adding a new `LitTemplate` class, or adding a new CSS import and using it in Java via the `@CssImport` annotation.

However, the session isn’t preserved during the restart.

`D2C41654-D32C-4007-935D-25413017DE1B`
