blob: e99e4745a5989acff6c0a7a212ad0138ba8da8cc [file] [log] [blame] [view]
zhangkun8365858d52015-03-30 10:51:13 -07001# Build scripts that publish pre-compiled protoc artifacts
2``protoc`` is the compiler for ``.proto`` files. It generates language bindings
3for the messages and/or RPC services from ``.proto`` files.
4
5Because ``protoc`` is a native executable, the scripts under this directory
6build and publish a ``protoc`` executable (a.k.a. artifact) to Maven
zhangkun839f4d9c62015-03-30 10:57:00 -07007repositories. The artifact can be used by build automation tools so that users
8would not need to compile and install ``protoc`` for their systems.
9
10## Versioning
11The version of the ``protoc`` artifact must be the same as the version of the
12Protobuf project.
zhangkun8365858d52015-03-30 10:51:13 -070013
14## Artifact name
15The name of a published ``protoc`` artifact is in the following format:
16``protoc-<version>-<os>-<arch>.exe``, e.g., ``protoc-3.0.0-alpha-3-windows-x86_64.exe``.
17
zhangkun83f162ee52015-03-30 11:02:02 -070018## System requirement
Kun Zhange4999562015-04-01 12:06:24 -070019Install [Apache Maven](http://maven.apache.org/) if you don't have it.
20
21The scripts only work under Unix-like environments, e.g., Linux, MacOSX, and
zhangkun83f162ee52015-03-30 11:02:02 -070022Cygwin or MinGW for Windows. Please see ``README.md`` of the Protobuf project
23for how to set up the build environment.
24
zhangkun8365858d52015-03-30 10:51:13 -070025## To install artifacts locally
26The following command will install the ``protoc`` artifact to your local Maven repository.
27```
Kun Zhange4999562015-04-01 12:06:24 -070028$ mvn install
zhangkun8365858d52015-03-30 10:51:13 -070029```
30
31## To push artifacts to Maven Central
Kun Zhange4999562015-04-01 12:06:24 -070032Before you can upload artifacts to Maven Central repository, make sure you have
33read [this page](http://central.sonatype.org/pages/apache-maven.html) on how to
34configure GPG and Sonatype account
zhangkun8365858d52015-03-30 10:51:13 -070035
36Use the following command to upload artifacts:
37```
Kun Zhange4999562015-04-01 12:06:24 -070038$ mvn clean deploy -P release
zhangkun8365858d52015-03-30 10:51:13 -070039```
40