View a markdown version of this page

Building JARs on-server with a Buildfile - AWS Elastic Beanstalk

Building JARs on-server with a Buildfile

You can build your application's class files and JAR(s) on the EC2 instances in your environment by invoking a build command from a Buildfile file in your source bundle.

Commands in a Buildfile are only run once and must terminate upon completion, whereas commands in a Procfile are expected to run for the life of the application and will be restarted if they terminate. To run the JARs in your application, use a Procfile.

For details about the placement and syntax of a Buildfile, see Buildfile and Procfile.

The following Buildfile example runs Apache Maven to build a web application from source code. For a sample application that uses this feature, see Java web application samples.

Example Buildfile
build: mvn assembly:assembly -DdescriptorId=jar-with-dependencies

The Java SE platform includes the following build tools, which you can invoke from your build script:

  • javac – Java compiler

  • ant – Apache Ant

  • mvn – Apache Maven

  • gradle – Gradle

Warning Javascript is disabled or is unavailable in your browser.

To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.

AltStyle によって変換されたページ (->オリジナル) /