Chapter 6. Maven Assemblies
Maven provides an extensible architecture via plugins and lifecycles. Archive types such as .jar
, .war
, .ear
, and many more are supported by plugins and associated lifecycles. The JAR plugin creates an artifact with the .jar
extension and the relevant metadata, according to the JAR specification. The JAR file is, in fact, a ZIP file with the optional META-INF
directory. You can find more details about the JAR specification from http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html.
The JAR file aggregates a set of class files to build a single distribution unit. The WAR file aggregates a set of JAR files, Java classes, JSPs, images, and many more resources into a single distribution unit that can be deployed in a Java EE application server. However, when you build a product, you may need to aggregate many JAR files from different places, WAR files, README files, LICENSE files, and many more into a single ZIP file. To build such an archive...