How to force Maven SCM Perforce provider version?

2019-08-24 22:44发布

I am trying to reproduce an existing maven environment on another computer and when I try to use the release plugin it gives me an "password is required for the perforce scm plugin"

The odd thing is I didn't make any changes to the pom.xml.

I found this bug report: http://jira.codehaus.org/browse/SCM-415

Interestingly I am using maven-scm-provider-perforce 1.1, so it could be exactly my problem.

So this this leads to my current problem. I can't seem to force my project to use the latest perforce provider version.

I've tried add this under <build>

<pluginManagement>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-perforce</artifactId>
      <version>1.3</version>
    </plugin>
  </plugins>
</pluginManagement>

But it seems to be still using 1.1

I've also tried to force it to use version 1.3 of the maven-scm-plugin, but that still uses 1.1 of perforce provider.

How do I update my repo so it pulls version 1.3 of the perforce provider?

Note: At the highest level I am calling this command:

mvn --batch-mode -Dgoals=install release:prepare

1条回答
女痞
2楼-- · 2019-08-24 23:34

Ok looks like I found the problem.

I was using an old version of the release plugin (which works on the other computer?), so all I needed to do was add this to pluginManagement:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.0</version>
    </plugin>

This pulled 2.0 of the release plugin which updated everything else and pulled 1.3 of all the scm providers

查看更多
登录 后发表回答