Skip to content

Commit 5e45aa8

Browse files
ejbaartursouzamukundansundar
authored
Add maven wrapper (dapr#925)
Signed-off-by: Emanuel Alves <[email protected]> Co-authored-by: Artur Souza <[email protected]> Co-authored-by: Mukundan Sundararajan <[email protected]>
1 parent cf9ed3f commit 5e45aa8

File tree

7 files changed

+548
-16
lines changed

7 files changed

+548
-16
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,18 @@ jobs:
113113
chmod +x /home/runner/.local/bin/toxiproxy-server
114114
/home/runner/.local/bin/toxiproxy-server --version
115115
- name: Clean up files
116-
run: mvn clean -B
116+
run: ./mvnw clean -B
117117
- name: Build sdk
118-
run: mvn compile -B -q
118+
run: ./mvnw compile -B -q
119119
- name: Unit tests
120-
run: mvn -B test -q
120+
run: ./mvnw -B test -q
121121
- name: Codecov
122122
uses: codecov/[email protected]
123123
- name: Install jars
124-
run: mvn install -q -B -DskipTests
124+
run: ./mvnw install -q -B -DskipTests
125125
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
126126
id: integration_tests
127-
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} mvn -B -f sdk-tests/pom.xml verify
127+
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -f sdk-tests/pom.xml verify
128128
- name: Upload test report for sdk
129129
uses: actions/upload-artifact@master
130130
with:
@@ -166,7 +166,7 @@ jobs:
166166
java-version: ${{ env.JDK_VER }}
167167
- name: Get pom parent version
168168
run: |
169-
PARENT_VERSION=$(mvn -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
169+
PARENT_VERSION=$(./mvnw -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
170170
echo "PARENT_VERSION=$PARENT_VERSION" >> $GITHUB_ENV
171171
- name: Is SNAPSHOT release ?
172172
if: contains(github.ref, 'master') && contains(env.PARENT_VERSION, '-SNAPSHOT')
@@ -178,11 +178,11 @@ jobs:
178178
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV
179179
- name: Install jars
180180
if: env.DEPLOY_OSSRH == 'true'
181-
run: mvn clean install -B -q
181+
run: ./mvnw clean install -B -q
182182
- name: Publish to ossrh
183183
if: env.DEPLOY_OSSRH == 'true'
184184
run: |
185185
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
186186
export GPG_TTY=$(tty)
187187
gpg --batch --import private-key.gpg
188-
mvn -V -B -Dgpg.skip=false -s settings.xml deploy -pl \!examples
188+
./mvnw -V -B -Dgpg.skip=false -s settings.xml deploy -pl \!examples

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ jobs:
105105
docker-compose -f ./sdk-tests/deploy/local-test.yml up -d mongo
106106
docker ps
107107
- name: Clean up files
108-
run: mvn clean
108+
run: ./mvnw clean
109109
- name: Build sdk
110-
run: mvn compile -q
110+
run: ./mvnw compile -q
111111
- name: Install jars
112-
run: mvn install -q
112+
run: ./mvnw install -q
113113
- name: Validate invoke http example
114114
working-directory: ./examples
115115
run: |

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

.sdkmanrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=11.0.19-tem
3+
java=11.0.19-tem
4+
maven=3.8.5

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Then head over to build the [Maven](https://maven.apache.org/install.html) (Apac
9898

9999
```sh
100100
# make sure you are in the `java-sdk` directory.
101-
mvn clean install
101+
./mvnw clean install
102102
```
103103

104104
Try the following examples to learn more about Dapr's Java SDK:
@@ -195,7 +195,7 @@ Most exceptions thrown from the SDK are instances of `DaprException`. `DaprExcep
195195
### Update URL to fetch proto files
196196
197197
Change the `dapr.proto.baseurl` property below in [pom.xml](./pom.xml) to point to the URL for the desired commit hash in Git if you need to target a proto file that is not been merged into master yet.
198-
Note: You may need to run `mvn clean` after changing this setting to remove any auto-generated files so that the new proto files get downloaded and compiled.
198+
Note: You may need to run `./mvnw clean` after changing this setting to remove any auto-generated files so that the new proto files get downloaded and compiled.
199199
200200
```xml
201201
<project>
@@ -229,7 +229,7 @@ Along with the pre-requisites for [SDK](#pre-requisites) the following are neede
229229
The code for the tests are present inside the project [sdk-tests](./sdk-tests). This module alone can be imported as a separate project in IDEs.
230230
This project depends on the rest of the JARs built by the other modules in the repo like [sdk](./sdk), [sdk-springboot](./sdk-springboot) etc.
231231
232-
As a starting point for running Integration Tests, first run `mvn clean install` from the root of the repo to build the JARs for the different modules
232+
As a starting point for running Integration Tests, first run `./mvnw clean install` from the root of the repo to build the JARs for the different modules
233233
except the `sdk-tests` module.
234234
235235
#### Run all the dependent services spun up during build
@@ -257,7 +257,7 @@ From the `java-sdk` repo root, change to the `sdk-tests` directory and run the f
257257
```bash
258258
## with current directory as /java-sdk/sdk-tests/
259259
260-
mvn clean install
260+
../mvnw clean install
261261
```
262262
263263
The above command runs all the integration tests present in the `sdk-tests` project.

0 commit comments

Comments
 (0)