Skip to content

Commit

Permalink
Switch default branch (#202)
Browse files Browse the repository at this point in the history
* Switch default branch to main

* Update build.yml

* Update sonar.yml

* Update sonar.yml

* Update CONTRIBUTING.md

* Update NameBuilding.md

* Update sonar.yml
  • Loading branch information
wog48 authored Feb 14, 2023
1 parent d3bcce1 commit eb10bc6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/archetype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Archetype
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build OData JPA Processor
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,37 @@ name: SonarCloud
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: maven
- name: Cache SonarCloud packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Create coverage with jacoco
run: cd ./jpa && mvn -q test jacoco:report
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This happens in an automated fashion during the submission process: the CLA ass

Code that is contributed should use:

- [eclipse-codestyle-formatter.xml](https://github.com/SAP/olingo-jpa-processor-v4/blob/master/jpa/eclipse-codestyle-formatter.xml)
- [eclipse-cleanup-profile.xml](https://github.com/SAP/olingo-jpa-processor-v4/blob/master/jpa/eclipse-cleanup-profile.xml)
- [eclipse-codestyle-formatter.xml](https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/eclipse-codestyle-formatter.xml)
- [eclipse-cleanup-profile.xml](https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/eclipse-cleanup-profile.xml)

A contribution should contain tests when ever possible. An approved pull request must not be changed after the approval.
A contribution should contain tests when ever possible. An approved pull request must not be changed after the approval.
2 changes: 1 addition & 1 deletion jpa-tutorial/Questions/NameBuilding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The JPA Processor generates out of the JPA annotations or metadata the correspon

Our service has an entity set _Persons_, which shall be named _People_ instead.

The names of the artifacts are created by a class implementing interface [JPAEdmNameBuilder](https://github.com/SAP/olingo-jpa-processor-v4/blob/master/jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/api/JPAEdmNameBuilder.java). As mentioned, for our service, we just want to override _Persons_. For the rest we take the default names.
The names of the artifacts are created by a class implementing interface [JPAEdmNameBuilder](https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/api/JPAEdmNameBuilder.java). As mentioned, for our service, we just want to override _Persons_. For the rest we take the default names.

As a first step we create an implementation of `JPAEdmNameBuilder` called `APINameBuilder`. It creates an instance of `JPADefaultEdmNameBuilder` to fallback to the default names and returns `People` as entity set name for entity type `Person`:

Expand Down

0 comments on commit eb10bc6

Please sign in to comment.