【发布时间】:2022-02-11 07:44:06
【问题描述】:
我想使用 maven-scm-plugin 从 git 存储库(又名克隆)下载文件到项目目录
我遇到了一个错误
Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.12.2:export (myjsp) on project myproject-tomcat-web: Execution myjsp of goal org.apache.maven.plugins:maven-scm-plugin:1.12.2:export failed.: NullPointerException
在 pom.xml 中我使用以下构造
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.12.2</version>
<executions>
<execution>
<id>myjsp</id>
<phase>generate-resources</phase>
<goals>
<goal>export</goal>
</goals>
<configuration>
<connectionUrl>scm:git:https://git.myserver.com/myurl.git</connectionUrl>
<exportDirectory>target/web-resources/WEB-INF/resource</exportDirectory>
</configuration>
</execution>
</executions>
</plugin>
同时,一切都从 SVN 存储库正常加载(将 url 设置为 connectionUrl 时)。
可能是什么问题?
【问题讨论】:
-
你能检查Java的版本吗?我的意思是看看你的 IDE 选择了哪个 java 版本。
-
@Zakir Hussain java = 1.8,最令人惊讶的是,从SVN存储库下载文件时没有问题
标签: java maven maven-plugin maven-scm-plugin