karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giuseppe Gerla <giuseppe.ge...@gmail.com>
Subject Re: Problem with new karaf maven plugin functionality
Date Mon, 31 Aug 2015 09:03:02 GMT
ok. Thanks.
I will change my versioning format.

However it's strange that all file are installed except that are tagged
with configfile. I think that an error message should be logged if version
is not accepted by resolver. Wdyt?



Regards
Giuseppe


2015-08-31 9:56 GMT+02:00 Achim Nierbeck <bcanhome@googlemail.com>:

> Hi,
>
> as the new feature resolver uses the default OSGi-resolver, I'd say this is
> expected.
> As such a version isn't a valid version for bundles either.
>
> regards, Achim
>
>
> 2015-08-31 9:48 GMT+02:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:
>
> > 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 <giuseppe.gerla@gmail.com>:
> >
> > > 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
> > >
> >
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message