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>
>          <artifactId>maven-dependency-plugin</artifactId>
>          <version>2.1-SNAPSHOT</version>
>          <executions>
>            <execution>
>              <id>expand common JSP fragments</id>
>              <goals>
>                <goal>unpack-dependencies</goal>
>              </goals>
>              <phase>generate-resources</phase>
>              <configuration>
>                <includeGroupIds>your.group.id</includeGroupIds>
>                <includeArtifactIds>yourArtifactId</includeArtifactIds>
>                <excludeTransitive>true</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]

Reply via email to