在Gitlab CI / CD管道中将Stanford CoreNLP依赖项添加到Spring Boot

问题描述

我已经在Spring Boot 2应用程序中实现了基本的情绪分析。我的pom.xml配置如下:

<dependency>
    <groupId>edu.stanford.nlp</groupId>
    <artifactId>stanford-corenlp</artifactId>
    <version>4.0.0</version>
    <classifier>models</classifier>
</dependency>
<dependency>
    <groupId>edu.stanford.nlp</groupId>
    <artifactId>stanford-corenlp</artifactId>
    <version>4.0.0</version>
    <classifier>models</classifier>
</dependency>
<dependency>
    <groupId>edu.stanford.nlp</groupId>
    <artifactId>stanford-corenlp</artifactId>
    <version>4.0.0</version>
    <classifier>models-english</classifier>
</dependency>

此设置工作正常,但是当触发Gitlab管道时,工件的重量超过1 GB,并且该阶段失败,响应状态为 413:请求实体太大,因为它无法将其上传到下一阶段。

使用Intellij Idea,我可以使用外部库>打开库设置pom.xml删除这些依赖项并将其添加到项目中,但是我不知道该怎么做在部署环境中,因为管道将我的应用程序包装在.jar中,并在Maven docker容器中提供服务。

尝试在没有依赖项的情况下部署应用程序时出现的异常是edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file)

我无法修改POST请求大小的Gitlab设置,因此在打包结果.jar之前,我需要找到一种在管道执行过程中添加这些依赖项的方法

我该怎么做? 预先感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)