[
https://issues.apache.org/jira/browse/KNOX-3108?focusedWorklogId=960555&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-960555
]
ASF GitHub Bot logged work on KNOX-3108:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Mar/25 13:25
Start Date: 06/Mar/25 13:25
Worklog Time Spent: 10m
Work Description: hanicz opened a new pull request, #1004:
URL: https://github.com/apache/knox/pull/1004
## What changes were proposed in this pull request?
[KNOX-3047](https://issues.apache.org/jira/projects/KNOX/issues/KNOX-3047)
Extended the classpath with /usr/share/java/*.jar however it could cause issues
if other data-services use the same location for their jars. This PR iterates
on the changes introduced in
[KNOX-3051](https://issues.apache.org/jira/projects/KNOX/issues/KNOX-3051) and
makes it possible to prepend and/or append paths to the classpath dynamically
using the `gateway-site.xml` configuration file.
To append new path(s) to the classpath add the below property to
`gateway-site.xml`:
```
<property>
<name>gateway.server.append.classpath</name>
<value>/new/append/path/*.jar</value>
</property>
```
To prepend new path(s) to the classpath add the below property to
`gateway-site.xml`:
```
<property>
<name>gateway.server.prepend.classpath</name>
<value>/new/prepend/path/*.jar</value>
</property>
```
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
Manual tested locally
Issue Time Tracking
-------------------
Worklog Id: (was: 960555)
Remaining Estimate: 0h
Time Spent: 10m
> Append classpath with additional paths
> --------------------------------------
>
> Key: KNOX-3108
> URL: https://issues.apache.org/jira/browse/KNOX-3108
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Affects Versions: 2.2.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We added the ability to prepend the classpath with paths for patches in
> [KNOX-3051|https://issues.apache.org/jira/projects/KNOX/issues/KNOX-3051]. In
> [KNOX-3047|https://issues.apache.org/jira/projects/KNOX/issues/KNOX-3047] we
> also added the /usr/share/java/*.jar folder to extend the classpath with
> additional libraries. However this path can hold jars for other data services
> as well and it could cause critical issues for Knox during runtime. With the
> changes proposed user can prepend/append any paths to the classpath in the
> gateway-site.xml file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)