0
votes

We have two modules parent and child, If we add packaing type as 'pom' in child pom.xml file, when we add child module pom.xml in maven projects in intellij it will load dependent modules(parent) pom.xml files automatically but if we create jar file for child module it contains only parent module files,it is not adding child module files.but if we change with 'jar' we need to add manually parent and child modules pom.xml files in maven projects in intellij

Is it possible to add two packaging types in maven with that I can load dependent pom files automatically and in jar I will get child and parent module files

1
Your setup sounds wrong..please add you pom files here...khmarbaise

1 Answers

0
votes

No a maven project will only support one type, as each project is specific and tailor made to what it needs to be or do. Typically a pom type project will not be a child project.

The reason for this is that pom projects describe the layout, dependencies and plugins of a project, in other words they are descriptor projects that layout the specifics of what is below - the children. They are normally the parents or some support project linking dependencies.

Then the children will be jars, wars, and bundles according to their specification.

I can imagine IntelliJ is getting confused over this and I think it will be necessary to see a cut down version of your poms to answer your question further. I'm not sure I've had a child project that was a POM project either and that doesn't seem right to me.

Does that help you?