更新时间:2023-10-01 20:45:22
不是推荐的解决方案,而是一种非常有用的解决方法:
Not a recommended solution but a very useful workaround:
在项目主目录中创建一个目录.称之为
Make a directory inside project's home. Let's call it
$ projectBasseDir/lib
$projectBasseDir/lib
将所有外部jar放入此文件夹.
Put all your external jars in this folder.
在pom文件中为您的依赖项添加作用域和systemPath,如下所示:
< scope>system< /scope >
< systemPath>${project.basedir}/lib/yourJar.jar< /systemPath>
In the pom file add scope and systemPath as follows for your dependency:
< scope>system< /scope >
< systemPath>${project.basedir}/lib/yourJar.jar< /systemPath>
将此lib/目录推送到github上的项目存储库中
Push this lib/ directory to your project repo on github
如果罐子不在本地存在,那么我们需要在您的仓库中添加一个before_start脚本,基本上可以做到这一点:
mkdir lib/
wget -P "lib/" http://urlForYourJar.jar
If the jars are not present locally, then we need to add a before_start script to your repo which basically does this:
mkdir lib/
wget -P "lib/" http://urlForYourJar.jar
它再次发挥作用.