2

Maven リリース プラグインを使用して、 Perforceを SCM として持つ Java プロジェクトのリリース バージョンを作成しようとしています。

私のpom scmセクションは次のとおりです。

<scm>
  <connection>scm:p4:myperforcehostname:1666://mydepot/mycomponent</connection>
  <developerConnection>scm:p4:myperforcehostname:1666://mydepot/mycomponent</developerConnection>
  <url>http://myperforcehostname:1666</url>
</scm>

また、P4Mavenプラグインと Maven リリース プラグインも使用します。

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-plugin</artifactId>
  <version>1.4</version>
  <dependencies>
    <dependency>
      <groupId>com.perforce</groupId>
      <artifactId>p4maven</artifactId>
      <version>[2011,2012)</version>
    </dependency>
  </dependencies>
  <configuration>
    <connectionType>connection</connectionType>
    <username>myusernme</username>
    <password>mypassword</password>
    <includes>**</includes>
  </configuration>
</plugin>        
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5</version>
</plugin>

「mvn release:prepare -DdryRun=true」を呼び出すと、

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare 
(default-cli) on project mycomponent: The provider given in the SCM URL could not be found: 
No such provider: 'p4'. -> [Help 1]

何か案は?

を呼び出すことができますmvn scm:checkout

4

3 に答える 3

2

asp4maven依存関係を とに追加する必要があります。maven-scm-pluginmaven-release-plugin

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-plugin</artifactId>
  <version>1.4</version>
  <dependencies>
    <dependency>
      <groupId>com.perforce</groupId>
      <artifactId>p4maven</artifactId>
      <version>[2011,2012)</version>
    </dependency>
  </dependencies>
  <configuration>
    <connectionType>connection</connectionType>
    <username>username</username>
    <password>password</password>
    <includes>**</includes>
  </configuration>
</plugin>        
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5</version>
  <dependencies>
    <!-- P4Maven -->
    <dependency>
      <groupId>com.perforce</groupId>
      <artifactId>p4maven</artifactId>
      <version>[2011,2012)</version>
    </dependency>
  </dependencies>
  <configuration>
    <connectionType>connection</connectionType>
    <username>username</username>
    <password>password</password>
    <includes>**</includes>
  </configuration>
</plugin>
于 2014-04-03T08:19:18.033 に答える
0

P4Maven はすぐに使えるものではないことが判明しました。Perforce ページからダウンロードして、リポジトリにインストールする必要がありました (ダウンロード zip ファイルの指示に従ってください)。その後p4、SCM プロバイダーとして正常に使用できました。

于 2014-04-03T07:39:27.427 に答える