-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set default extPlugin path to relative path. #5632
base: master
Are you sure you want to change the base?
Conversation
@@ -30,7 +30,7 @@ public final class ShenyuPluginPathBuilder { | |||
|
|||
private static final String PLUGIN_PATH = "plugin-ext"; | |||
|
|||
private static final String DEFAULT_EXT_PLUGIN_PATH = "/ext-lib/"; | |||
private static final String DEFAULT_EXT_PLUGIN_PATH = "ext-lib/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't use '/ ' at the beginning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The absolute path of /ext-lib/
is not in the deployment directory. On Linux, it's just pointing to the /ext-lib
folder. On Windows it is in the root of the deployment driver. A log point added to confirm this. We can find this in test case too:
shenyu/shenyu-web/src/test/java/org/apache/shenyu/web/loader/ShenyuPluginPathBuilderTest.java
Lines 42 to 49 in 1f5b5cd
* test for plugin-ext. | |
* -Dplugin-ext=D:\testUrl | |
*/ | |
@Test | |
public void testGetPluginPathByPluginExt() { | |
System.setProperty("plugin-ext", "/testUrl"); | |
File jarFile = ShenyuPluginPathBuilder.getPluginFile(""); | |
assertNotNull(jarFile); |
Current default value of extPlugin path
/ext-lib/
is not consistent with described in deployment document,which resulting custom plugin jars auto loading failed. On Windows, bootstrap binary package's startup context isbin
directory, ext plugin relative path is not correct too.Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true
.