EricJoy2048 opened a new issue, #2415:
URL: https://github.com/apache/incubator-seatunnel/issues/2415

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   ```
       /**
        * Root dir varies between different spark master and deploy mode,
        * it also varies between relative and absolute path.
        * When running seatunnel in --master local, you can put plugins related 
files in $project_dir/plugins,
        * then these files will be automatically copied to 
$project_dir/seatunnel-core/target and token in effect if you start seatunnel 
in IDE tools such as IDEA.
        * When running seatunnel in --master yarn or --master mesos, you can 
put plugins related files in plugins dir.
        */
       public static Path appRootDir() {
           if (DeployMode.CLIENT == MODE || STARTER) {
               try {
                   String path = 
Common.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
                   path = new File(path).getPath();
                   return Paths.get(path).getParent().getParent();
               } catch (URISyntaxException e) {
                   throw new RuntimeException(e);
               }
           } else if (DeployMode.CLUSTER == MODE) {
               return Paths.get("");
           } else {
               throw new IllegalStateException("deploy mode not support : " + 
MODE);
           }
       }
   ```
   
   This code will return path 
`xxx/incubator-seatunnel/seatunnel-common/connectors/seatunnel` when I run e2e 
in IDE, It's a wrong path for connector plugin dir. The right path is 
`xxx/incubator-seatunnel/seatunnel-connectors-v2-dist/target/lib`.
   
   ### SeaTunnel Version
   
   all
   
   ### SeaTunnel Config
   
   ```conf
   no
   ```
   
   
   ### Running Command
   
   ```shell
   no
   ```
   
   
   ### Error Exception
   
   ```log
   18:08:56,464  INFO || - [AbstractPluginDiscovery] main - Load SeaTunnelSink 
Plugin from 
/Users/gaojun/workspace/incubator-seatunnel/seatunnel-common/connectors/seatunnel
   
   java.lang.RuntimeException: Plugin PluginIdentifier{engineType='seatunnel', 
pluginType='sink', pluginName='LocalFile'} not found.
   
   ```
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to