Skip to content
Advertisement

Invalid packaging for parent pom.xml, must be “pom” but is “ear”

Could anybody suggest me an solution with the following exception. I am going to create a multi-module project.

Parent Project name is LOGICBACKEND child project name is DBAccess

I need to have ear file of LOGICBACKEND which should contain DBAccess prjoects jar file.

I am getting following exception when i run mav clean install -P Developer.

JavaScript

This is how part of my parent pom.xml looks

JavaScript

This is how child pom.xml looks

JavaScript

Could anybody help me here to understand what is going wrong here.

Thanks in advance for any help

Advertisement

Answer

This simple setup is a good start.

.
├── pom.xml
├── services
|   ├── pom.xml
|   └── src
|       └── main
|           └── java
|               └── com
|                   └── stackoverflow
|                       └── MyEjbService.java
└── application
    └── pom.xml

pom.xml

JavaScript

services/pom.xml

JavaScript

application/pom.xml

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement