Standard ZIP file can be used for that (which JAR is with MANIFEST.MF file as the first file in ZIP).
The following layout have to be used - which is same as Maven repositor layout. The reasin is Karaf uses Aether to resolve bundles, which is the engine of newer versions of maven. (As I remember later than 3.3):
/repository - which is standard maven layout. So the bunldes have to be stored as groupId parts as directory / version / artifactId-version.jar.
In the repository you have to store the feature repository xml file too, to be able to resolve features. Have to store same as it is on local maven repository.
Examample of kar structure (its a fragment):
.
|____repository
| |____com
| | |____carrotsearch
| | | |____java-sizeof
| | | | |____0.0.4
| | | | | |____java-sizeof-0.0.4.jar
| | |____fasterxml
| | | |____classmate
| | | | |____1.2.0
| | | | | |____classmate-1.2.0.jar
| | | |____jackson
| | | | |____core
| | | | | |____jackson-annotations
| | | | | | |____2.6.6
| | | | | | | |____jackson-annotations-2.6.6.jar
| | | | | |____jackson-core
| | | | | | |____2.6.6
| | | | | | | |____jackson-core-2.6.6.jar
| | | | | |____jackson-databind
| | | | | | |____2.6.6
| | | | | | | |____jackson-databind-2.6.6.jar
| | | | |____dataformat
| | | | | |____jackson-dataformat-yaml
| | | | | | |____2.6.6
| | | | | | | |____jackson-dataformat-yaml-2.6.6.jar
| | | | |____jaxrs
| | | | | |____jackson-jaxrs-base
| | | | | | |____2.6.6
| | | | | | | |____jackson-jaxrs-base-2.6.6.jar
| | | | | |____jackson-jaxrs-json-provider
| | | | | | |____2.6.6
| | | | | | | |____jackson-jaxrs-json-provider-2.6.6.jar
| | | | |____module
| | | | | |____jackson-module-jaxb-annotations
| | | | | | |____2.6.6
| | | | | | | |____jackson-module-jaxb-annotations-2.6.6.jar
| | |____google
| | | |____guava
| | | | |____guava
| | | | | |____18.0
| | | | | | |____guava-18.0.jar
| | | | |____example
| | | | | |____car
| | | | | | |____car-bo
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-bo-1.1.0-SNAPSHOT.jar
| | | | | | |____car-dao
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-dao-1.1.0-SNAPSHOT.jar
| | | | | | |____car-dao-minimal
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-dao-minimal-1.1.0-SNAPSHOT.jar
| | | | | | |____car-dao-minimal-querydsl
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-dao-minimal-querydsl-1.1.0-SNAPSHOT.jar
| | | | | | |____car-dao-querydsl
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-dao-querydsl-1.1.0-SNAPSHOT.jar
| | | | | | |____car-doc
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-doc-1.1.0-SNAPSHOT.jar
| | | | | | |____car-dto
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-dto-1.1.0-SNAPSHOT.jar
| | | | | | |____car-features
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-features-1.1.0-SNAPSHOT-default.cfg
| | | | | | |____car-kar
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-kar-1.1.0-SNAPSHOT-features.xml
| | | | | | |____car-operation
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-operation-1.1.0-SNAPSHOT.jar
| | | | | | |____car-operation-regular
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-operation-regular-1.1.0-SNAPSHOT.jar
| | | | | | |____car-po
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-po-1.1.0-SNAPSHOT.jar
| | | | | | |____car-rest
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-rest-1.1.0-SNAPSHOT.jar
| | | | | | |____car-rest-regular
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-rest-regular-1.1.0-SNAPSHOT.jar
| | | | | | |____car-service
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-service-1.1.0-SNAPSHOT.jar
| | | | | | |____car-service-regular
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-service-regular-1.1.0-SNAPSHOT.jar
| | | | | | |____car-service-regular-minimal
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-service-regular-minimal-1.1.0-SNAPSHOT.jar
| | | | | | |____car-ui-model
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-ui-model-1.1.0-SNAPSHOT.jar
| | | | | | |____car-ui-resource
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-ui-resource-1.1.0-SNAPSHOT.jar
| | | | |____external
| | | | | |____external-apache-poi
| | | | | | |____3.13.1
| | | | | | | |____external-apache-poi-3.13.1.jar
| | | | |____integration
and my feature definition is:
| | | | | | |____car-kar
| | | | | | | |____1.1.0-SNAPSHOT
| | | | | | | | |____car-kar-1.1.0-SNAPSHOT-features.xml
Which is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="car-kar">
<feature name="blackbelt-car" description="Car application" version="1.1.0.SNAPSHOT">
<configfile finalname="/deploy/hu.blackbelt.judo-car.cfg">mvn:hu.blackbelt.judo.example.car/car-features/1.1.0-SNAPSHOT/cfg/default</configfile>
<configfile finalname="/sample-configurations/hu.blackbelt.judo-car.cfg" override="true">mvn:hu.blackbelt.judo.example.car/car-features/1.1.0-SNAPSHOT/cfg/default</configfile>
<feature prerequisite="false" dependency="false">blackbelt-judo-repo</feature>
<feature prerequisite="false" dependency="false">blackbelt-judo-common</feature>
<feature prerequisite="false" dependency="false">blackbelt-judo-business</feature>
<feature prerequisite="false" dependency="false">blackbelt-judo-rdbms</feature>
<feature prerequisite="false" dependency="false">blackbelt-judo-integration</feature>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-bo/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-po/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-dao/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-dao-querydsl/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-dao-minimal/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-dao-minimal-querydsl/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-doc/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-dto/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-operation/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-operation-regular/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-rest/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-rest-regular/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-service/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-service-regular/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-service-regular-minimal/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-ui-model/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt.judo.example.car/car-ui-resource/1.1.0-SNAPSHOT</bundle>
<bundle start-level="95">mvn:hu.blackbelt/judo-web/1.0-SNAPSHOT</bundle>
</feature>
<feature name="blackbelt-judo-repo" description="BlackBelt Judo: Repo" version="1.1.0.SNAPSHOT">
<feature prerequisite="false" dependency="false">wrap</feature>
<feature version="1.0.0" prerequisite="false" dependency="false">repo-spifly</feature>
<feature prerequisite="false" dependency="false">pax-cdi</feature>
<feature prerequisite="false" dependency="false">jndi</feature>
<feature prerequisite="false" dependency="false">transaction</feature>
<feature prerequisite="false" dependency="false">jasypt-encryption</feature>
<feature prerequisite="false" dependency="false">eventadmin</feature>
<feature prerequisite="false" dependency="false">scr</feature>
<feature prerequisite="false" dependency="false">http</feature>
<feature prerequisite="false" dependency="false">http-whiteboard</feature>
<feature prerequisite="false" dependency="false">repo-cxf-jaxrs</feature>
<feature prerequisite="false" dependency="false">repo-cxf-jaxws</feature>
<feature prerequisite="false" dependency="false">repo-cxf-rs-security-cors</feature>
<feature prerequisite="false" dependency="false">repo-cxf-rs-description-swagger2</feature>
<feature prerequisite="false" dependency="false">repo-javassist</feature>
<feature prerequisite="false" dependency="false">repo-jackson</feature>
<feature prerequisite="false" dependency="false">repo-functionaljava</feature>
<feature prerequisite="false" dependency="false">repo-commons-osgi</feature>
<feature prerequisite="false" dependency="false">repo-commons-mime</feature>
<feature prerequisite="false" dependency="false">repo-paranamer</feature>
<feature prerequisite="false" dependency="false">repo-querydsl</feature>
<feature prerequisite="false" dependency="false">repo-h2</feature>
<feature prerequisite="false" dependency="false">repo-hsqldb</feature>
<feature prerequisite="false" dependency="false">repo-postgresql</feature>
<feature prerequisite="false" dependency="false">repo-oracle</feature>
<feature prerequisite="false" dependency="false">repo-guava</feature>
<feature prerequisite="false" dependency="false">repo-joda-time</feature>
<feature prerequisite="false" dependency="false">repo-markup</feature>
<feature prerequisite="false" dependency="false">repo-reflections</feature>
<feature prerequisite="false" dependency="false">repo-javax-validation</feature>
<feature prerequisite="false" dependency="false">repo-hibernate-validator</feature>
<feature prerequisite="false" dependency="false">repo-concurrentlinkedhashmap-lru</feature>
<feature prerequisite="false" dependency="false">repo-java-sizeof</feature>
<feature prerequisite="false" dependency="false">repo-orika-core</feature>
<feature prerequisite="false" dependency="false">repo-management</feature>
<feature prerequisite="false" dependency="false">repo-paxjdbc</feature>
<feature prerequisite="false" dependency="false">repo-apache-poi</feature>
<feature prerequisite="false" dependency="false">repo-antlr4</feature>
<feature prerequisite="false" dependency="false">repo-sling-healthcheck</feature>
<feature prerequisite="false" dependency="false">repo-dom4j</feature>
<feature prerequisite="false" dependency="false">repo-pdfbox</feature>
<feature prerequisite="false" dependency="false">repo-freemarker</feature>
<feature prerequisite="false" dependency="false">shiro-web</feature>
<feature prerequisite="false" dependency="false">nimbus-jose-jwt</feature>
<feature prerequisite="false" dependency="false">groovy-all</feature>
<feature prerequisite="false" dependency="false">javax-el</feature>
<feature prerequisite="false" dependency="false">unboundid-ldapsdk</feature>
<feature prerequisite="false" dependency="false">javax.mail</feature>
<feature prerequisite="false" dependency="false">org.passay</feature>
</feature>
<feature name="repo-apache-poi" version="3.13.0">
<feature prerequisite="false" dependency="false">repo-bouncycastle</feature>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlbeans/2.6.0_2</bundle>
<bundle>mvn:hu.blackbelt.judo.external/external-apache-poi/3.13.1</bundle>
</feature>
<feature name="repo-bouncycastle" version="1.55.0">
<bundle>mvn:org.bouncycastle/bcprov-jdk15on/1.55</bundle>
<bundle>mvn:org.bouncycastle/bcmail-jdk15on/1.55</bundle>
<bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.55</bundle>
</feature>
<feature name="repo-javassist" version="3.19.0.GA">
<bundle>mvn:org.javassist/javassist/3.19.0-GA</bundle>
</feature>
<feature name="repo-spifly" version="1.0.0">
<bundle>mvn:org.ow2.asm/asm-all/4.2</bundle>
<bundle>mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.0</bundle>
</feature>
</features>
This feature file is an effective feature file which contains all feature repositories which are manifested in KAR file, which mean if there is more features on maven-karaf-plugin as feature dependency defined, all of them are aggregated here. The KAR feature bundle groupId and artifactId is the maven project of the assembly. (Which in you case can be any name)