diff options
author | David Ostrovsky <david@ostrovsky.org> | 2015-12-01 23:59:11 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-02-02 14:20:18 +0100 |
commit | e537a5e93dd86829279d92a1c4ec7861fe8676c3 (patch) | |
tree | 1f55f043fbdcfbdddcecb6a7cc820ac8e56a0efb /bin | |
parent | a71662839b67b4a08f02ddf9ee00385a21d10881 (diff) |
Add build toolchain to upload LibreOffice API to Maven Central
Set up the toolchain to create sources and javadocs artifacts in
addition to JARs created during the build. Use Buck build tool for
that: [1]. This is a fork of Google's build tool Blaze, created by
Xooglers at Facebook. This build tool (like Blaze itself) uses
Python to write build files.
Add needed tools and build files to install LibreOffice API artifacts
to local Maven repository or deploy them to Maven Central.
To build all needed artifacts LibreOffice must be built regularly
with GNU make first. To build the rest of the API (sources and
javadocs):
$> buck build api
To replace version number with upcoming release version:
$> solenv/bin/version.py 5.1.0
To install the API to local Maven repository:
$> buck build api_install
To deploy the API to Maven Central:
$> buck build api_deploy
Detailed documentation is added to document the prerequisites and
the workflow to upload LibreOffice API to Maven Central.
* [1] https://buckbuild.com
Change-Id: Ibdd552a01110836703bc069abe829b9921491cac
Reviewed-on: https://gerrit.libreoffice.org/20343
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 1fd41f43eb73c373cb94d32d82c5fb7a7e243367)
Reviewed-on: https://gerrit.libreoffice.org/20814
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 95fe7d0a68c230df13c80dd8759f86d635c48101)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mvn.py | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/bin/mvn.py b/bin/mvn.py deleted file mode 100755 index d5a1c9a0d165..000000000000 --- a/bin/mvn.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/python -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -from __future__ import print_function -from optparse import OptionParser -from os import path -from sys import stderr -try: - from subprocess import check_output -except ImportError: - from subprocess import Popen, PIPE - def check_output(*cmd): - return Popen(*cmd, stdout=PIPE).communicate()[0] -opts = OptionParser() -opts.add_option('--repository', help='maven repository id') -opts.add_option('--url', help='maven repository url') -opts.add_option('-a', help='action (valid actions are: install,deploy)') -opts.add_option('-v', help='libreoffice version') -opts.add_option('-s', action='append', help='triplet of artifactId:type:path') - -args, ctx = opts.parse_args() -if not args.v: - print('version is empty', file=stderr) - exit(1) - -common = [ - '-DgroupId=org.libreoffice', - '-Dversion=%s' % args.v, -] - -self = path.dirname(path.abspath(__file__)) -mvn = ['mvn', '--file', path.join(self, 'fake_pom.xml')] - -if 'install' == args.a: - cmd = mvn + ['install:install-file'] + common -elif 'deploy' == args.a: - cmd = mvn + [ - 'deploy:deploy-file', - '-DrepositoryId=%s' % args.repository, - '-Durl=%s' % args.url, - ] + common -else: - print("unknown action -a %s" % args.a, file=stderr) - exit(1) - -for spec in args.s: - artifact, packaging_type, src = spec.split(':') - try: - check_output(cmd + [ - '-DartifactId=%s' % artifact, - '-Dpackaging=%s' % packaging_type, - '-Dfile=%s' % src, - ]) - except Exception as e: - print('%s command failed: %s' % (args.a, e), file=stderr) - exit(1) |