You can specify the bnd.version header to change the policy.
Regards
JB
On 08/31/2015 09:48 AM, Giuseppe Gerla wrote:
Hi all
after several tenatives I found the problem. It seems that the new
implementation of feature resolver has some problem with version string
format.
If my feature has a version like 02.01.02, it doesn't work. If I use 2.1.2,
all works fine.
Could be introduced with version range management?
This is the desired behaviour or is it a bug?
Thanks
Giuseppe
2015-08-28 12:32 GMT+02:00 Giuseppe Gerla <[email protected]>:
Hi all
In the past I release my software with karaf 2.3.9. Because I'd like to
migrate to 4.0.1 version I update several library and plugin verions.
I see that there is a new version of karaf-maven-plugin in which "
features-add-to-repository
<https://karaf.apache.org/manual/latest/developers-guide/karaf-maven-plugin-features-add-to-repository.html>"
is deprecated.
So I try to use the kar feature (that is more easy to install). My
previous delivery are based on 2 bundles: mydelivery-deploy-features and
mydelivery-deploy-dist. The first one is to define the feature, the second
one to create the repository folder.
The new configuration is always based on 2 bundles: the first one is the
same, the second one is the kar project.
I have some problem with configfile directive. In my feature I have
following section
<configfile finalname="/etc/mycompany.myproject.cfg"
override="true">mvn:${project.groupId}/myproject-deploy-features/${myproject.version}/cfg/mycompany.myproject
</configfile>
<configfile finalname="/etc/org.apache.aries.jpa.myproject_db.cfg"
override="true">mvn:${project.groupId}/myproject-deploy-features/${myproject.version}/cfg/org.apache.aries.jpa.myproject_db
</configfile>
<configfile finalname="/etc/org.ops4j.pax.logging.cfg"
override="true">mvn:${project.groupId}/myproject-deploy-features/${myproject.version}/cfg/org.ops4j.pax.logging
</configfile>
<configfile finalname="/etc/custom.properties"
override="true">mvn:${project.groupId}/myproject-deploy-features/${myproject.version}/cfg/custom.properties
</configfile>
<configfile
finalname="/lib/myproject-branding-bundle-${myproject.version}.jar"
override="true">mvn:mycompany.myproject/myproject-branding-bundle/${myproject.version}
</configfile>
This is pom of kar project
<?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>
<parent>
<groupId>mycompany.myproject</groupId>
<artifactId>myproject-osgi-bundles</artifactId>
<version>02.01.02-SNAPSHOT</version>
</parent>
<artifactId>myproject-deploy-dist</artifactId>
<packaging>kar</packaging>
<name>Karaf Distribution Repository</name>
<dependencies>
<dependency>
<groupId>mycompany.myproject</groupId>
<artifactId>myproject-deploy-features</artifactId>
<version>${myproject.version}</version>
<type>xml</type>
<classifier>features</classifier>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${features.plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>features-create-kar</id>
<goals>
<goal>kar</goal>
</goals>
<configuration>
<featuresFile>mvn:mycompany.myproject/myproject-deploy-features/${myproject.version}/xml/features</featuresFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
With previous configuration all work fine. With new configuration,
configuration files are NOT copied in etc folder. What I'm wrong?
Thanks
Regards
Giuseppe
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com