From dev-return-49571-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Mon Feb 11 19:19:14 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 58C5E180669 for ; Mon, 11 Feb 2019 20:19:14 +0100 (CET) Received: (qmail 43367 invoked by uid 500); 11 Feb 2019 19:19:13 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 43357 invoked by uid 99); 11 Feb 2019 19:19:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2019 19:19:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E44EAC22F7 for ; Mon, 11 Feb 2019 19:19:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YRcRWvPU0vQy for ; Mon, 11 Feb 2019 19:19:10 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 8C4D76244A for ; Mon, 11 Feb 2019 19:09:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A77D2E277D for ; Mon, 11 Feb 2019 19:09:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 385B02447C for ; Mon, 11 Feb 2019 19:09:00 +0000 (UTC) Date: Mon, 11 Feb 2019 19:09:00 +0000 (UTC) From: "Mark Adamcin (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (JCRVLT-331) Mismatch in content-package lifecycle mapping for generate-metadata goal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Mark Adamcin created JCRVLT-331: ----------------------------------- Summary: Mismatch in content-package lifecycle mapping for generate-metadata goal Key: JCRVLT-331 URL: https://issues.apache.org/jira/browse/JCRVLT-331 Project: Jackrabbit FileVault Issue Type: Improvement Components: package maven plugin Affects Versions: package-maven-plugin-1.0.3 Reporter: Mark Adamcin The GenerateMetadataMojo class `@Mojo` annotation defines a defaultPhase of "prepare-package", which seems appropriate for the behavior of the mojo, which includes processing embeds. However, the lifecycle-mapping for the `content-package` packaging type included in the plugin attaches the generate-metadata goal to the `process-classes` phase. This results in odd behavior in a multi-module project when the execution phase specified for a build is prior to `package`, like `test`. When the filevault plugin is configured to embed a dependency built by another module in this situation, it will try to embed the classes directory of that module, since `process-classes` phase is active, but the `package` phase will not be reached. This error I reached during a `mvn test -B` execution offers a clue to the symptom. In this case, having TWO such embeds introduces a filter path collision because the final artifact name of both modules is reduced to `target/classes`: {code:java} [INFO] --- filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) @ oakpal-aem-interactive-apps --- [INFO] Embedding --- Embedded: groupId=net.adamcin.oakpal,artifactId=oakpal-core,type=,classifier=,filter=true,excludeTransitive=false,target=/apps/oakpal-interactive/install/ --- [INFO] Embedding net.adamcin.oakpal:oakpal-core:jar:1.1.14-SNAPSHOT (from /home/travis/build/adamcin/oakpal/core/target/classes) -> jcr_root/apps/oakpal-interactive/install/classes [INFO] Embedding --- Embedded: groupId=net.adamcin.oakpal,artifactId=net.adamcin.oakpal.interactive,type=,classifier=,filter=true,excludeTransitive=false,target=/apps/oakpal-interactive/install/ --- [INFO] Embedding net.adamcin.oakpal:net.adamcin.oakpal.interactive:jar:1.1.14-SNAPSHOT (from /home/travis/build/adamcin/oakpal/aem/net.adamcin.oakpal.interactive/target/classes) -> jcr_root/apps/oakpal-interactive/install/classes [INFO] using meta-inf/vault from /home/travis/build/adamcin/oakpal/aem/interactive-apps/src/main/META-INF/vault [INFO] Loading filter from /home/travis/build/adamcin/oakpal/aem/interactive-apps/src/main/META-INF/vault/filter.xml [INFO] Merging inline filters. ... ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 35.480 s [INFO] Finished at: 2019-02-11T18:00:04Z [INFO] Final Memory: 50M/621M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) on project oakpal-aem-interactive-apps: Execution default-generate-metadata of goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata failed: Merging of equal filter roots not allowed for: /apps/oakpal-interactive/install/classes -> [Help 1]{code} This issue theoretically affects the plugin for all execution phases between `process-classes` and `prepare-package` (inclusive), but the problem is greatest for executions up to the `test` phase, since the other phases in this range are usually not executed across a multimodule project. A patch will be attached to correct the lifecycle mapping mismatch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)