0% found this document useful (0 votes)
28 views

2.1 JavaCompilePackaging PDF

Maven is a build automation tool used primarily for Java projects. It handles tasks like compiling source code, packaging classes into JAR files, and providing dependencies. The document discusses how Java source code is compiled into class files, then various packaging formats like JAR, WAR, and EAR are used to distribute applications. It also covers deploying packaged applications on servers or as standalone Docker containers.

Uploaded by

Preethi Gopalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

2.1 JavaCompilePackaging PDF

Maven is a build automation tool used primarily for Java projects. It handles tasks like compiling source code, packaging classes into JAR files, and providing dependencies. The document discusses how Java source code is compiled into class files, then various packaging formats like JAR, WAR, and EAR are used to distribute applications. It also covers deploying packaged applications on servers or as standalone Docker containers.

Uploaded by

Preethi Gopalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Apache Maven

Beginner to Guru

Review of Java Compile and Packaging


Java Compile Process
Source Files Java Complier Class Files The JVM Runtime

MyJavaClass.java MyJavaClass.class

MyGroovyClass.groovy MyGroovyClass.class

MyScalaClass.scala MyScalaClass.class

MyKotlinClass.kt MyKotlinClass.class
Packaging Java Applications
Many Class Files Zip Compression *.jar, *.war, *.ear Unzip JVM

MyJavaClass.class

MyGroovyClass.class

MyScalaClass.class

MyKotlinClass.class
Java Packaging
• *.jar - Java ARchive - Zip file containing one or more Java class files.
• *.war - Web Application aRchive - Zip file containing web application. Includes one or more jar
files, Java class files, and web resources.
• *.ear - Enterprise aRchive - Zip file containing one more more WAR files.
• Fat JAR (aka Uber JAR) - Executable Jar containing all dependencies. (Used by Spring Boot)

• Docker Container - Docker Image containing runtime environment, JVM, and Java package
Java Deployment
• Simple JAR files are typically collection of class files used to compose applications
• Typically not a complete application
• WAR, EAR files are typically complete applications which are deployed to application servers

• Tomcat / Weboss, Websphere, etc


• Fat / Uber Jars are typically complete applications which contain embedded application servers
• Can be deployed stand alone
• Docker Images are complete applications which can be deployed stand alone
Apache Maven
Beginner to Guru

You might also like