Java EE 8 Development with Eclipse - Third Edition by Ram Kulkarni
Author:Ram Kulkarni [Ram Kulkarni]
Language: eng
Format: epub
Tags: COM051280 - COMPUTERS / Programming Languages / Java, COM051230 - COMPUTERS / Software Development and Engineering / General, COM051000 - COMPUTERS / Programming / General
Publisher: Packt
Published: 2018-06-26T13:35:54+00:00
Artifact ID
CourseManagementMavenEAR
Version
1
Packaging
ear
You will have to type ear in the Packaging file; there is no ear option in the drop-down list. Add dependencies of web, ejb, and client projects to pom.xml, as follows:
<dependencies> <dependency> <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenEJBClient</artifactId> <version>1</version> <type>jar</type> </dependency> <dependency> <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenEJBs</artifactId> <version>1</version> <type>ejb</type> </dependency> <dependency> <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenWebApp</artifactId> <version>1</version> <type>war</type> </dependency> </dependencies>
Make sure to set <type> of each dependency properly. You also need to update JNDI URLs for any name changes.
Maven does not have built-in support to package EAR. However, there is a Maven plugin for EAR. You can find details of this plugin at https://maven.apache.org/plugins/maven-ear-plugin/ and https://maven.apache.org/plugins/maven-ear-plugin/modules.html. We need to add this plugin to our pom.xml and configure its parameters. Our EAR file will contain the JAR for the EJB project, the client project, and the WAR for the web project. Right-click on pom.xml of the EAR project, and select Maven | Add Plugin. Type ear in the Filter box, and select the latest plugin version under maven-ear-plugin. Make sure that you also install the maven-acr-plugin plugin. Configure the EAR plugin in the pom.xml details, as follows:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-acr-plugin</artifactId> <version>1.0</version> <extensions>true</extensions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>2.10</version> <configuration> <version>6</version> <defaultLibBundleDir>lib</defaultLibBundleDir> <modules> <webModule> <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenWebApp</artifactId> </webModule> <ejbModule> <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenEJBs</artifactId> </ejbModule> < jarModule > <groupId>packt.book.jee.eclipse.ch7.maven</groupId> <artifactId>CourseManagementMavenEJBClient</artifactId> </ jarModule > </modules> </configuration> </plugin> </plugins> </build>
After modifying pom.xml, sometimes Eclipse may display the following error:
Project configuration is not up-to-date with pom.xml. Run Maven->Update Project or use Quick Fix...
In such cases, right-click on the project and select Maven | Update Project.
The last project that we create in this section is CourseManagement, which will be the container project for all other EJB projects. When this project is installed, it should build and install all the contained projects. Create a Maven project with the following details:
Fields
Values
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12566)
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9336)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7034)
Microservices with Go by Alexander Shuiskov(6799)
Practical Design Patterns for Java Developers by Miroslav Wengner(6712)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6652)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Angular Projects - Third Edition by Aristeidis Bampakos(6060)
The Art of Crafting User Stories by The Art of Crafting User Stories(5591)
NetSuite for Consultants - Second Edition by Peter Ries(5526)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5330)
Kotlin in Action by Dmitry Jemerov(5062)
