17

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

2
  • 4
    I can't see the image so this is based solely on the error message in your title. Make sure the parent POM has <packaging>pom</packaging>. By default, it's JAR.
    – Tunaki
    Nov 16, 2015 at 8:23
  • take a look at stackoverflow.com/questions/2193789/…
    – Aliti
    Mar 31, 2016 at 13:38

2 Answers 2

30

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>
6

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.