Re: Kar features.xml file is not filtered

2012-10-23 Thread Giacomo Coletta
OK, now it works !

Many thanks

Giacomo

2012/10/22 Christoph Gritschenberger 

> Hi,
>
> Just remembered, we specifically attach the execution of the
> resource-plugin to the "generate-resources"-phase like this:
>
>   
> org.apache.maven.plugins
> maven-resources-plugin
> 
>   
> filter
> generate-resources
> 
>   resources
> 
>   
> 
>   
>
> That way the filtered features.xml is created way earlier in the
> build-process and available when the assembly is created.
>
> kind regards,
> christoph
>
> On 22/10/12 15:33, Giacomo Coletta wrote:
> > The build fails because of  the error and there is no target directory at
> > all.
> >
> > 2012/10/22 Christoph Gritschenberger <
> christoph.gritschenber...@gmail.com>
> >
> >> And is the file actually not there?
> >> Is it nowhere in the target-directory?
> >>
> >> kind regards,
> >> christoph
> >>
> >> On 22/10/12 14:51, Giacomo Coletta wrote:
> >>> hi,
> >>>
> >>> this does not work for me.
> >>>
> >>> The message i get is:
> >>>
> >>> [ERROR] Failed to execute goal
> >>> org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
> >>> (create-kar) on project kar.rttr: Could not interpret features XML
> file:
> >>>
> >>
> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
> >>> (Impossible to find the specified path) :
> >>>
> >>
> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
> >>> -> [Help 1]
> >>>
> >>> 2012/10/19 Michael Täschner 
> >>>
>  Hi,
> 
>  pick up the filtered file from the target folder. Here's my example
> >> config:
> 
> 
>    
>  org.apache.karaf.tooling
>  features-maven-plugin
>  true
> 
>  
>    
>  create-kar
>  process-resources
> 
>  
>    create-kar
>  
>  
> 
>  ${project.build.directory}/doesNotExist
>    false
> 
> 
> >>
> ${project.build.outputDirectory}/feature.xml
>  
>    
>  
>    
> 
>  Regards,
>  Michael
> 
>  P.S.: I do not actually remember why I added the /doesNotExist folder
>  though but feature.xml is located in src/main/resourses
> 
> 
>  2012/10/19 Giacomo Coletta 
> 
> > This was more or less what I already tried, but alone does not work.
> >
> > it seem that the resources:resources goal is not executed during
> > packaging with  pom (while it is with jars).
> >
> > i tried a bit more and in the end find something working (even if
> >> doesn't
> > look so clean):
> >
> >  
> > 
> > 
> >
> > ${project.basedir}/src/main/feature/
> > true
> > 
> > **/*
> > 
> >
> > ${project.basedir}/src/main/filteredFeature/
> > 
> > 
> > 
> > 
> > org.apache.maven.plugins
> > maven-resources-plugin
> > ${maven-resources-plugin.version}
> > 
> > 
> > filter
> > generate-resources
> > 
> > resources
> > 
> > 
> > 
> > 
> > 
> > org.apache.karaf.tooling
> > features-maven-plugin
> > 2.2.9
> > 
> > 
> > create-kar
> > 
> > create-kar
> > 
> > 
> >
> >
> >
> >>
> ${project.basedir}/src/main/filteredFeature/feature.xml
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > Thanks anyway.
> >
> > Giacomo
> >
> > 2012/10/19 Christoph Gritschenberger <
> >> christoph.gritschenber...@gmail.com
> >>
> >
> >> You need to enable resource-filtering in your maven-build. You can
> set
> >> this up in your pom.xml like this:
> >>
> >> ...
> >>   
> >> 
> >>   
> >>
> >>
> ${project.basedir}/src/main/filtered-resources
> >> true
> >> 
> >>   **/*
> >> 
> >>   
> >> 
> >> ...
> >>   
> >> ...
> >>
> >> kind regards,
> >> christoph
> >>
> >> On 19/10/12 11:16, Giacomo Coletta wrote:
> >>> Hi,

Re: Kar features.xml file is not filtered

2012-10-22 Thread Christoph Gritschenberger
Hi,

Just remembered, we specifically attach the execution of the
resource-plugin to the "generate-resources"-phase like this:

  
org.apache.maven.plugins
maven-resources-plugin

  
filter
generate-resources

  resources

  

  

That way the filtered features.xml is created way earlier in the
build-process and available when the assembly is created.

kind regards,
christoph

On 22/10/12 15:33, Giacomo Coletta wrote:
> The build fails because of  the error and there is no target directory at
> all.
> 
> 2012/10/22 Christoph Gritschenberger 
> 
>> And is the file actually not there?
>> Is it nowhere in the target-directory?
>>
>> kind regards,
>> christoph
>>
>> On 22/10/12 14:51, Giacomo Coletta wrote:
>>> hi,
>>>
>>> this does not work for me.
>>>
>>> The message i get is:
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
>>> (create-kar) on project kar.rttr: Could not interpret features XML file:
>>>
>> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
>>> (Impossible to find the specified path) :
>>>
>> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
>>> -> [Help 1]
>>>
>>> 2012/10/19 Michael Täschner 
>>>
 Hi,

 pick up the filtered file from the target folder. Here's my example
>> config:


   
 org.apache.karaf.tooling
 features-maven-plugin
 true

 
   
 create-kar
 process-resources

 
   create-kar
 
 

 ${project.build.directory}/doesNotExist
   false


>> ${project.build.outputDirectory}/feature.xml
 
   
 
   

 Regards,
 Michael

 P.S.: I do not actually remember why I added the /doesNotExist folder
 though but feature.xml is located in src/main/resourses


 2012/10/19 Giacomo Coletta 

> This was more or less what I already tried, but alone does not work.
>
> it seem that the resources:resources goal is not executed during
> packaging with  pom (while it is with jars).
>
> i tried a bit more and in the end find something working (even if
>> doesn't
> look so clean):
>
>  
> 
> 
>
> ${project.basedir}/src/main/feature/
> true
> 
> **/*
> 
>
> ${project.basedir}/src/main/filteredFeature/
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-resources-plugin
> ${maven-resources-plugin.version}
> 
> 
> filter
> generate-resources
> 
> resources
> 
> 
> 
> 
> 
> org.apache.karaf.tooling
> features-maven-plugin
> 2.2.9
> 
> 
> create-kar
> 
> create-kar
> 
> 
>
>
>
>> ${project.basedir}/src/main/filteredFeature/feature.xml
> 
>
> 
> 
> 
> 
> 
>
> Thanks anyway.
>
> Giacomo
>
> 2012/10/19 Christoph Gritschenberger <
>> christoph.gritschenber...@gmail.com
>>
>
>> You need to enable resource-filtering in your maven-build. You can set
>> this up in your pom.xml like this:
>>
>> ...
>>   
>> 
>>   
>>
>> ${project.basedir}/src/main/filtered-resources
>> true
>> 
>>   **/*
>> 
>>   
>> 
>> ...
>>   
>> ...
>>
>> kind regards,
>> christoph
>>
>> On 19/10/12 11:16, Giacomo Coletta wrote:
>>> Hi,
>>>
>>> i started using the KARs archives, and creates a few KARS using the
>> KAR
>>> archetype.
>>>
>>> one problem I encountered is that the features.xml file included in
>> the kar
>>> in the generated maven project doesn't seem to be maven filtered by
>> default.
>>> I would like it to be filtered for managing the included karaf
>> features and
>>> bundles versions using maven properties like in the following
>> example:
>>>
>>> > version="${

Re: Kar features.xml file is not filtered

2012-10-22 Thread Giacomo Coletta
The build fails because of  the error and there is no target directory at
all.

2012/10/22 Christoph Gritschenberger 

> And is the file actually not there?
> Is it nowhere in the target-directory?
>
> kind regards,
> christoph
>
> On 22/10/12 14:51, Giacomo Coletta wrote:
> > hi,
> >
> > this does not work for me.
> >
> > The message i get is:
> >
> > [ERROR] Failed to execute goal
> > org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
> > (create-kar) on project kar.rttr: Could not interpret features XML file:
> >
> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
> > (Impossible to find the specified path) :
> >
> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
> > -> [Help 1]
> >
> > 2012/10/19 Michael Täschner 
> >
> >> Hi,
> >>
> >> pick up the filtered file from the target folder. Here's my example
> config:
> >>
> >>
> >>   
> >> org.apache.karaf.tooling
> >> features-maven-plugin
> >> true
> >>
> >> 
> >>   
> >> create-kar
> >> process-resources
> >>
> >> 
> >>   create-kar
> >> 
> >> 
> >>
> >> ${project.build.directory}/doesNotExist
> >>   false
> >>
> >>
> ${project.build.outputDirectory}/feature.xml
> >> 
> >>   
> >> 
> >>   
> >>
> >> Regards,
> >> Michael
> >>
> >> P.S.: I do not actually remember why I added the /doesNotExist folder
> >> though but feature.xml is located in src/main/resourses
> >>
> >>
> >> 2012/10/19 Giacomo Coletta 
> >>
> >>> This was more or less what I already tried, but alone does not work.
> >>>
> >>> it seem that the resources:resources goal is not executed during
> >>> packaging with  pom (while it is with jars).
> >>>
> >>> i tried a bit more and in the end find something working (even if
> doesn't
> >>> look so clean):
> >>>
> >>>  
> >>> 
> >>> 
> >>>
> >>> ${project.basedir}/src/main/feature/
> >>> true
> >>> 
> >>> **/*
> >>> 
> >>>
> >>> ${project.basedir}/src/main/filteredFeature/
> >>> 
> >>> 
> >>> 
> >>> 
> >>> org.apache.maven.plugins
> >>> maven-resources-plugin
> >>> ${maven-resources-plugin.version}
> >>> 
> >>> 
> >>> filter
> >>> generate-resources
> >>> 
> >>> resources
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> org.apache.karaf.tooling
> >>> features-maven-plugin
> >>> 2.2.9
> >>> 
> >>> 
> >>> create-kar
> >>> 
> >>> create-kar
> >>> 
> >>> 
> >>>
> >>>
> >>>
> ${project.basedir}/src/main/filteredFeature/feature.xml
> >>> 
> >>>
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> Thanks anyway.
> >>>
> >>> Giacomo
> >>>
> >>> 2012/10/19 Christoph Gritschenberger <
> christoph.gritschenber...@gmail.com
> 
> >>>
>  You need to enable resource-filtering in your maven-build. You can set
>  this up in your pom.xml like this:
> 
>  ...
>    
>  
>    
> 
>  ${project.basedir}/src/main/filtered-resources
>  true
>  
>    **/*
>  
>    
>  
>  ...
>    
>  ...
> 
>  kind regards,
>  christoph
> 
>  On 19/10/12 11:16, Giacomo Coletta wrote:
> > Hi,
> >
> > i started using the KARs archives, and creates a few KARS using the
> KAR
> > archetype.
> >
> > one problem I encountered is that the features.xml file included in
>  the kar
> > in the generated maven project doesn't seem to be maven filtered by
>  default.
> > I would like it to be filtered for managing the included karaf
>  features and
> > bundles versions using maven properties like in the following
> example:
> >
> >  version="${myfeatures-repo.version}">
> > 
> >   
> > mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
> >
> > 
> > 
> >
> > i was able to do this while including the features in an assembly
>  using the
> > add-features-to-repo goal of the features-maven-plugin (features.xml
>  was
> > filtered by default)
> >
> > I tried to do the same with kars, but I was not able to get to this
>  result
> > quickly.
> > May be this is related to the fact that in the features-maven-plugin

Re: Kar features.xml file is not filtered

2012-10-22 Thread Christoph Gritschenberger
And is the file actually not there?
Is it nowhere in the target-directory?

kind regards,
christoph

On 22/10/12 14:51, Giacomo Coletta wrote:
> hi,
> 
> this does not work for me.
> 
> The message i get is:
> 
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
> (create-kar) on project kar.rttr: Could not interpret features XML file:
> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
> (Impossible to find the specified path) :
> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
> -> [Help 1]
> 
> 2012/10/19 Michael Täschner 
> 
>> Hi,
>>
>> pick up the filtered file from the target folder. Here's my example config:
>>
>>
>>   
>> org.apache.karaf.tooling
>> features-maven-plugin
>> true
>>
>> 
>>   
>> create-kar
>> process-resources
>>
>> 
>>   create-kar
>> 
>> 
>>
>> ${project.build.directory}/doesNotExist
>>   false
>>
>> ${project.build.outputDirectory}/feature.xml
>> 
>>   
>> 
>>   
>>
>> Regards,
>> Michael
>>
>> P.S.: I do not actually remember why I added the /doesNotExist folder
>> though but feature.xml is located in src/main/resourses
>>
>>
>> 2012/10/19 Giacomo Coletta 
>>
>>> This was more or less what I already tried, but alone does not work.
>>>
>>> it seem that the resources:resources goal is not executed during
>>> packaging with  pom (while it is with jars).
>>>
>>> i tried a bit more and in the end find something working (even if doesn't
>>> look so clean):
>>>
>>>  
>>> 
>>> 
>>>
>>> ${project.basedir}/src/main/feature/
>>> true
>>> 
>>> **/*
>>> 
>>>
>>> ${project.basedir}/src/main/filteredFeature/
>>> 
>>> 
>>> 
>>> 
>>> org.apache.maven.plugins
>>> maven-resources-plugin
>>> ${maven-resources-plugin.version}
>>> 
>>> 
>>> filter
>>> generate-resources
>>> 
>>> resources
>>> 
>>> 
>>> 
>>> 
>>> 
>>> org.apache.karaf.tooling
>>> features-maven-plugin
>>> 2.2.9
>>> 
>>> 
>>> create-kar
>>> 
>>> create-kar
>>> 
>>> 
>>>
>>>
>>> ${project.basedir}/src/main/filteredFeature/feature.xml
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> Thanks anyway.
>>>
>>> Giacomo
>>>
>>> 2012/10/19 Christoph Gritschenberger >>>
>>>
 You need to enable resource-filtering in your maven-build. You can set
 this up in your pom.xml like this:

 ...
   
 
   

 ${project.basedir}/src/main/filtered-resources
 true
 
   **/*
 
   
 
 ...
   
 ...

 kind regards,
 christoph

 On 19/10/12 11:16, Giacomo Coletta wrote:
> Hi,
>
> i started using the KARs archives, and creates a few KARS using the KAR
> archetype.
>
> one problem I encountered is that the features.xml file included in
 the kar
> in the generated maven project doesn't seem to be maven filtered by
 default.
> I would like it to be filtered for managing the included karaf
 features and
> bundles versions using maven properties like in the following example:
>
> 
> 
>   
> mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
>
> 
> 
>
> i was able to do this while including the features in an assembly
 using the
> add-features-to-repo goal of the features-maven-plugin (features.xml
 was
> filtered by default)
>
> I tried to do the same with kars, but I was not able to get to this
 result
> quickly.
> May be this is related to the fact that in the features-maven-pluging
 the
> create-kar goal is tied to the package phase, while
> the add-features-to-repo was in the compile phase.
>
>
> Does anybody know a standard or easy way to have the features.xml file
> maven filtered in KARs ?
>
> Many Thanks
>
> Giacomo
>



>>>
>>
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Kar features.xml file is not filtered

2012-10-22 Thread Giacomo Coletta
hi,

this does not work for me.

The message i get is:

[ERROR] Failed to execute goal
org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
(create-kar) on project kar.rttr: Could not interpret features XML file:
C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
(Impossible to find the specified path) :
file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
-> [Help 1]

2012/10/19 Michael Täschner 

> Hi,
>
> pick up the filtered file from the target folder. Here's my example config:
>
>
>   
> org.apache.karaf.tooling
> features-maven-plugin
> true
>
> 
>   
> create-kar
> process-resources
>
> 
>   create-kar
> 
> 
>
> ${project.build.directory}/doesNotExist
>   false
>
> ${project.build.outputDirectory}/feature.xml
> 
>   
> 
>   
>
> Regards,
> Michael
>
> P.S.: I do not actually remember why I added the /doesNotExist folder
> though but feature.xml is located in src/main/resourses
>
>
> 2012/10/19 Giacomo Coletta 
>
>> This was more or less what I already tried, but alone does not work.
>>
>> it seem that the resources:resources goal is not executed during
>> packaging with  pom (while it is with jars).
>>
>> i tried a bit more and in the end find something working (even if doesn't
>> look so clean):
>>
>>  
>> 
>> 
>>
>> ${project.basedir}/src/main/feature/
>> true
>> 
>> **/*
>> 
>>
>> ${project.basedir}/src/main/filteredFeature/
>> 
>> 
>> 
>> 
>> org.apache.maven.plugins
>> maven-resources-plugin
>> ${maven-resources-plugin.version}
>> 
>> 
>> filter
>> generate-resources
>> 
>> resources
>> 
>> 
>> 
>> 
>> 
>> org.apache.karaf.tooling
>> features-maven-plugin
>> 2.2.9
>> 
>> 
>> create-kar
>> 
>> create-kar
>> 
>> 
>>
>>
>> ${project.basedir}/src/main/filteredFeature/feature.xml
>> 
>>
>> 
>> 
>> 
>> 
>> 
>>
>> Thanks anyway.
>>
>> Giacomo
>>
>> 2012/10/19 Christoph Gritschenberger > >
>>
>>> You need to enable resource-filtering in your maven-build. You can set
>>> this up in your pom.xml like this:
>>>
>>> ...
>>>   
>>> 
>>>   
>>>
>>> ${project.basedir}/src/main/filtered-resources
>>> true
>>> 
>>>   **/*
>>> 
>>>   
>>> 
>>> ...
>>>   
>>> ...
>>>
>>> kind regards,
>>> christoph
>>>
>>> On 19/10/12 11:16, Giacomo Coletta wrote:
>>> > Hi,
>>> >
>>> > i started using the KARs archives, and creates a few KARS using the KAR
>>> > archetype.
>>> >
>>> > one problem I encountered is that the features.xml file included in
>>> the kar
>>> > in the generated maven project doesn't seem to be maven filtered by
>>> default.
>>> > I would like it to be filtered for managing the included karaf
>>> features and
>>> > bundles versions using maven properties like in the following example:
>>> >
>>> > 
>>> > 
>>> >   
>>> > mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
>>> >
>>> > 
>>> > 
>>> >
>>> > i was able to do this while including the features in an assembly
>>> using the
>>> > add-features-to-repo goal of the features-maven-plugin (features.xml
>>> was
>>> > filtered by default)
>>> >
>>> > I tried to do the same with kars, but I was not able to get to this
>>> result
>>> > quickly.
>>> > May be this is related to the fact that in the features-maven-pluging
>>> the
>>> > create-kar goal is tied to the package phase, while
>>> > the add-features-to-repo was in the compile phase.
>>> >
>>> >
>>> > Does anybody know a standard or easy way to have the features.xml file
>>> > maven filtered in KARs ?
>>> >
>>> > Many Thanks
>>> >
>>> > Giacomo
>>> >
>>>
>>>
>>>
>>
>


Re: Kar features.xml file is not filtered

2012-10-19 Thread Michael Täschner
Hi,

pick up the filtered file from the target folder. Here's my example config:

  
org.apache.karaf.tooling
features-maven-plugin
true

  
create-kar
process-resources

  create-kar



${project.build.directory}/doesNotExist
  false

${project.build.outputDirectory}/feature.xml

  

  

Regards,
Michael

P.S.: I do not actually remember why I added the /doesNotExist folder
though but feature.xml is located in src/main/resourses

2012/10/19 Giacomo Coletta 

> This was more or less what I already tried, but alone does not work.
>
> it seem that the resources:resources goal is not executed during packaging
> with  pom (while it is with jars).
>
> i tried a bit more and in the end find something working (even if doesn't
> look so clean):
>
>  
> 
> 
> ${project.basedir}/src/main/feature/
> true
> 
> **/*
> 
>
> ${project.basedir}/src/main/filteredFeature/
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-resources-plugin
> ${maven-resources-plugin.version}
> 
> 
> filter
> generate-resources
> 
> resources
> 
> 
> 
> 
> 
> org.apache.karaf.tooling
> features-maven-plugin
> 2.2.9
> 
> 
> create-kar
> 
> create-kar
> 
> 
>
>
> ${project.basedir}/src/main/filteredFeature/feature.xml
> 
>
> 
> 
> 
> 
> 
>
> Thanks anyway.
>
> Giacomo
>
> 2012/10/19 Christoph Gritschenberger 
>
>> You need to enable resource-filtering in your maven-build. You can set
>> this up in your pom.xml like this:
>>
>> ...
>>   
>> 
>>   
>>
>> ${project.basedir}/src/main/filtered-resources
>> true
>> 
>>   **/*
>> 
>>   
>> 
>> ...
>>   
>> ...
>>
>> kind regards,
>> christoph
>>
>> On 19/10/12 11:16, Giacomo Coletta wrote:
>> > Hi,
>> >
>> > i started using the KARs archives, and creates a few KARS using the KAR
>> > archetype.
>> >
>> > one problem I encountered is that the features.xml file included in the
>> kar
>> > in the generated maven project doesn't seem to be maven filtered by
>> default.
>> > I would like it to be filtered for managing the included karaf features
>> and
>> > bundles versions using maven properties like in the following example:
>> >
>> > 
>> > 
>> >   
>> > mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
>> >
>> > 
>> > 
>> >
>> > i was able to do this while including the features in an assembly using
>> the
>> > add-features-to-repo goal of the features-maven-plugin (features.xml was
>> > filtered by default)
>> >
>> > I tried to do the same with kars, but I was not able to get to this
>> result
>> > quickly.
>> > May be this is related to the fact that in the features-maven-pluging
>> the
>> > create-kar goal is tied to the package phase, while
>> > the add-features-to-repo was in the compile phase.
>> >
>> >
>> > Does anybody know a standard or easy way to have the features.xml file
>> > maven filtered in KARs ?
>> >
>> > Many Thanks
>> >
>> > Giacomo
>> >
>>
>>
>>
>


Re: Kar features.xml file is not filtered

2012-10-19 Thread Giacomo Coletta
This was more or less what I already tried, but alone does not work.

it seem that the resources:resources goal is not executed during packaging
with  pom (while it is with jars).

i tried a bit more and in the end find something working (even if doesn't
look so clean):

 


${project.basedir}/src/main/feature/
true

**/*


${project.basedir}/src/main/filteredFeature/




org.apache.maven.plugins
maven-resources-plugin
${maven-resources-plugin.version}


filter
generate-resources

resources





org.apache.karaf.tooling
features-maven-plugin
2.2.9


create-kar

create-kar




${project.basedir}/src/main/filteredFeature/feature.xml








Thanks anyway.

Giacomo

2012/10/19 Christoph Gritschenberger 

> You need to enable resource-filtering in your maven-build. You can set
> this up in your pom.xml like this:
>
> ...
>   
> 
>   
>
> ${project.basedir}/src/main/filtered-resources
> true
> 
>   **/*
> 
>   
> 
> ...
>   
> ...
>
> kind regards,
> christoph
>
> On 19/10/12 11:16, Giacomo Coletta wrote:
> > Hi,
> >
> > i started using the KARs archives, and creates a few KARS using the KAR
> > archetype.
> >
> > one problem I encountered is that the features.xml file included in the
> kar
> > in the generated maven project doesn't seem to be maven filtered by
> default.
> > I would like it to be filtered for managing the included karaf features
> and
> > bundles versions using maven properties like in the following example:
> >
> > 
> > 
> >   
> > mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
> >
> > 
> > 
> >
> > i was able to do this while including the features in an assembly using
> the
> > add-features-to-repo goal of the features-maven-plugin (features.xml was
> > filtered by default)
> >
> > I tried to do the same with kars, but I was not able to get to this
> result
> > quickly.
> > May be this is related to the fact that in the features-maven-pluging the
> > create-kar goal is tied to the package phase, while
> > the add-features-to-repo was in the compile phase.
> >
> >
> > Does anybody know a standard or easy way to have the features.xml file
> > maven filtered in KARs ?
> >
> > Many Thanks
> >
> > Giacomo
> >
>
>
>


Re: Kar features.xml file is not filtered

2012-10-19 Thread Christoph Gritschenberger
You need to enable resource-filtering in your maven-build. You can set
this up in your pom.xml like this:

...
  

  

${project.basedir}/src/main/filtered-resources
true

  **/*

  

...
  
...

kind regards,
christoph

On 19/10/12 11:16, Giacomo Coletta wrote:
> Hi,
> 
> i started using the KARs archives, and creates a few KARS using the KAR
> archetype.
> 
> one problem I encountered is that the features.xml file included in the kar
> in the generated maven project doesn't seem to be maven filtered by default.
> I would like it to be filtered for managing the included karaf features and
> bundles versions using maven properties like in the following example:
> 
> 
> 
>   
> mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
> 
> 
> 
> 
> i was able to do this while including the features in an assembly using the
> add-features-to-repo goal of the features-maven-plugin (features.xml was
> filtered by default)
> 
> I tried to do the same with kars, but I was not able to get to this result
> quickly.
> May be this is related to the fact that in the features-maven-pluging the
> create-kar goal is tied to the package phase, while
> the add-features-to-repo was in the compile phase.
> 
> 
> Does anybody know a standard or easy way to have the features.xml file
> maven filtered in KARs ?
> 
> Many Thanks
> 
> Giacomo
> 




smime.p7s
Description: S/MIME Cryptographic Signature