Include resources from other module in .jar
Hi! Is it possible to directly include in a jar (lets call it A.jar) class/resource files from other module (lets call it B.jar). ? What I have is 5 jars/modules that need to have exactly the same property/xml files inside them, so I would like to keep the resources in a separate module, in one place, and just include them in 5 jars. Thanks for any help, Anne PS. Please don't be cryptic, I'm very new to maven ;) -- View this message in context: http://www.nabble.com/Include-resources-from-other-module-in-.jar-tp18152318p18152318.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include resources from other module in .jar
Hi, one option is to extract the B jar using the dependency plugin: build plugins plugin artifactIdmaven-dependency-plugin/artifactId version2.1-SNAPSHOT/version executions execution idexpand common JSP fragments/id goals goalunpack-dependencies/goal /goals phasegenerate-resources/phase configuration includeGroupIdsyour.group.id/includeGroupIds includeArtifactIdsyourArtifactId/includeArtifactIds excludeTransitivetrue/excludeTransitive includes**/*.xml/includes outputDirectory${project.build.directory}/generated-resources/outputDirectory /configuration /execution /executions /plugin adapt this a bit, add a dependency to the artifact your.group.id:yourArtifactId (where your shared resources are placed in src/main/resources) and off you go. HTH, Stefan Aiko85 wrote: Hi! Is it possible to directly include in a jar (lets call it A.jar) class/resource files from other module (lets call it B.jar). ? What I have is 5 jars/modules that need to have exactly the same property/xml files inside them, so I would like to keep the resources in a separate module, in one place, and just include them in 5 jars. Thanks for any help, Anne PS. Please don't be cryptic, I'm very new to maven ;) -- best regards, Stefan Seidel software developer VUB Printmedia GmbH Chopinstraße 4 D-04103 Leipzig Germany tel.+49 (341) 9 60 50 07 fax.+49 (341) 9 60 50 92 mail. [EMAIL PROTECTED] web.www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss Neudorf, Dr. Christian Preuss Neudorf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include resources from other module in .jar
Try the remote resources plugin http://maven.apache.org/plugins/maven-remote-resources-plugin/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include resources from other module in .jar
Thanks Stefan :-) So far I've added the build part to each of the including jar's poms and it works. Is it possible to configure it so the plugin configuration is in one place ? Didn't work out when i placed it in root pom. Anne VUB Stefan Seidel wrote: Hi, one option is to extract the B jar using the dependency plugin: build plugins plugin artifactIdmaven-dependency-plugin/artifactId version2.1-SNAPSHOT/version executions execution idexpand common JSP fragments/id goals goalunpack-dependencies/goal /goals phasegenerate-resources/phase configuration includeGroupIdsyour.group.id/includeGroupIds includeArtifactIdsyourArtifactId/includeArtifactIds excludeTransitivetrue/excludeTransitive includes**/*.xml/includes outputDirectory${project.build.directory}/generated-resources/outputDirectory /configuration /execution /executions /plugin adapt this a bit, add a dependency to the artifact your.group.id:yourArtifactId (where your shared resources are placed in src/main/resources) and off you go. HTH, Stefan Aiko85 wrote: Hi! Is it possible to directly include in a jar (lets call it A.jar) class/resource files from other module (lets call it B.jar). ? What I have is 5 jars/modules that need to have exactly the same property/xml files inside them, so I would like to keep the resources in a separate module, in one place, and just include them in 5 jars. Thanks for any help, Anne PS. Please don't be cryptic, I'm very new to maven ;) -- best regards, Stefan Seidel software developer VUB Printmedia GmbH Chopinstraße 4 D-04103 Leipzig Germany tel.+49 (341) 9 60 50 07 fax.+49 (341) 9 60 50 92 mail. [EMAIL PROTECTED] web.www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss Neudorf, Dr. Christian Preuss Neudorf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Include-resources-from-other-module-in-.jar-tp18152318p18154011.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include resources from other module in .jar
You're welcome. You need to declare the pom in which the plugin is defined (root pom) as parent in all the poms that should inherit the plugin execution. As I posted it it works like that for Maven 2.0.8. regards, Stefan Aiko85 wrote: Thanks Stefan :-) So far I've added the build part to each of the including jar's poms and it works. Is it possible to configure it so the plugin configuration is in one place ? Didn't work out when i placed it in root pom. Anne VUB Stefan Seidel wrote: Hi, one option is to extract the B jar using the dependency plugin: build plugins plugin artifactIdmaven-dependency-plugin/artifactId version2.1-SNAPSHOT/version executions execution idexpand common JSP fragments/id goals goalunpack-dependencies/goal /goals phasegenerate-resources/phase configuration includeGroupIdsyour.group.id/includeGroupIds includeArtifactIdsyourArtifactId/includeArtifactIds excludeTransitivetrue/excludeTransitive includes**/*.xml/includes outputDirectory${project.build.directory}/generated-resources/outputDirectory /configuration /execution /executions /plugin adapt this a bit, add a dependency to the artifact your.group.id:yourArtifactId (where your shared resources are placed in src/main/resources) and off you go. HTH, Stefan Aiko85 wrote: Hi! Is it possible to directly include in a jar (lets call it A.jar) class/resource files from other module (lets call it B.jar). ? What I have is 5 jars/modules that need to have exactly the same property/xml files inside them, so I would like to keep the resources in a separate module, in one place, and just include them in 5 jars. Thanks for any help, Anne PS. Please don't be cryptic, I'm very new to maven ;) -- best regards, Stefan Seidel software developer VUB Printmedia GmbH Chopinstraße 4 D-04103 Leipzig Germany tel.+49 (341) 9 60 50 07 fax.+49 (341) 9 60 50 92 mail. [EMAIL PROTECTED] web.www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss Neudorf, Dr. Christian Preuss Neudorf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- best regards, Stefan Seidel software developer VUB Printmedia GmbH Chopinstraße 4 D-04103 Leipzig Germany tel.+49 (341) 9 60 50 07 fax.+49 (341) 9 60 50 92 mail. [EMAIL PROTECTED] web.www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss Neudorf, Dr. Christian Preuss Neudorf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]