0

i can understand if we have <parent>, <module> tag, then it would be child pom. but not sure where to define the parent, child pom and how we can call in maven?

for e.g.,

My project current structure is

<dir>/src/resources/test.file <dir>/src/assembly/descriptor.xml <dir>/pom.xml

For now the pom file has antrun and assembly plugin where it will zip the files from resources dir as mentioned in descriptor.xml.

Now i am planning to add some documents in the dir and need to do seperate zip of config files.

<dir>/src/config/test.config

As assembly plugin is common for both the operations, planning to put that in parent pom and respective things in child pom.

But i am not sure in which folder i have to put the parent, child pom? how to call the parent, child pom etc...

Can someone plese help?

divakar.scm
  • 1,256
  • 5
  • 21
  • 32

2 Answers2

0

Now i am planning to add some documents in the dir and need to do seperate zip of config files.

I think you should use zips with classifiers instead of multimodule structure. Please read http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#classifier

Robert Scholte
  • 11,889
  • 2
  • 35
  • 44
0

The parent pom.xml it could be in other directory. You only need to install in your local repository, and your projects will look for it there. The best practice is including the subprojects (or modules) where you have your top level pom.xml file. What you are defining on the tag "module" is the path. The default path is: ${basedir}/name.subproject.

<module>name.subproject</module>