I would be nice to revert KARAF-1392, where the install's behavior has
changed.  and move it to 2.3+ branch

However it is up for debate from dev team

Since I am directly invoke the karInstaller and heavily depends on its
internal behavior, so I guess it is my responsibility to adapt to the
changes

At this moment, i dont have anything to change for KarArtifactInstaller yet.

Thank you

-Dan



On Thu, Jun 21, 2012 at 1:57 PM, Jean-Baptiste Onofré <j...@nanthrax.net> wrote:
> Hi Dan,
>
> Do you consider that something has to be change in the KarArtifactInstaller
> (or so do you think we should cancel this release) ?
>
> Regards
> JB
>
>
> On 06/21/2012 10:54 PM, Dan Tran wrote:
>>
>> I will go ahead to fix this at my end to call 'install()' first to
>> copy kar file to where karaf expected, any perhaps use the
>> karinstaller service directly since it is exposed a a service.
>>
>> Thanks
>>
>>
>>
>> On Thu, Jun 21, 2012 at 9:12 AM, Jean-Baptiste Onofré<j...@nanthrax.net>
>>  wrote:
>>>
>>> OK got it.
>>>
>>> Just background: before 2.2.8, the KarArtifactInstaller only install kar
>>> (install(File) method), and doesn't nothing during uninstall().
>>>
>>> As the kar artifact installer installs all features contained in the kar,
>>> lot of users mentionned that it appears as a bug that the kar artifact
>>> install doesn't uninstall the features removing the kar file.
>>>
>>> So to uninstall all features from a kar file, I can work (looking for the
>>> features XML in the zip file) on the "original" kar file during
>>> uninstall(File) as the file is already removed.
>>> So we copy the kar file into the local repo during install:
>>>
>>>        File karFile = new File(localRepoPath, file.getName());
>>>        copy(file.toURI(), karFile);
>>>
>>> Like this, at uninstall, we can get back the original kar to looking for
>>> features:
>>>
>>>        File karFile = new File(localRepoPath, file.getName());
>>>
>>> So, that's why the kar file is in localRepo.
>>>
>>> So it doesn't assume that you place the kar file in localRepo, during the
>>> install method, the karArtifactInstaller should copy the file from the
>>> location in argument into the localRepo.
>>>
>>> Could you provide a quick test case to reproduce your issue ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 06/21/2012 05:51 PM, Dan Tran wrote:
>>>>
>>>>
>>>> No, infact under karaf2.2.7, it behaves correctly and unpacks my kar
>>>> file where I ask it to ( ie localRepoPath )
>>>>
>>>> in 2.2.8, it still behaves correctly by unpack under localRepoPath,
>>>> but looks for the kar file at the wrong place.  It assumes I must
>>>> place my karFile under localRepoPath, and ignore the full path i pass
>>>> into the 'update' method
>>>>
>>>> -Dan
>>>>
>>>> On Thu, Jun 21, 2012 at 8:42 AM, Jean-Baptiste Onofré<j...@nanthrax.net>
>>>>  wrote:
>>>>>
>>>>>
>>>>> You mean that your karArtifactInstaller ignores the basePath and
>>>>> localRepoPath ?
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 06/21/2012 05:08 PM, Dan Tran wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> I think I found the root cause, we spin our own KarArtifactInstaller
>>>>>> since karaf 2.0.x does not expose it as a service
>>>>>>
>>>>>>   <bean id="karArtifactInstaller"
>>>>>> class="org.apache.karaf.deployer.kar.KarArtifactInstaller"
>>>>>> init-method="init"  destroy-method="destroy" activation="lazy">
>>>>>>     <property name="basePath" value="$[karaf.base]" />
>>>>>>     <property name="localRepoPath" value="$[karaf.base]/local-repo" />
>>>>>>     <property name="featuresService">
>>>>>>       <reference interface="org.apache.karaf.features.FeaturesService"
>>>>>> />
>>>>>>     </property>
>>>>>>   </bean>
>>>>>>
>>>>>> Here is reference to karaf team on why we spin our own service bean
>>>>>>
>>>>>> https://issues.apache.org/jira/browse/KARAF-656
>>>>>>
>>>>>> However I still it is a bug since I ask the service to look for my
>>>>>> file at a certain location, but  the it looks somewhere else.
>>>>>>
>>>>>> Big thanks
>>>>>>
>>>>>> -Dan
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 21, 2012 at 3:56 AM, Jean-Baptiste Onofré<j...@nanthrax.net>
>>>>>>  wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi Dan,
>>>>>>>
>>>>>>> Just to clearly understand.
>>>>>>>
>>>>>>> The update() method calls install(). So it means that:
>>>>>>>
>>>>>>> - you should see the feature.kar in the repo. This repo is set by the
>>>>>>> localRepoPath attribute (target/local-repo in the class, injected to
>>>>>>> ${karaf.base}/system by the blueprint descriptor). So, could you
>>>>>>> check
>>>>>>> if
>>>>>>> you have the feature.kar in system ?
>>>>>>> - FeaturesService.install() is not necessary as the
>>>>>>> KarArtifactInstaller
>>>>>>> install all features contained in kar files automatically.
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 06/21/2012 08:14 AM, Dan Tran wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> long story,
>>>>>>>>
>>>>>>>> We have our own custom kar deployer where we directly use
>>>>>>>> KarArtifactInstaller as a service to deploy our feature kar file and
>>>>>>>> we dont place our kar file under karaf's deploy directory )
>>>>>>>>
>>>>>>>>  Here is pseudo code
>>>>>>>>
>>>>>>>>     // Call kar deployer to unpack in karaf local-repo
>>>>>>>>     KarArtifactInstaller.update( File path/to/our/feature.kar )
>>>>>>>>
>>>>>>>>     //use featureService to deploy the feature
>>>>>>>>     FeaturesService.install (... )
>>>>>>>>
>>>>>>>>
>>>>>>>> As I have stated before, the first call throws FileNotFoundException
>>>>>>>> since it could not find my 'feature.kar' under
>>>>>>>> karaf.base/local-repo.
>>>>>>>> Strange??
>>>>>>>>
>>>>>>>> how er if I also place another copy of  my 'feature.kar' file under
>>>>>>>> karaf's local-repo directory, the same KarArtifactInstaller.update(
>>>>>>>> File path/to/our/feature.kar ) is happy and unpack under local-repo.
>>>>>>>> Strange??
>>>>>>>>
>>>>>>>> Thanks for looking into this
>>>>>>>>
>>>>>>>> -D
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jun 20, 2012 at 10:20 PM, Jean-Baptiste
>>>>>>>> Onofré<j...@nanthrax.net>
>>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Just to understand your issue, the kar deployer behavior is quite
>>>>>>>>> the
>>>>>>>>> same:
>>>>>>>>> - you put the kar file in the deploy folder
>>>>>>>>> - the kar is uncompress (previously it was uncompress in
>>>>>>>>> local-repo,
>>>>>>>>> now
>>>>>>>>> it's uncompress in system repo)
>>>>>>>>> - all features contained in the kar are automatically installed
>>>>>>>>> - now, if you remove the kar file, the kar deployer is able to
>>>>>>>>> uninstall
>>>>>>>>> all
>>>>>>>>> features and remove the kar file
>>>>>>>>>
>>>>>>>>> So, even if the storage changed from local-repo to system, the
>>>>>>>>> behavior
>>>>>>>>> is
>>>>>>>>> the same.
>>>>>>>>>
>>>>>>>>> Do you use directly the kar deployer (by code I mean) ?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>> On 06/21/2012 12:13 AM, Dan Tran wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hello Karaf devs,
>>>>>>>>>>
>>>>>>>>>> regresion in KarArtifactInstaller service?
>>>>>>>>>>
>>>>>>>>>> in karaf-2.2.7,
>>>>>>>>>>
>>>>>>>>>>   karInstaller.update( full/path/to/my/myfeature.kar )  unpacks my
>>>>>>>>>> 'myfeature.jar' under local-repo
>>>>>>>>>>
>>>>>>>>>> in karaf-2.2.8, the call, expect that I put myfeature.kar under
>>>>>>>>>> local-repo/myfeature.kar?
>>>>>>>>>>
>>>>>>>>>> is it expected?  This changes breaks my custom deployment.
>>>>>>>>>>
>>>>>>>>>> Can we have this new behavior in 3.0, or 2.3 instead? since I
>>>>>>>>>> would
>>>>>>>>>> like to continue upgrading to latest 2.2.x code without changing
>>>>>>>>>> my
>>>>>>>>>> code.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> -Dan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Jun 20, 2012 at 2:10 PM, Romain
>>>>>>>>>> Gilles<romain.gil...@gmail.com>
>>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> +1
>>>>>>>>>>>
>>>>>>>>>>> Thanks a lot.
>>>>>>>>>>>
>>>>>>>>>>> Romain
>>>>>>>>>>>
>>>>>>>>>>> 2012/6/20 Jean-Baptiste Onofré<j...@nanthrax.net>
>>>>>>>>>>>
>>>>>>>>>>>> +1 (binding)
>>>>>>>>>>>>
>>>>>>>>>>>> First tests passed without problem, I will test with Cellar, etc
>>>>>>>>>>>> tomorrow
>>>>>>>>>>>> morning, but it looks good to me.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>> JB
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 06/20/2012 10:05 PM, Jamie G. wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> We resolved 28 issues in this release (web page will be
>>>>>>>>>>>>> published
>>>>>>>>>>>>> post
>>>>>>>>>>>>> RC promotion):
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://svn.apache.org/repos/asf/karaf/site/trunk/src/main/webapp/index/community/download/karaf-2.2.8-release.page
>>>>>>>>>>>>>
>>>>>>>>>>>>> Staging repository:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://repository.apache.org/content/repositories/orgapachekaraf-255/
>>>>>>>>>>>>>
>>>>>>>>>>>>> Release tags:
>>>>>>>>>>>>> https://svn.apache.org/repos/asf/karaf/tags/karaf-2.2.8/
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please vote to approve this release:
>>>>>>>>>>>>>
>>>>>>>>>>>>> [ ] +1 Approve the release
>>>>>>>>>>>>> [ ] -1 Veto the release (please provide specific comments)
>>>>>>>>>>>>>
>>>>>>>>>>>>> This vote will be open for 72 hours.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>>>>> jbono...@apache.org
>>>>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>> jbono...@apache.org
>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jean-Baptiste Onofré
>>>>>>> jbono...@apache.org
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbono...@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>
>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply via email to