Skip to content

Commit

Permalink
Merge pull request #74 from cap-java/SDMEXT-899/ChangeLog
Browse files Browse the repository at this point in the history
ChangeLog & Version update to 1.0.1
  • Loading branch information
yashmeet29 authored Dec 23, 2024
2 parents b536b2d + a99f363 commit 2b3457c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Version 1.0.1

### Fixed

- This plugin can be used in a multi-tenant SaaS CAP application.

## Version 1.0.0

### Added
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,40 @@ Follow these steps if you want to integrate the SDM CAP Plugin with your own CAP
<version>{version}</version>
</dependency>
```

To be able to also use the cds models defined in this plugin the `cds-maven-plugin` needs to be used with the
`resolve` goal to make the cds models available in the project:

```xml
<plugin>
<groupId>com.sap.cds</groupId>
<artifactId>cds-maven-plugin</artifactId>
<version>${cds.services.version}</version>
<executions>
<execution>
<id>cds.resolve</id>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
```

If the cds models needs to be used in the `db` folder the `cds-maven-plugin` needs to be included also in the
`db` folder of the project.
This means the `db` folder needs to have a `pom.xml` with the `cds-maven-plugin` included and the `cds-maven-plugin`
needs to be run.

If the `cds-maven-plugin` is used correctly and executed the following lines should be visible in the build log:

````log
[INFO] --- cds:3.4.1:resolve (cds.resolve) @ your-project ---
[INFO] CdsResolveMojo: Extracting models from com.sap.cds:sdm:jar:<latest-version>:compile (<project-folder>)
[INFO] CdsResolveMojo: Extracting models from com.sap.cds:cds-feature-attachments:jar:1.0.5:compile (<project-folder>)
````

After that the models can be used.

2. To use sdm plugin in your CAP application, create an element with an `Attachments` type. Following the [best practice of separation of concerns](https://cap.cloud.sap/docs/guides/domain-modeling#separation-of-concerns), create a separate file _srv/attachment-extension.cds_ and extend your entity with attachments. Refer the following example from a sample Bookshop app:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</developers>

<properties>
<revision>1.0.0</revision>
<revision>1.0.1</revision>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand Down

0 comments on commit 2b3457c

Please sign in to comment.