マルチモジュールの Project Bookstore があります (モジュールの 1 つが WAR です)。一部のモジュールは projectX に依存しています (また、一部の依存関係はその projectX にも依存しています)。モジュール全体で Maven プロパティと依存関係管理を使用して、すべてが同じバージョン (0.0.7-SNAPSHOT) に依存するようにしました。[1] の依存関係分析を参照してください。
projectX と他のいくつかの変更を多数実行したため、リポジトリには projectX のタイムスタンプ付きスナップショットが多数あります。
CI サーバーのデプロイ ジョブ (golas "deploy site:site" に続いて "site:deploy") を実行すると、projectX のスナップショットの複数のタイムスタンプ付きバージョン (各モジュールの 3 つのタイムスタンプ付き - api、core、mail -正確には全部で9つ)。
ゴール パッケージをローカルで実行しても、同じ問題は発生しません。予想どおり、モジュールごとに 1 つのスナップショットのみが war にパッケージ化されます。
Mavenが複数のスナップショットをパッケージ化する理由を知っている人はいますか? それらはすべて
乾杯、
ミゲル・アルメイダ
[1]
[INFO] --- maven-dependency-plugin:2.1:analyze (default-cli) @ bookstore-persist ---
[WARNING] Used undeclared dependencies found:
[WARNING] org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[WARNING] org.company.clinicalmanagement:clinicaltrial-api:jar:1.0.2-SNAPSHOT:compile
[WARNING] org.springframework:spring-tx:jar:3.1.0.RELEASE:compile
[WARNING] org.company.security:security-api:jar:0.0.7-SNAPSHOT:compile
[WARNING] commons-logging:commons-logging:jar:1.1.1:compile
[WARNING] org.apache.struts.xwork:xwork-core:jar:2.3.4:compile
[WARNING] org.company.audit:audit-core:jar:0.1.0-SNAPSHOT:compile
[WARNING] org.company.security:security-core:jar:0.0.7-SNAPSHOT:compile
[WARNING] org.company.security:security-mail:jar:0.0.7-SNAPSHOT:compile
[WARNING] joda-time:joda-time:jar:2.0:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.company:projectX-shared:pom:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-model:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-configuration:jar:1.1.0-SNAPSHOT:test
[WARNING] org.springframework:spring-core:jar:3.1.0.RELEASE:compile
[WARNING] org.slf4j:jcl-over-slf4j:jar:1.5.8:runtime
[WARNING] org.slf4j:slf4j-api:jar:1.5.8:runtime
[WARNING] org.slf4j:slf4j-log4j12:jar:1.5.8:runtime
[WARNING] log4j:log4j:jar:1.2.14:runtime
[WARNING] org.springframework:spring-orm:jar:3.1.0.RELEASE:compile
[WARNING] c3p0:c3p0:jar:0.9.1.2:provided
[WARNING] postgresql:postgresql:jar:9.0-801.jdbc4:provided
[WARNING] javassist:javassist:jar:3.4.GA:compile
[WARNING] javax.servlet:servlet-api:jar:2.4:provided
[WARNING] cglib:cglib:jar:2.2:compile
[WARNING] org.company.security:security:pom:0.0.7-SNAPSHOT:compile
[WARNING] org.company.audit:audit:pom:0.1.0-SNAPSHOT:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bookstore Web 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-dependency-plugin:2.1:analyze (default-cli) @ projectX-web >>>
[INFO]
[INFO] --- buildnumber-maven-plugin:1.0:create (default) @ projectX-web ---
[INFO]
[INFO] --- maven-dependency-plugin:2.1:analyze (default-cli) @ projectX-web ---
[WARNING] Used undeclared dependencies found:
[WARNING] org.company.clinicalmanagement:clinicaltrial-api:jar:1.0.2-SNAPSHOT:compile
[WARNING] org.company.security:security-api:jar:0.0.7-SNAPSHOT:compile
[WARNING] org.hibernate:hibernate-core:jar:3.6.3.Final:compile
[WARNING] org.apache.struts.xwork:xwork-core:jar:2.3.4:compile
[WARNING] org.company.security:security-core:jar:0.0.7-SNAPSHOT:compile
[WARNING] commons-logging:commons-logging-api:jar:1.1:compile
[WARNING] org.company.audit:audit-struts:jar:0.1.0-SNAPSHOT:compile
[WARNING] org.springframework:spring-tx:jar:3.1.0.RELEASE:compile
[WARNING] org.company.audit:audit-core:jar:0.1.0-SNAPSHOT:compile
[WARNING] org.company.security:security-mail:jar:0.0.7-SNAPSHOT:compile
[WARNING] org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.apache.commons:commons-jci-fam:jar:1.0:compile
[WARNING] postgresql:postgresql:jar:9.0-801.jdbc4:test
[WARNING] org.apache.struts:struts2-sitemesh-plugin:jar:2.3.4:compile
[WARNING] org.apache.struts:struts2-config-browser-plugin:jar:2.3.4:compile
[WARNING] org.apache.struts:struts2-spring-plugin:jar:2.3.4:compile
[WARNING] commons-fileupload:commons-fileupload:jar:1.1.1:compile
[WARNING] org.company:projectX-model:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-persist:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company.audit:audit:pom:0.1.0-SNAPSHOT:compile
[WARNING] org.springframework:spring-core:jar:3.1.0.RELEASE:compile
[WARNING] org.springframework:spring-context-support:jar:3.1.0.RELEASE:compile
[WARNING] org.slf4j:jcl-over-slf4j:jar:1.5.8:runtime
[WARNING] org.slf4j:slf4j-api:jar:1.5.8:runtime
[WARNING] org.slf4j:slf4j-log4j12:jar:1.5.8:runtime
[WARNING] log4j:log4j:jar:1.2.14:runtime
[WARNING] c3p0:c3p0:jar:0.9.1.2:test
[WARNING] org.company:projectX-configuration:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-configuration:test-jar:tests:1.1.0-SNAPSHOT:compile
[WARNING] org.company.security:security:pom:0.0.7-SNAPSHOT:compile
[WARNING] org.xhtmlrenderer:core-renderer:jar:R8-final:compile
[WARNING] com.lowagie:itext:jar:2.1.7:compile
[WARNING] org.apache.poi:poi:jar:3.7:compile
[WARNING] com.jgeppert.struts2.jquery:struts2-jquery-plugin:jar:3.0.1:compile
[WARNING] org.company.application.version:application-version:jar:0.0.2:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bookstore-acceptance 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] <<< maven-dependency-plugin:2.1:analyze (default-cli) @ bookstore-acceptance <<<
[INFO]
[INFO] --- maven-dependency-plugin:2.1:analyze (default-cli) @ bookstore-acceptance ---
[WARNING] Used undeclared dependencies found:
[WARNING] org.springframework:spring-beans:jar:3.1.0.RELEASE:compile
[WARNING] org.company.clinicalmanagement:clinicaltrial-api:jar:1.0.2-SNAPSHOT:compile
[WARNING] org.company.audit:audit-struts:jar:0.1.0-SNAPSHOT:compile
[WARNING] org.apache.struts:struts2-junit-plugin:jar:2.3.4:test
[WARNING] org.hibernate:hibernate-core:jar:3.6.3.Final:compile
[WARNING] org.company.security:security-api:jar:0.0.7-SNAPSHOT:compile
[WARNING] org.easymock:easymock:jar:3.0:compile
[WARNING] org.company.systemDate:systemDate:jar:0.0.2:compile
[WARNING] com.lowagie:itext:jar:2.1.7:compile
[WARNING] junit:junit:jar:4.8.2:test
[WARNING] org.springframework:spring-context-support:jar:3.1.0.RELEASE:compile
[WARNING] org.apache.struts.xwork:xwork-core:jar:2.3.4:compile
[WARNING] org.company.clinicalmanagement:clinicaltrial-core:jar:1.0.2-SNAPSHOT:compile
[WARNING] org.company.audit:audit-core:jar:0.1.0-SNAPSHOT:compile
[WARNING] info.cukes:cucumber-core:jar:1.0.9:test
[WARNING] org.company.security:security-core:jar:0.0.7-SNAPSHOT:compile
[WARNING] org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[WARNING] org.company.security:security-mail:jar:0.0.7-SNAPSHOT:compile
[WARNING] info.cukes:cucumber-java:jar:1.0.9:test
[WARNING] Unused declared dependencies found:
[WARNING] info.cukes:cucumber-spring:jar:1.0.9:test
[WARNING] postgresql:postgresql:jar:9.0-801.jdbc4:provided
[WARNING] org.company:projectX-persist:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-persist:test-jar:tests:1.1.0-SNAPSHOT:test
[WARNING] org.company:projectX-configuration:jar:1.1.0-SNAPSHOT:compile
[WARNING] org.company:projectX-configuration:test-jar:tests:1.1.0-SNAPSHOT:compile
[WARNING] c3p0:c3p0:jar:0.9.1.2:test
[WARNING] org.company:projectX-web:jar:classes:1.1.0-SNAPSHOT:test
[WARNING] org.company:projectX-web:test-jar:tests:1.1.0-SNAPSHOT:test
[WARNING] org.apache.struts:struts2-spring-plugin:jar:2.3.4:compile
[WARNING] javax.servlet:servlet-api:jar:2.4:provided
[WARNING] javax.servlet:jsp-api:jar:2.0:provided