Put the files in /src/main/resources/resources/etc for having custom karat configuration bundled into your custom config.
Ryan On May 6, 2014 9:36 AM, "sreeraaman" <[email protected]> wrote: > Dear All, > > I wanted to build a custom karaf distribution. I followed the guide > ( > http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html > ) > and was successful in getting a tar.gz and a zip file in the target folder. > > The configuration I used was as follows: > > <dependency> > <groupId>org.apache.karaf.features</groupId> > <artifactId>framework</artifactId> > <version>3.0.1</version> > <type>kar</type> > </dependency> > <dependency> > <groupId>org.apache.karaf.features</groupId> > <artifactId>standard</artifactId> > <classifier>features</classifier> > <version>3.0.1</version> > <type>xml</type> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>org.example</groupId> > <artifactId>myfeatures</artifactId> > <classifier>features</classifier> > <version>1.0.0-SNAPSHOT</version> > <type>xml</type> > <scope>runtime</scope> > </dependency> > > ... > > <build> > <finalName>custom-dist</finalName> > <plugins> > <plugin> > <groupId>org.apache.karaf.tooling</groupId> > <artifactId>karaf-maven-plugin</artifactId> > <version>3.0.1</version> > <extensions>true</extensions> > <configuration> > > <bootFeatures> > <feature>standard</feature> > <feature>management</feature> > <feature>scr</feature> > <feature>wrapper</feature> > <feature>myfeatures</feature> > </bootFeatures> > > </configuration> > </plugin> > </plugins> > </build> > > ... > > To get the distribution (tar,zip), I ran the following goals: > > mvn karaf:install-kars karaf:instance-create-archive > > However, I am stuck when I have to configure bouncy castle as the security > provider. Documentation says that to configure bouncycastle as the security > provider, I need to place the bouncycastle provider jar in the lib/ext > folder of karaf. Also, add the following to the config.properties under the > etc folder: > > org.osgi.framework.bootdelegation=...,org.bouncycastle.* > org.apache.karaf.security.providers = > org.bouncycastle.jce.provider.BouncyCastleProvider > > To customize logging, I need to add the following to the > org.ops4j.pax.logging.cfg: > > log4j.logger.org.example=DEBUG, test > log4j.additivity.org.example=false > > # test file appender > log4j.appender.test=org.apache.log4j.RollingFileAppender > log4j.appender.test.threshold=DEBUG > log4j.appender.test.layout=org.apache.log4j.PatternLayout > log4j.appender.test.layout.ConversionPattern=%d{ISO8601} | %-5.5p | > %X{bundle.name} | %m%n > log4j.appender.test.file=${karaf.data}/log/test.log > log4j.appender.test.append=true > log4j.appender.test.maxFileSize=1MB > log4j.appender.test.maxBackupIndex=10 > > I have such customized files. However, I do I tell the karaf-maven-plugin > to > include these customized files while creating the custom assembly? > > The karaf documentation showed a deprecated method (using the > maven-assembly-plugin). However, I am curious to know if there is a > graceful > way of achieving the same via a configuration option in the > karaf-maven-plugin to include customizations? > > best regards > Sriraman. > > > > > > > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Karaf-Custom-Distribution-with-customizations-to-etc-xxx-cfg-files-tp4033048.html > Sent from the Karaf - User mailing list archive at Nabble.com. >
