GithubHelp home page GithubHelp logo

heroku-buildpack-ant's Introduction

Heroku buildpack: Java (with Apache Ant)

This is a Heroku buildpack for Java apps. It uses Apache Ant 1.9.3 to build your application and OpenJDK 1.6.0_27 (currently) to run it.

Usage

Example usage:

$ ls
Procfile	build.xml	libs		src

$ heroku create --stack cedar --buildpack http://github.com/dennisg/heroku-buildpack-ant.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Java (using Apache Ant 1.9.3) app detected
-----> Installing Apache Ant 1.9.3.....done!
-----> executing /tmp/build_1i100c5e7xm9u/.buildpack/apache-ant-1.8.4/bin/ant -Duser.home=/tmp/build_1i100c5e7xm9u clean install
   Buildfile: /tmp/build_1i100c5e7xm9u/build.xml
   
   clean:
        [echo] cleaning...
   
   init:
       [mkdir] Created dir: /tmp/build_1i100c5e7xm9u/target/classes
   
   compile:
       [javac] Compiling 1 source file to /tmp/build_1i100c5e7xm9u/target/classes
   
   jar:
         [jar] Building jar: /tmp/build_1i100c5e7xm9u/target/application.jar
   
   install:
        [echo] installing...
   
   BUILD SUCCESSFUL
   Total time: 0 seconds
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 5.6MB
-----> Launching... done, v5
http://<your-app-name>.herokuapp.com deployed to Heroku

The buildpack will detect your app as Java (using Apache Ant) if it has the file 'build.xml' in the root. It will use Apache Ant to execute the targets 'clean install' defined by your build.xml.

The Ant executable is unpacked inside your slug directory in '.buildpack' and is therefore also available for running the actual Java application too (I added its bin folder to the PATH).

Example Procfile:

web: ant run

Config Update

If you have been using this buildpack before, the upgrade from 1.9.x to 1.9.3 now requires a heroku config update.

Please issue:

heroku config:set ANT_HOME=/app/.buildpack/apache-ant-1.9.3
heroku config:set PATH=/usr/local/bin:/usr/bin:/bin:/app/.buildpack/apache-ant-1.9.3/bin

to make it work again...

Hacking

To use a modification of this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.