2016-08-25 18 views
0

何が起こっているのか分かりません。Mavenマルチモジュールリリース

Aggregator Pom 
| 
+- Parent Pom 
| 
+- SubModule 1 (whose parent is "Parent Pom") 
| 
+- SubModule 2 (whose parent is "SubModule 1") 

すべてがポンポンのパッケージである: 私はこのような構造のプロジェクトを持っています。

私は数日間、リリースプラグインと戦ってきました。私はリリースを実行し、正常にMavenにデプロイします。ただし、Parent、SubModule 1およびSubModule 2のバージョンは、スナップショットバージョンのものです。

それはチームシティーで実行されているが、基本的にはそれが何か実行します(「サイン・アーティファクト」プロファイルはGPG署名する責任がある)

mvn -P sign-artifacts -B release:perform -P sign-artifacts 

:その後、

mvn -P sign-artifacts -B release:clean release:prepare --batch-mode -Dtag=0.1.0 -DreleaseVersion=0.1.0 -DdevelopmentVersion=0.2.0-SNAPSHOT -Dscm.tag=0.1.0 -Dproject.rel.{aggregator pom groupId}:{aggregator pom artifactId}=0.1.0 -Dproject.dev.{aggregator pom groupId}:{aggregator pom artifactId}=0.2.0-SNAPSHOT 

をと

maven centralでは、親Pom、SubModule 1、SubModule 2がそこにあることがわかります。メタデータのバージョンは0.1.0ですが、それぞれのpomをダウンロードすると、バージョンi 0.2.0スナップショット。

何が間違っているのか、どのように修正するのですか?事前に

おかげで、

オハッド

EDIT: いくつかの出力:

[INFO] Checking out the project to perform the release ... 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target && git clone --branch 0.25.0 [email protected]:wix/wix-oss-parents.git /home/builduser/agent03/work/4ae459b9554b762f/target/checkout 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target 
... 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && git fetch [email protected]:wix/wix-oss-parents.git 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && git checkout 0.25.0 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout 
... 
[INFO] Invoking perform goals in directory /home/builduser/agent03/work/4ae459b9554b762f/target/checkout 
[INFO] Executing goals 'deploy'... 
[DEBUG] Using ${maven.home} of: '/home/builduser/agent03/tools/maven3_1'. 
[DEBUG] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && /home/builduser/agent03/tools/maven3_1/bin/mvn -B -X -D maven.repo.local=/home/builduser/.m2/repository -s /home/builduser/agent03/temp/buildTmp/release-settings8995574762584519955.xml -D performRelease=true -P artifactory deploy 
[INFO] Inspecting build with total of 4 modules... 
[INFO] Installing Nexus Staging features: 
... 
[DEBUG] Goal:   org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) 
[DEBUG] Style:   Regular 
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?> 
[INFO] <configuration> 
[INFO] <altStagingDirectory>${altStagingDirectory}</altStagingDirectory> 
[INFO] <artifact default-value="${project.artifact}"/> 
[INFO] <attachedArtifacts default-value="${project.attachedArtifacts}"/> 
[INFO] <autoDropAfterRelease default-value="true">${autoDropAfterRelease}</autoDropAfterRelease> 
[INFO] <autoReleaseAfterClose default-value="false">false</autoReleaseAfterClose> 
[INFO] <detectBuildFailures default-value="true">${detectBuildFailures}</detectBuildFailures> 
[INFO] <keepStagingRepositoryOnCloseRuleFailure>${keepStagingRepositoryOnCloseRuleFailure}</keepStagingRepositoryOnCloseRuleFailure> 
[INFO] <keepStagingRepositoryOnFailure>${keepStagingRepositoryOnFailure}</keepStagingRepositoryOnFailure> 
[INFO] <mavenSession default-value="${session}"/> 
[INFO] <mojoExecution default-value="${mojoExecution}"/> 
[INFO] <nexusUrl>https://oss.sonatype.org/</nexusUrl> 
[INFO] <offline default-value="${settings.offline}"/> 
[INFO] <packaging default-value="${project.packaging}"/> 
[INFO] <pluginArtifactId default-value="${plugin.artifactId}"/> 
[INFO] <pluginGroupId default-value="${plugin.groupId}"/> 
[INFO] <pluginVersion default-value="${plugin.version}"/> 
[INFO] <pomFile default-value="${project.file}"/> 
[INFO] <serverId>ossrh</serverId> 
[INFO] <skipLocalStaging>${skipLocalStaging}</skipLocalStaging> 
[INFO] <skipNexusStagingDeployMojo>${skipNexusStagingDeployMojo}</skipNexusStagingDeployMojo> 
[INFO] <skipRemoteStaging>${skipRemoteStaging}</skipRemoteStaging> 
[INFO] <skipStaging>${skipStaging}</skipStaging> 
[INFO] <skipStagingRepositoryClose>${skipStagingRepositoryClose}</skipStagingRepositoryClose> 
[INFO] <sslAllowAll default-value="false">${maven.wagon.http.ssl.allowall}</sslAllowAll> 
[INFO] <sslInsecure default-value="false">${maven.wagon.http.ssl.insecure}</sslInsecure> 
[INFO] <stagingDescription>${stagingDescription}</stagingDescription> 
[INFO] <stagingProfileId>${stagingProfileId}</stagingProfileId> 
[INFO] <stagingProgressPauseDurationSeconds default-value="3">${stagingProgressPauseDurationSeconds}</stagingProgressPauseDurationSeconds> 
[INFO] <stagingProgressTimeoutMinutes default-value="5">${stagingProgressTimeoutMinutes}</stagingProgressTimeoutMinutes> 
[INFO] <stagingRepositoryId>${stagingRepositoryId}</stagingRepositoryId> 
[INFO] <updateReleaseInfo>${updateReleaseInfo}</updateReleaseInfo> 
[INFO] </configuration> 
... 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git log -n1 --date-order HEAD 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent 
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : commit 4875b5de9d40f8a00be37e25d3548755b1f044f4 
... 
[DEBUG] GitLatestRevisionCommandConsumer consumeLine :  [maven-release-plugin] prepare release 0.25.0 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git pull [email protected]:wix/wix-oss-parents.git HEAD 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git diff --raw 4875b5de9d40f8a00be37e25d3548755b1f044f4 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent 
... 
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git log -n1 --date-order HEAD 
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent 
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : commit b5c5fa4e2a0c16d9247ae9261a67aeb4b1f09dda 
... 
[DEBUG] GitLatestRevisionCommandConsumer consumeLine :  [maven-release-plugin] prepare for next development iteration 
[INFO] Storing revision in 'scm.revision' project property. 
[INFO] Project at revision b5c5fa4e2a0c16d9247ae9261a67aeb4b1f09dda 
... 
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ wix-oss-parents-parent --- 
... 
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-gpg-plugin:1.6:sign' with basic configurator --> 
[DEBUG] (f) ascDirectory = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/gpg 
[DEBUG] (f) defaultKeyring = true 
[DEBUG] (f) interactive = false 
[DEBUG] (f) keyname = *** 
[DEBUG] (f) passphraseServerId = *** 
[DEBUG] (f) project = MavenProject: com.wix:wix-oss-parents-parent:0.25.0 @ /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml 
[DEBUG] (f) settings = [email protected] 
[DEBUG] (f) skip = false 
[DEBUG] (f) useAgent = true 
[DEBUG] -- end configuration -- 
[DEBUG] Generating signature for /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/wix-oss-parents-parent-0.25.0.pom 
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ wix-oss-parents-parent --- 
... 
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-install-plugin:2.4:install' with basic configurator --> 
[DEBUG] (f) artifact = com.wix:wix-oss-parents-parent:pom:0.25.0 
[DEBUG] (f) attachedArtifacts = [com.wix:wix-oss-parents-parent:pom.asc:0.25.0] 
[DEBUG] (f) createChecksum = false 
[DEBUG] (f) localRepository =  id: local 
[INFO]  url: file:///home/builduser/.m2/repository/ 
[INFO] layout: none 
[DEBUG] (f) packaging = pom 
[DEBUG] (f) pomFile = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml 
[DEBUG] (s) skip = false 
[DEBUG] (f) updateReleaseInfo = false 
[DEBUG] -- end configuration -- 
... 
[INFO] Installing /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/0.25.0/wix-oss-parents-parent-0.25.0.pom 
... 
[DEBUG] Installing com.wix:wix-oss-parents-parent/maven-metadata.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/maven-metadata-local.xml 
[INFO] Installing /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/wix-oss-parents-parent-0.25.0.pom.asc to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/0.25.0/wix-oss-parents-parent-0.25.0.pom.asc 
... 
[DEBUG] Installing com.wix:wix-oss-parents-parent/maven-metadata.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/maven-metadata-local.xml 
... 
[INFO] --- nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) @ wix-oss-parents-parent --- 
... 
Configuring mojo 'org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy' with basic configurator --> 
[DEBUG] (f) artifact = com.wix:wix-oss-parents-parent:pom:0.25.0 
[DEBUG] (f) attachedArtifacts = [com.wix:wix-oss-parents-parent:pom.asc:0.25.0] 
[DEBUG] (f) autoDropAfterRelease = true 
[DEBUG] (f) autoReleaseAfterClose = true 
[DEBUG] (f) detectBuildFailures = true 
[DEBUG] (f) mavenSession = [email protected] 
[DEBUG] (f) mojoExecution = org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy {execution: injected-nexus-deploy} 
[DEBUG] (f) nexusUrl = https://oss.sonatype.org/ 
[DEBUG] (f) offline = false 
[DEBUG] (f) packaging = pom 
[DEBUG] (f) pluginArtifactId = nexus-staging-maven-plugin 
[DEBUG] (f) pluginGroupId = org.sonatype.plugins 
[DEBUG] (f) pluginVersion = 1.6.7 
[DEBUG] (f) pomFile = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml 
[DEBUG] (f) serverId = ossrh 
[DEBUG] (f) sslAllowAll = false 
[DEBUG] (f) sslInsecure = false 
[DEBUG] (f) stagingProgressPauseDurationSeconds = 3 
[DEBUG] (f) stagingProgressTimeoutMinutes = 5 
[DEBUG] -- end configuration -- 
... 
[INFO] Performing local staging (local stagingDirectory="/home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/nexus-staging/staging")... 
... 

.m2に関しては、これは、ビルドエージェントです。それは新鮮な.m2を取得します...

アイデア?

答えて

0

Mmhhh ...何かがあなたの説明で、私にはそれほど明確ではない..です

まず私は、この場合には、プロジェクトの構造に問題があるとは思わない...

通常の動作です:

  1. 私はこれが1.0としてタグ付けと折りタグにコミットしている
  2. .. Mavenのリリースプラグインでそれを解放
  3. ..プロジェクト1.0-SNAPSHOTを得ましたえー
  4. その後トランク\ブランチのバージョンが1.1-SNAPSHOTとしてincresedます。..

だから、あなたがトランクバージョンをダウンロードしていると、リモートリポジトリにタグ付けされたバージョンをチェックしているようだ...

これが正しいのでしょうか?

もしそうでなければ、プラグインの実行に関連する何らかの奇妙なバージョンです。あなたはSVNタグをチェックして、そこにpomのバージョンと、タグがコミットされたコメントを教えてください作成した?

二つのコマンドの出力も起こっていただきまし理解するのに役立ち...

緯度の事、多分関連していますが、.m2ローカルリポジトリにアーティファクトをダウンロードしているではないことができ、あなたはそれをきれいにすることができますそしてさらに試みる? .m2が何か変なことをするのは初めてではないでしょう:)

+0

あなたのお返事ありがとうございます。 – Ohad

+0

オハードを助けるのですか?もしそうなら、XD – ivoruJavaBoy

+0

ivoroJavaBoyに投票してください。 あなたが提案したシナリオが正しいとは思わない。 出力の一部は次のとおりです。 [13:10:33] [INFO]リリースを実行するプロジェクトのチェックアウト... [13:10:33] [INFO]実行中:/ bin/sh -c cd/home/builduser/agent03/work/4ae459b9554b762f/target && git clone - ブランチ0.25.0 [email protected]:wix/wix-oss-parents.git/home/builduser/agent03/work/4ae459b9554b762f/target/checkout [情報]作業ディレクトリ:/ home/builduser/agent03/work/4ae459b9554b762f/target ... – Ohad

0

根本原因が見つかりました。 maven scmプラグインのバグ

関連する問題