> For the complete documentation index, see [llms.txt](https://ondrej-kvasnovsky-2.gitbook.io/vaadin-on-grails/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ondrej-kvasnovsky-2.gitbook.io/vaadin-on-grails/fdsf/clean_up.md).

# Clean up

Grails `create-app` command generates many code we do not really need in the application. Let's clean it up.

### Remove assets

We can remove `grails-app/assets` folder because all required assets are provided by Vaadin.

### Remove views

When we use Vaadin as UI framework, we need no `.gsp` pages in our application. We can remove `grails-app/views`.

## Dependencies

There are not needed dependencies if we use Vaadin. We can exclude them globaly.

Add excludes in `BuildConfig.groovy` as follows.

```java
grails.project.dependency.resolution = {
    inherits("global") {
        'grails-plugin-gsp', 'grails-plugin-rest', 'grails-resources'
    }
```

> Verify what has been excluded by running `grails dependency-report` command. You can add a scope as the parameter, for example, `grails dependency-report compile`, `grails dependency-report runtime` and so on. In order to be sure that a dependency is excluded, run `grails clean-all` before the commands mentioned above.

The second step in clearing dependencies is to remove all dependencies and plugins that are generated by Grails. Dependencies and plugins part of `BuildConfig.groovy` will then become like this.

```java
dependencies {
}

plugins {
    build ":tomcat:7.0.55"
    compile ":vaadin:7.2.5"
}
```

### Last step

Grails generates inline comments for almost each property trying to explain what is the purpose of that property. I think if somebody wants to know what is the meaning of a property, he should go to [documentation](http://grails.org/doc/latest/guide/single.html), read about it and fully understand what is it about. Therefore I suggest to remove these comments.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ondrej-kvasnovsky-2.gitbook.io/vaadin-on-grails/fdsf/clean_up.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
