You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Achim Nierbeck <bc...@googlemail.com> on 2011/05/05 09:06:44 UTC

Re: Maven dependency plug-in and copy-dependencies

Hi,

well if those bundles you are seeking for are defined in an
features.xml (in your example that would be the "war" feature) file
I'd propose you use the
features-maven-plugin for copying those artefacts before you wrap your
distribution, this will copy those
artefacts in the target folder of you project. Now you can address
those artefacts by the maven-assembly-plugin and include it in your
own distribution.

you might also take a look in the manual here:

http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/custom-distribution.html

regards, Achim

2011/4/27 Raj Saini <ra...@gmail.com>:
> Hi,
>
> I under this not exactly Karaf question as it is related to Maven dependency
> plug-in.
>
> I am building a custom distribution and trying to copy few bundles in system
> directory using Maven repository layout. It looks Maven dependency plug-in
> does not honour outputDirectory, excludeTransitive and useRepositoryLayout
> directives as no matter what these settings are plug-in will always copy the
> files in ${project.build.directory}/dependency folder, will not use the
> Maven Repository layout and copy the transitive dependencies. Below is the
> relevant part of my POM.
>
>
> <execution>
> <id>copy-subsystems</id>
> <phase>package</phase>
> <goals>
> <goal>copy-dependencies</goal>
> </goals>
> <configuration>
> <artifactItems>
> <artifactItem>
> <groupId>org.ops4j.pax.web</groupId>
> <artifactId>pax-web-extender-war</artifactId>
> <excludeTransitive>true</excludeTransitive>
> <outputDirectory>${project.build.directory}/dependencies/apache-karaf-2.2.0/system</outputDirectory>
> <useRepositoryLayout>ture</useRepositoryLayout>
> <type>jar</type>
> </artifactItem>
> </artifactItems>
> </configuration>
> </execution>
>
> Does any one faces similar problem? Or is there any other alternative to
> copy the bundles in Maven repository format?
>
> Thanks,
>
> Raj
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead

Re: Maven dependency plug-in and copy-dependencies

Posted by Raj Saini <ra...@gmail.com>.
Thanks Achim. I figured that our and used exactly as you said.

Raj

On Thursday 05 May 2011 12:36 PM, Achim Nierbeck wrote:
> Hi,
>
> well if those bundles you are seeking for are defined in an
> features.xml (in your example that would be the "war" feature) file
> I'd propose you use the
> features-maven-plugin for copying those artefacts before you wrap your
> distribution, this will copy those
> artefacts in the target folder of you project. Now you can address
> those artefacts by the maven-assembly-plugin and include it in your
> own distribution.
>
> you might also take a look in the manual here:
>
> http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/custom-distribution.html
>
> regards, Achim
>
> 2011/4/27 Raj Saini<ra...@gmail.com>:
>> Hi,
>>
>> I under this not exactly Karaf question as it is related to Maven dependency
>> plug-in.
>>
>> I am building a custom distribution and trying to copy few bundles in system
>> directory using Maven repository layout. It looks Maven dependency plug-in
>> does not honour outputDirectory, excludeTransitive and useRepositoryLayout
>> directives as no matter what these settings are plug-in will always copy the
>> files in ${project.build.directory}/dependency folder, will not use the
>> Maven Repository layout and copy the transitive dependencies. Below is the
>> relevant part of my POM.
>>
>>
>> <execution>
>> <id>copy-subsystems</id>
>> <phase>package</phase>
>> <goals>
>> <goal>copy-dependencies</goal>
>> </goals>
>> <configuration>
>> <artifactItems>
>> <artifactItem>
>> <groupId>org.ops4j.pax.web</groupId>
>> <artifactId>pax-web-extender-war</artifactId>
>> <excludeTransitive>true</excludeTransitive>
>> <outputDirectory>${project.build.directory}/dependencies/apache-karaf-2.2.0/system</outputDirectory>
>> <useRepositoryLayout>ture</useRepositoryLayout>
>> <type>jar</type>
>> </artifactItem>
>> </artifactItems>
>> </configuration>
>> </execution>
>>
>> Does any one faces similar problem? Or is there any other alternative to
>> copy the bundles in Maven repository format?
>>
>> Thanks,
>>
>> Raj
>>
>
>