I think the answer is to: 1) create a new module for the resources. move the src/main/resources/resource.xml into the new module.
2) declare a dependency in each of A and B on the new resources module. 3) use assembly plugin in A and B to create a jar with dependencies. see http://maven.apache.org/plugins/maven-assembly-plugin/ Regards, John uma_rk wrote: > > > > I have a resource file that is shared by multiple projects. > That is, the resource file resource.xml needs to be packaged in > multiple jar files (A.jar, B.jar) as shown below. > > How can I make sure that sub-projects A and B both package the > resource.xml in their jarfiles? > > Also, is this the right way to structure it? I placed resource.xml in > parent only because its shared by the children of 'parent'. > > (parent-project > (src/main/resources > resource.xml > ) > ;; modules > (A > (src/main/...) > ) > (B > (src/main/...) > ) > ) > > Thanks, > > /U > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Packging-the-same-resource-file-in-multple-projects-tf3310468s177.html#a9226420 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
