Karaf custom distribution

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Karaf custom distribution

samliu
Hi all,

I am trying to develop my own custom distribution karaf, and I am kinda new to karaf. I read the custom distribution section on the manual, but found it is a little bit abstract. Besides, according to one previous post (http://karaf.922171.n3.nabble.com/Custom-distributions-td3515575.html), there seems to be some error in the example pom.xml file. So I was wondering if we can have an updated and maybe more detailed section on custom distribution of karaf?

Thank you!

Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf custom distribution

dealbitte
Hi,

The .pom for karaf custom distribution in the karaf documentation (http://karaf.apache.org/manual/2.2.9/developers-guide/custom-distribution.html) needs some update. I made few changes to the .pom file (see attachment)

Look for the comment
<!-- UPDATED : ..... -->
pom.xml
 in the attached .pom file for the changes I made. I am able to successfully build once i have the branding jar. Of course, I commented out maven-assembly-plugin and hence this pom is not complete either but i am trying to figure out the maven-assembly-plugin usage


regards.
- Rakesh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf custom distribution

dealbitte
You can uncomment the 'maven-assembly-plugin' from the .pom file (from the previous reply) and create an assembly descriptor (src/main/descriptors/bin.xml) with the following content (example only)

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
    <format>tar.bz2</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${project.basedir}</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>README*</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${project.build.directory}/site</directory>
      <outputDirectory>docs</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>

Create a dummy file called 'README' (see above <includes> element) and with the command 'mvn install' everything should be working fine.

regards
- Rakesh
Loading...