# Build a Jar and deploy it with gradle and travis ci

**URL:** https://travis-ci.community/t/build-a-jar-and-deploy-it-with-gradle-and-travis-ci/5958
**Category:** Travis CI Discussions & Feedback
**Tags:** github-integration
**Created:** [November 15, 2019, 7:25am UTC](https://travis-ci.community/t/build-a-jar-and-deploy-it-with-gradle-and-travis-ci/5958 "2019-11-15T07:25:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GABRYCA](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/gabryca/32/3143_2.png) [@GABRYCA](https://travis-ci.community/u/GABRYCA)
#### Post date: [November 15, 2019, 7:25am UTC](https://travis-ci.community/t/build-a-jar-and-deploy-it-with-gradle-and-travis-ci/5958/1 "2019-11-15T07:25:32Z")

</div>

Hi guys,  
Sorry if i this is the wrong category, i’m a newbie.

Anyway, i’m trying to deploy a jar file, but he always give me a zip instead of a jar [https://github.com/GABRYCA/Prison\_Ranks/releases](https://github.com/GABRYCA/Prison_Ranks/releases)

This is the travis.yml

language: java  
install: true

os: linux  
dist: trusty  
jdk: oraclejdk8

before\_cache:

- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/\*/plugin-resolution/  
cache:  
directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/

script:

- git clone [https://github.com/GABRYCA/Prison\_Ranks.git](https://github.com/GABRYCA/Prison_Ranks.git)
- cd Prison\_Ranks
- gradle assemble
- gradle check

deploy:  
provider: releases  
api\_key: $GITHUB\_OAUTH\_TOKEN  
file: “PrisonRanks.jar”  
skip\_cleanup: true

Another thing, i can’t use my gradle.build because when i put it in my deploy script or in the script section it says ‘error 127’
