Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The parent project must have a packaging type of POM

I am trying to create a new maven module. Parent project is a Web Service and has pom.xml.

How can I fix this error and create a new module?

enter image description here

like image 450
chom Avatar asked Nov 16 '15 06:11

chom


2 Answers

Update your parent project's pom.xml by replacing packaging property from jar/war to pom as following...

<?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>project-group</groupId>
    <artifactId>webservice</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>project-name</name>
    <url>http://maven.apache.org</url>  
</project>
like image 121
Khan Avatar answered Sep 17 '22 02:09

Khan


Open POM.xml in eclipse Id->Overview->ArtifactId->Packaging(Select POM from dropdown)->Save then create new Maven module.

like image 25
Vinit Bhardwaj Avatar answered Sep 17 '22 02:09

Vinit Bhardwaj