Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some more details about the reuse module creation process #683

Merged
merged 2 commits into from
Feb 16, 2024
Merged
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
12 changes: 12 additions & 0 deletions java/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ Starting with the 2.2 release CDS models, CSV import data and i18n files can now

Simply create a plain Maven Java project and place your CDS models in the `main/resources/cds` folder of the reuse package under a unique module directory (for example, leveraging group ID and artifact ID): `src/main/resources/cds/com.sap.capire/bookshop/`. With `com.sap.capire` being the group ID and `bookshop` being the artifact ID.

You can simplify the creation of such a **plain Maven Java** project by calling the following Maven archetype command:

```shell
mvn archetype:generate -DgroupId=com.sap.capire -DartifactId=bookshop -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
```

After the creation you'll need to maintain the plugin versions as well as the desired Java language version (we recommend version 17).

::: warning Only plain Maven Java projects
Please make sure that your plugin / reuse model project is neither created as a CAP Java project nor as a plain Spring Boot project.
:::

### Reference the New CDS Model in an Existing CAP Java Project

Projects wanting to import the content simply add a Maven dependency to the reuse package to their _srv/pom.xml_ in the `<dependencies>` section.
Expand Down
Loading