You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2018/08/03 07:52:00 UTC
[jira] [Commented] (KARAF-5810) No config file installed in custom
distribution.
[ https://issues.apache.org/jira/browse/KARAF-5810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16567911#comment-16567911 ]
Jean-Baptiste Onofré commented on KARAF-5810:
---------------------------------------------
Sorry, but I don't see any problem with the current behavior.
Let me explain.
First, I did a first test with the following {{pom.xml}}:
{code}
<?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>net.nanthrax.test</groupId>
<artifactId>karaf-5810</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>karaf-assembly</packaging>
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>4.2.1-SNAPSHOT</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>4.2.1-SNAPSHOT</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.decanter</groupId>
<artifactId>apache-karaf-decanter</artifactId>
<version>2.0.0</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>4.2.1-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<bootFeatures>
<feature>instance</feature>
<feature>package</feature>
<feature>log</feature>
<feature>ssh</feature>
<feature>aries-blueprint</feature>
<feature>framework</feature>
<feature>system</feature>
<feature>eventadmin</feature>
<feature>feature</feature>
<feature>shell</feature>
<feature>management</feature>
<feature>service</feature>
<feature>jaas</feature>
<feature>shell-compat</feature>
<feature>deployer</feature>
<feature>diagnostic</feature>
<feature>wrap</feature>
<feature>bundle</feature>
<feature>config</feature>
<feature>kar</feature>
</bootFeatures>
<installedFeatures>
<feature>wrapper</feature>
</installedFeatures>
<startedFeatures>
<feature>decanter-collector-log</feature>
</startedFeatures>
</configuration>
</plugin>
</plugins>
</build>
</project>
{code}
You can see here http://repo.maven.apache.org/maven2/org/apache/karaf/decanter/apache-karaf-decanter/2.0.0/apache-karaf-decanter-2.0.0-features.xml that the {{decanter-collector-log}} feature contains a {{<configfile/>}}:
{code}
<configfile finalname="/etc/org.apache.karaf.decanter.collector.log.cfg">
mvn:org.apache.karaf.decanter.collector/org.apache.karaf.decanter.collector.log/2.0.0/cfg
</configfile>
{code}
In the custom distribution {{karaf-5810-1.0-SNAPSHOT.tar.gz}} created by my {{pom.xml}}, the {{cfg}} file corresponding to {{<configfile/>}} element is present in the {{system}} directory:
{code}
target/karaf-5810-1.0-SNAPSHOT/system/org/apache/karaf/decanter/collector/org.apache.karaf.decanter.collector.log/2.0.0$ ls -l
total 20
-rw-r--r-- 1 jbonofre jbonofre 225 août 3 09:26 org.apache.karaf.decanter.collector.log-2.0.0.cfg
-rw-r--r-- 1 jbonofre jbonofre 13352 août 3 09:26 org.apache.karaf.decanter.collector.log-2.0.0.jar
{code}
So, installing the {{decanter-collector-log}} feature also install the {{cfg}} file from the {{system}} folder. That's the expected behavior:
{code}
karaf@root()> feature:install decanter-collector-log
{code}
and you will find the {{cfg}} file in the {{etc}} folder.
> No config file installed in custom distribution.
> ------------------------------------------------
>
> Key: KARAF-5810
> URL: https://issues.apache.org/jira/browse/KARAF-5810
> Project: Karaf
> Issue Type: Bug
> Components: karaf-tooling
> Affects Versions: 4.1.5, 4.2.0.M2
> Reporter: svs
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Labels: maven
>
> Configuration files (<configfile finalname=mvn ..../>) specified in the feature file are not installed when a custom distribution is created.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)