2017-02-01 41 views
0

parent、Model、WebApplication、WebServicesというモジュールを持つマルチモデルプロジェクト用のMaven Release Pluginを設定しようとしています。Maven Release Plugin - アクセスが拒否されました

単純なプロジェクトのプラグインをテストとして作成しましたが、このプロジェクトではできませんでした。

親の\のpom.xml

 .... 
     <version>2.4.1-SNAPSHOT</version> 
     ..... 
     <distributionManagement> 
      <repository> 
       <id>release</id> 
       <url>file://git.comapany.ro/dragos.geornoiu/test.git</url> 
      </repository> 
     </distributionManagement> 
     <scm>connection>scm:git:[email protected]:dragos.geornoiu/test.git</connection></scm> 
    .... 
    <extensions> 
      <extension> 
       <groupId>org.apache.maven.wagon</groupId> 
       <artifactId>wagon-ftp</artifactId> 
       <version>2.8</version> 
      </extension> 
    </extensions> 
    <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.2</version> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-release-plugin</artifactId> 
       <version>2.5.2</version> 
      </plugin> 
    .... 
    </plugins> 

モジュールは、親ポンポンからのバージョンを取るoher:

<parent> 
     ... 
     <version>2.4.1-SNAPSHOT</version> 
</parent> 

は私がMVNのリリースを実行します。親モジュールから準備。

プラグインは、各モジュールの新しいバージョンと開発用の新しいバージョンを尋ねます。バージョンを2.4.1-SNAPSHOTから2.4.1に変更し、ローカルタグを作成しますが、そこで停止します。タグはプッシュされず、開発バージョンは2.4.2-SNPASHOTに変更されません。私は許可拒否または類似した何かを取得しておりませんので、

[ERROR] Provider message: 
[ERROR] The git-push command failed. 
[ERROR] Command output: 
[ERROR] Access denied. 
[ERROR] fatal: Could not read from remote repository. 
[ERROR] 
[ERROR] Please make sure you have the correct access rights 
[ERROR] and the repository exists. 

私がリモートにSSHで接続していますし、テストしてきた私は、(それらのすべてはうまく動作する、プッシュをコミットし、親モジュールからタグを作成しますこれが問題だとは思わない)。また、プラグインはバージョンを2.4.1(SNAPSHOTを削除)に変更した後にプッシュを行います。

私は-Xパラメータで見てみましたが、私が間違っていることを理解できませんでした。

+0

mvnリリースを実行しているユーザーにgit repoにプッシュする権限がありません。おそらくsshキーが設定されていません。最初にコマンドラインから実行してください。ログを見ると、実行しようとしている正確なgitコマンドが表示されます。 –

+0

@EssexBoyプラグインは、リポジトリのバージョンを2.4.1から変更します-SNPASHOTから2.4.1へ。 mvn release:prepareコマンドはコマンドラインから実行され、エラーが発生した後、私は "git push --tags"を作成することができ、作成されたタグはrepoにプッシュされます。 –

+0

これはあなたのエラーメッセージが言うことではありませんか? –

答えて

1

私はこの記事を読んで解決策を見つけました。MAVEN-RELEASE-PLUGIN "UNABLE TO TAG SCM" ISSUE AND SOLUTION

In case the modules are located on the same level as the pom-project and need to be referenced

…you will get a misleading error message:

Caused by: org.apache.maven.plugin.MojoFailureException: Unable to tag SCM

Provider message: The git-push command failed.

Command output: ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

モデルを移動した後、のWebApplicationは、Webサービスモジュール親へとそれぞれのpom.xmlのパスを変更することは、MVNリリース:正常に実行されたコマンドを準備します。

関連する問題