Skip to content
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

Open
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

initialdmg
Copy link
Contributor

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 is bin directory, ext plugin relative path is not correct too.

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

@@ -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/";
Copy link
Member

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?

Copy link
Contributor Author

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:

* test for plugin-ext.
* -Dplugin-ext=D:\testUrl
*/
@Test
public void testGetPluginPathByPluginExt() {
System.setProperty("plugin-ext", "/testUrl");
File jarFile = ShenyuPluginPathBuilder.getPluginFile("");
assertNotNull(jarFile);

Aias00 and others added 28 commits August 30, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants