[ 
https://issues.apache.org/jira/browse/KARAF-1677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16411466#comment-16411466
 ] 

ASF GitHub Bot commented on KARAF-1677:
---------------------------------------

jbonofre closed pull request #475: [KARAF-1677] Add support of directory in the 
KAR deployer
URL: https://github.com/apache/karaf/pull/475
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
 
b/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
index 8ed983d5fd..5183da9ad1 100644
--- 
a/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
+++ 
b/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
@@ -69,9 +69,9 @@ String getKarName(File karFile) {
     }
 
     public boolean canHandle(File file) {
-               // If the file ends with .kar, then we can handle it!
+               // If the file or directory ends with .kar, then we can handle 
it!
         //
-        if (file.isFile() && file.getName().endsWith(KAR_SUFFIX)) {
+        if (file.getName().endsWith(KAR_SUFFIX)) {
                        LOGGER.info("Found a .kar file to deploy.");
                        return true;
                }
@@ -87,7 +87,7 @@ else if (file.isFile() && 
file.getName().endsWith(ZIP_SUFFIX)) {
                     return true;
                 }
            } catch (Exception e) {
-               LOGGER.warn("Problem extracting zip file '{}'; ignoring.", 
file.getName(), e);
+                   LOGGER.warn("Problem extracting zip file '{}'; ignoring.", 
file.getName(), e);
            } finally {
                 try {
                     if (zipFile != null) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Unpacked KAR deployment
> -----------------------
>
>                 Key: KARAF-1677
>                 URL: https://issues.apache.org/jira/browse/KARAF-1677
>             Project: Karaf
>          Issue Type: New Feature
>          Components: karaf-kar
>            Reporter: Lars-Erik Helander
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 4.2.0
>
>
> I am looking for a method, similar to KAR where the 
> "repository/..../features.xml" are automatically registered, but where the 
> data is not in a KAR file, but in a directory, e.g. unpacking a KAR file to a 
> folder and then somehow point that the content of that folder should be 
> recognised as a repo and the features under the repository folder is 
> automatically registered.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to