Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Apache Maven Cookbook
  • Toc
  • feedback
Apache Maven Cookbook

Apache Maven Cookbook

By : Raghuram Bharathan
4.2 (5)
close
Apache Maven Cookbook

Apache Maven Cookbook

4.2 (5)
By: Raghuram Bharathan

Overview of this book

If you are a Java developer or a manager who has experience with Apache Maven and want to extend your knowledge, then this is the ideal book for you. Apache Maven Cookbook is for those who want to learn how Apache Maven can be used for build automation. It is also meant for those familiar with Apache Maven, but want to understand the finer nuances of Maven and solve specific problems.
Table of Contents (13 chapters)
close
12
Index

Building an EAR project

Maven provides support to generate Java EE Enterprise Archive (EAR) files. These can be deployed in application servers such as JBoss, WebLogic, and WebSphere.

How to do it...

  1. Run the following command from the command prompt:
    mvn archetype:generate -DgroupId=com.packt.cookbook -DartifactId=simple-ear -DarchetypeArtifactId=wildfly-javaee7-webapp-ear-archetype -DarchetypeGroupId=org.wildfly.archetype -DinteractiveMode=false
    
  2. Observe the result:
    How to do it...
  3. Build the generated project:
    mvn clean package
    
  4. Observe the generated output:
    How to do it...
  5. Open the target folder:
    How to do it...

How it works...

We used the Maven Archetype plugin to bootstrap a simple EAR project. It generated a multi-module project, which has an EJB module, web module, and a EAR module along with the aggregate pom file. When you examine the pom file of the EAR module, you will notice that the packaging type is set to ear.

Once built, Maven builds all the modules. In the EAR module, it uses the packaging information to invoke the ear goal of the...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete