Opened issue https://issues.apache.org/jira/browse/KARAF-4805 and provide a patch for it via pull request.
On Mon, Oct 10, 2016 at 1:36 PM, Thomas Termin <[email protected]> wrote: > Hello Jean-Baptiste, > > Cool thanks. I would have done it myself to fix that, but unfortunately I > can't build karaf without build failure. Or at least not the tooling. There > are import problems within org.apache.karaf.tooling. > utils.Dependency31Helper.java > > Regards > Thomas > > > Am 10.10.2016 um 11:09 schrieb Jean-Baptiste Onofré <[email protected]>: > > > > Thanks Thomas, > > > > I will take a look because I'm sure I added and tested that. It's maybe > a regression that has been introduced (you are using 4.0.7) > > > > Let me try to reproduce and investigate. > > > > I keep you posted. > > > > Thanks again, > > Regards > > JB > > > >> On 10/10/2016 11:04 AM, Thomas Termin wrote: > >> Hello, > >> > >> below is the pom file I use for my custom karaf example. As you can see > >> i put the cellar feature within the installedFeature. I do this that I > >> can install it offline without a maven repo. But at the end there is no > >> cfg file within the system directory. I saw already within the maven > >> plugin code that the configfile are ignored and not copied like the > bundles. > >> > >> Regards, > >> Thomas > >> > >> <?xml version="1.0" encoding="UTF-8"?> > >> <project xmlns="http://maven.apache.org/POM/4.0.0" > >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > >> http://maven.apache.org/xsd/maven-4.0.0.xsd"> > >> <modelVersion>4.0.0</modelVersion> > >> > >> <groupId>de.tt <http://de.tt></groupId> > >> <artifactId>CustomKaraf</artifactId> > >> <version>1.0.0-SNAPSHOT</version> > >> <packaging>karaf-assembly</packaging> > >> <name>${project.groupId}.${project.artifactId}</name> > >> > >> > >> <properties> > >> <karaf.version>4.0.7</karaf.version> > >> <karaf.cellar.version>4.0.2</karaf.cellar.version> > >> </properties> > >> > >> <repositories> > >> <!-- Apache ServiceMix repository (for region) --> > >> <repository> > >> <id>apache.servicemix.m2</id> > >> <name>Apache ServiceMix M2 repository</name> > >> <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url> > >> <releases> > >> <enabled>true</enabled> > >> </releases> > >> <snapshots> > >> <enabled>false</enabled> > >> </snapshots> > >> </repository> > >> <!-- Gemini Blueprint repository --> > >> <repository> > >> <id>zodiac-repository</id> > >> <name>Zodiac Release Repository</name> > >> <url>http://repository.springsource.com/maven/bundles/release > </url> > >> <releases> > >> <enabled>true</enabled> > >> </releases> > >> <snapshots> > >> <enabled>false</enabled> > >> </snapshots> > >> </repository> > >> <!-- Spring EBR repository --> > >> <repository> > >> <id>spring-ebr-repository</id> > >> <name>Spring EBR Repository</name> > >> <url>http://repository.springsource.com/maven/bundles/external > </url> > >> <releases> > >> <enabled>true</enabled> > >> </releases> > >> <snapshots> > >> <enabled>false</enabled> > >> </snapshots> > >> </repository> > >> <!-- OPS4J SNAPSHOT repository --> > >> <repository> > >> <id>ops4j.sonatype.snapshots.deploy</id> > >> <name>OPS4J snapshot repository</name> > >> > >> <url>https://oss.sonatype.org/content/repositories/ops4j-snapshots/ > </url> > >> <releases> > >> <enabled>false</enabled> > >> </releases> > >> <snapshots> > >> <enabled>true</enabled> > >> </snapshots> > >> </repository> > >> <!-- Apache SNAPSHOT --> > >> <repository> > >> <id>apache.snapshots.deploy</id> > >> <name>Apache snapshot repository</name> > >> > >> <url>https://repository.apache.org/content/groups/snapshots-group</url> > >> <releases> > >> <enabled>false</enabled> > >> </releases> > >> <snapshots> > >> <enabled>true</enabled> > >> </snapshots> > >> </repository> > >> </repositories> > >> > >> <dependencies> > >> <dependency> > >> <groupId>org.apache.karaf.features</groupId> > >> <artifactId>framework</artifactId> > >> <version>${karaf.version}</version> > >> <type>kar</type> > >> </dependency> > >> <dependency> > >> <groupId>org.apache.karaf.features</groupId> > >> <artifactId>framework</artifactId> > >> <version>${karaf.version}</version> > >> <classifier>features</classifier> > >> <type>xml</type> > >> <scope>runtime</scope> > >> </dependency> > >> <dependency> > >> <groupId>org.apache.karaf.features</groupId> > >> <artifactId>standard</artifactId> > >> <version>${karaf.version}</version> > >> <classifier>features</classifier> > >> <type>xml</type> > >> </dependency> > >> <dependency> > >> <groupId>org.apache.karaf.features</groupId> > >> <artifactId>spring</artifactId> > >> <version>${karaf.version}</version> > >> <classifier>features</classifier> > >> <type>xml</type> > >> <scope>runtime</scope> > >> </dependency> > >> <dependency> > >> <groupId>org.apache.karaf.features</groupId> > >> <artifactId>enterprise</artifactId> > >> <version>${karaf.version}</version> > >> <classifier>features</classifier> > >> <type>xml</type> > >> <scope>runtime</scope> > >> </dependency> > >> <dependency> > >> <groupId>org.apache.karaf.cellar</groupId> > >> <artifactId>apache-karaf-cellar</artifactId> > >> <version>${karaf.cellar.version}</version> > >> <classifier>features</classifier> > >> <type>xml</type> > >> <scope>runtime</scope> > >> </dependency> > >> </dependencies> > >> > >> <build> > >> <resources> > >> <resource> > >> <directory>src/main/resources</directory> > >> <filtering>false</filtering> > >> <includes> > >> <include>**/*</include> > >> </includes> > >> </resource> > >> <resource> > >> <directory>src/main/filtered-resources</directory> > >> <filtering>true</filtering> > >> <includes> > >> <include>**/*</include> > >> </includes> > >> </resource> > >> </resources> > >> <pluginManagement> > >> <plugins> > >> <plugin> > >> <groupId>org.apache.karaf.tooling</groupId> > >> <artifactId>karaf-maven-plugin</artifactId> > >> <version>${karaf.version}</version> > >> <extensions>true</extensions> > >> </plugin> > >> </plugins> > >> </pluginManagement> > >> <plugins> > >> <plugin> > >> <groupId>org.apache.maven.plugins</groupId> > >> <artifactId>maven-resources-plugin</artifactId> > >> <version>2.6</version> > >> <executions> > >> <execution> > >> <id>process-resources</id> > >> <goals> > >> <goal>resources</goal> > >> </goals> > >> </execution> > >> </executions> > >> </plugin> > >> <plugin> > >> <groupId>org.apache.karaf.tooling</groupId> > >> <artifactId>karaf-maven-plugin</artifactId> > >> <configuration> > >> <installedFeatures> > >> <feature>wrapper</feature> > >> <feature>cellar</feature> > >> </installedFeatures> > >> <startupFeatures> > >> <feature>eventadmin</feature> > >> </startupFeatures> > >> <bootFeatures> > >> <feature>framework</feature> > >> <feature>wrap</feature> > >> <feature>aries-blueprint</feature> > >> <feature>shell</feature> > >> <feature>shell-compat</feature> > >> <feature>feature</feature> > >> <feature>jaas</feature> > >> <feature>ssh</feature> > >> <feature>management</feature> > >> <feature>bundle</feature> > >> <feature>config</feature> > >> <feature>deployer</feature> > >> <feature>diagnostic</feature> > >> <feature>feature</feature> > >> <feature>instance</feature> > >> <feature>kar</feature> > >> <feature>log</feature> > >> <feature>package</feature> > >> <feature>service</feature> > >> <feature>system</feature> > >> </bootFeatures> > >> </configuration> > >> </plugin> > >> </plugins> > >> </build> > >> > >> </project> > >> > >> > >> On Mon, Oct 10, 2016 at 10:01 AM, Jean-Baptiste Onofré <[email protected] > >> <mailto:[email protected]>> wrote: > >> > >> Weird, I added the configfile copy in archive and kar goals while > ago. > >> > >> What goal are you using ? > >> > >> Let me try to reproduce. > >> > >> Regards > >> JB > >> > >> > >> On 10/10/2016 07:31 AM, Thomas Termin wrote: > >> > >> Hello, > >> > >> I have a feature which contain a configfile like: > >> > >> <configfile finalname='/etc/FinalFile.cfg' override="false"> > >> mvn:my.package/MyArtifact/1.0.0/cfg/file-cfg > >> </configfile> > >> > >> If I put the feature which contains the configfile within the > >> <installedFeatures> of my custom karaf pom file, all referenced > >> bundles > >> are installed within the system directory. But the configfile is > >> just > >> ignored. That leads of course to the problem, that the > >> installation of > >> the features failed if there is no maven repository available > >> which is > >> the case for my environment. I need the configfile also in the > >> system > >> directory. It is easy reproduceable with cellar. If you put > >> cellar in > >> the installFeatures section you cannot install it without an > online > >> maven repo because the config files are not within the system > >> dir. For > >> the startupFeatures and bootFeatures it will work. But I don't > >> want to > >> put my features within startup or boot. Btw. with the old > >> karaf2.x it > >> worked perferct. What is the trick now? Karaf version tried: > >> 4.0.6, 4.0.7 > >> > >> Regards, > >> Thomas > >> > >> > >> -- > >> Jean-Baptiste Onofré > >> [email protected] <mailto:[email protected]> > >> http://blog.nanthrax.net > >> Talend - http://www.talend.com > > > > -- > > Jean-Baptiste Onofré > > [email protected] > > http://blog.nanthrax.net > > Talend - http://www.talend.com >
