include_defs('//bucklets/maven_jar.bucklet')

REPO = GERRIT
VERS = '3.3.2.201404171909-r.128-g79448bc'

maven_jar(
  name = 'jgit',
  id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
  sha1 = 'a06d48637aa2952d18909244fd96f7483f148b7c',
  repository = REPO,
  unsign = True,
  deps = [':ewah'],
  exclude = [
    'META-INF/eclipse.inf',
    'about.html',
    'plugin.properties',
  ],
)

maven_jar(
  name = 'jgit-servlet',
  id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS,
  sha1 = 'da9711d199d140a69d21eea70be2f13eca21935c',
  repository = REPO,
  deps = [':jgit'],
  unsign = True,
  exclude = [
    'about.html',
    'plugin.properties',
  ],
)

java_library(
  name = 'jgit-archive',
  exported_deps = [
    ':jgit-archive_library',
    ':commons-compress',
    ':tukaani-xz',
  ],
  visibility = ['PUBLIC'],
)

maven_jar(
  name = 'jgit-archive_library',
  id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS,
  sha1 = '8574d1080a71fdd8b0a07a9eb85e51beba39149c',
  repository = REPO,
  deps = [':jgit'],
  unsign = True,
  exclude = [
    'about.html',
    'plugin.properties',
  ],
)

maven_jar(
  name = 'junit',
  id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS,
  sha1 = 'c4d232911178abfff65ba4b75cecd3ef31ad4211',
  repository = REPO,
  unsign = True,
  deps = [':jgit'],
)

maven_jar(
  name = 'ewah',
  id = 'com.googlecode.javaewah:JavaEWAH:0.7.9',
  sha1 = 'eceaf316a8faf0e794296ebe158ae110c7d72a5a',
)

maven_jar(
  name = 'commons-compress',
  id = 'org.apache.commons:commons-compress:1.7',
  sha1 = 'ab365c96ee9bc88adcc6fa40d185c8e15a31410d',
  exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
  visibility = ['//lib/jgit:jgit-archive'],
)

maven_jar(
  name = 'tukaani-xz',
  id = 'org.tukaani:xz:1.4',
  sha1 = '18a9a2ce6abf32ea1b5fd31dae5210ad93f4e5e3',
  attach_source = False,
  visibility = ['//lib/jgit:jgit-archive'],
)
