[ 
https://issues.apache.org/jira/browse/KNOX-3051?focusedWorklogId=946244&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-946244
 ]

ASF GitHub Bot logged work on KNOX-3051:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Dec/24 11:12
            Start Date: 01/Dec/24 11:12
    Worklog Time Spent: 10m 
      Work Description: hanicz opened a new pull request, #971:
URL: https://github.com/apache/knox/pull/971

   ## What changes were proposed in this pull request?
   
   **Classpath extension for patches**
   
   It would be convenient to have the ability to easily pre-pend classes/JARs 
to the Knox classpath for quickly applying/testing patches. This approach is 
completely configurable and multiple locations can be configured although their 
order has to be kept in mind to avoid overrides. Placing any class or JAR in 
these locations will take precedence on the classpath as it will come first. 
These locations can be within the Knox installation, external to it or even a 
mix of them. 
   
   The logic is checking the gateway-site.xml file for 
'gateway.server.classpath.extension' property, if it is there it will extend 
the classpath with its value. The launcher only modifies the classpath for the 
GatewayServer. There is a check for the main class that's in the properties and 
if it is 'org.apache.knox.gateway.GatewayServer' only then the classpath is 
extended.
   
   Example extension:
   
   `/new/classpath/jars/*.jar;../patch/*;/new/classpath/classes;`
   
   - The different locations should be separated by ',' or ';'.
   - '*.jar': picks up all jar files in the folder.
   - '*': picks up all files in the folder.
   - '/folder': class files are picked up from various folder hierarchies (eq. 
put GatewayServer.class in org/apache/knox/gateway folder) 
   
   ## How was this patch tested?
   
   - Unit tests
   - Tested locally with class and JAR files
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 946244)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add a classpath location for patches
> ------------------------------------
>
>                 Key: KNOX-3051
>                 URL: https://issues.apache.org/jira/browse/KNOX-3051
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 2.0.0
>            Reporter: Philip Zampino
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It would be convenient to have the ability to easily pre-pend classes to the 
> Knox classpath for quickly applying/testing patches.
> If this could be configurable, that would be ideal, though I'm not sure it's 
> possible.
> If hard-coded, we should consider whether or not this location should be 
> within the Knox installation directory or external to it. There are pros and 
> cons to both, especially when considering upgrades in managed environments.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to