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

Download proto #224

Merged
merged 5 commits into from Feb 15, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -47,3 +47,5 @@ hs_err_pid*
/docs/dapr-sdk-actors
/docs/dapr-sdk-autogen
/docs/dapr-sdk
/proto/dapr
/proto/daprclient
17 changes: 17 additions & 0 deletions README.md
Expand Up @@ -221,3 +221,20 @@ When releasing a new version of this SDK you must increase the version of all mo
mvn versions:set -DnewVersion="0.1.0-preview02"
mvn versions:commit
```

#### Update proto files

Change the properties below in [pom.xml](./pom.xml) to point to the desired reference URL in Git. Avoid pointing to master branch since it can change over time and create unpredictable behavior in the build.

```xml
<project>
...
<properties>
...
<dapr.proto.url>https://raw.githubusercontent.com/dapr/dapr/e540a7166aeaf115773ccc4c7a1056ae7eed073b/pkg/proto/dapr/dapr.proto</dapr.proto.url>
<dapr.client.proto.url>https://raw.githubusercontent.com/dapr/dapr/e540a7166aeaf115773ccc4c7a1056ae7eed073b/pkg/proto/daprclient/daprclient.proto</dapr.client.proto.url>
...
</properties>
...
</project>
```
2 changes: 2 additions & 0 deletions pom.xml
Expand Up @@ -17,6 +17,8 @@
<grpc.version>1.25.0</grpc.version>
<protobuf.version>3.11.0</protobuf.version>
<protoc.version>3.10.0</protoc.version>
<dapr.proto.url>https://raw.githubusercontent.com/dapr/dapr/e540a7166aeaf115773ccc4c7a1056ae7eed073b/pkg/proto/dapr/dapr.proto</dapr.proto.url>
artursouza marked this conversation as resolved.
Show resolved Hide resolved
<dapr.client.proto.url>https://raw.githubusercontent.com/dapr/dapr/e540a7166aeaf115773ccc4c7a1056ae7eed073b/pkg/proto/daprclient/daprclient.proto</dapr.client.proto.url>
<os-maven-plugin.version>1.6.2</os-maven-plugin.version>
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
Expand Down
109 changes: 0 additions & 109 deletions proto/dapr/dapr.proto

This file was deleted.

76 changes: 0 additions & 76 deletions proto/daprclient/daprclient.proto

This file was deleted.

37 changes: 36 additions & 1 deletion sdk-autogen/pom.xml
Expand Up @@ -18,7 +18,7 @@

<properties>
<protobuf.output.directory>${project.build.directory}/generated-sources</protobuf.output.directory>
<protobuf.input.directory>${project.parent.basedir}/proto</protobuf.input.directory>
<protobuf.input.directory>${project.build.directory}/proto</protobuf.input.directory>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>

Expand Down Expand Up @@ -56,6 +56,41 @@

<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>getDaprProto</id>
<!-- the wget goal actually binds itself to this phase by default -->
<phase>initialize</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>${dapr.proto.url}</url>
<outputFileName>dapr.proto</outputFileName>
<!-- default target location, just to demonstrate the parameter -->
<outputDirectory>${protobuf.input.directory}/dapr</outputDirectory>
</configuration>
</execution>
<execution>
<id>getDaprClientProto</id>
<!-- the wget goal actually binds itself to this phase by default -->
<phase>initialize</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>${dapr.client.proto.url}</url>
<outputFileName>daprclient.proto</outputFileName>
<!-- default target location, just to demonstrate the parameter -->
<outputDirectory>${protobuf.input.directory}/daprclient</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
Expand Down