Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 918F510759 for ; Sun, 10 May 2015 00:05:13 +0000 (UTC) Received: (qmail 22003 invoked by uid 500); 10 May 2015 00:05:12 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 21908 invoked by uid 500); 10 May 2015 00:05:12 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 21896 invoked by uid 99); 10 May 2015 00:05:11 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 May 2015 00:05:11 +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 563A4C12C9 for ; Sun, 10 May 2015 00:05:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Bskz7UKKlPc0 for ; Sun, 10 May 2015 00:05:01 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 8589F43C96 for ; Sun, 10 May 2015 00:05:00 +0000 (UTC) Received: by pdbqd1 with SMTP id qd1so117000244pdb.2 for ; Sat, 09 May 2015 17:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=vNsibok2Tok7cYWSHIs+WeJn3FBVsXC2wSzSpSLBYtM=; b=LmopH44OOQZRHY4qGimq3wurqQm2BQHb404U74SHYYUskiRbKHBVwQ654bc5Jlm9DD q1uoovY+JEh+BkqmGAQ/y9QTvaf1h7sngxCDLbDqvrB6vssIT+w+qyCQwP4VDt6nIqyU MV+Q8vx9Dp4GIJIr4KsY6dhOy+esyBkxKVhknh8y0n4vOGs4aSIAfYcrffd9rKEuV69t UKWhrCqW58GitQjrxdlpPJlRCTo/VlbKF0A5n7Nn03PfKwup8Kd31hGgjco8C/XT9TL/ X76m9rTyJo2/dWBo3nVQncPR/VtAMu3KvoMdI9T2AJLg35NOrgmI0V7QAG2MU6BzeAnK 9/qA== X-Received: by 10.68.69.45 with SMTP id b13mr7834751pbu.150.1431216209278; Sat, 09 May 2015 17:03:29 -0700 (PDT) Received: from sharpeth.aviatis.com (c-107-3-142-14.hsd1.ca.comcast.net. [107.3.142.14]) by mx.google.com with ESMTPSA id qy2sm8978779pab.5.2015.05.09.17.03.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 May 2015 17:03:28 -0700 (PDT) From: Johannes Ernst X-Google-Original-From: Johannes Ernst Content-Type: multipart/alternative; boundary="Apple-Mail=_D2516A6E-1E29-4507-A0A2-00D80F139A7D" Subject: [WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing. Message-Id: <09F6DDAD-48C7-4CFB-9B62-9A012904AF31@gmail.com> Date: Sat, 9 May 2015 17:03:27 -0700 To: users@maven.apache.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) --Apple-Mail=_D2516A6E-1E29-4507-A0A2-00D80F139A7D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 A couple of days I asked about how to =E2=80=9Croll up=E2=80=9D several = maven projects into a new one, as if the old ones had never existed. = Didn=E2=80=99t get a reply though. Reviewing the source code for AbstractAssemblyMojo, I found that if I = set appendAssemblyId=3Dfalse (default is true, and this @Parameter does not seem to be documented on = the website), I get the behavior I want. Plus the above warning. Here it is in its full glory: [WARNING] Configuration options: 'appendAssemblyId' is set to false, = and 'classifier' is missing. Instead of attaching the assembly file: xxx.jar, it will become the = file for main project artifact. NOTE: If multiple descriptors or descriptor-formats are provided for = this project, the value of this file will be non-deterministic! Which in my case, is entirely unnecessary because I only have one. And I = think my use of the plugin is useful :-) Can I suggest the following modification of the code, in = AbstractAssemblyMojo.execute() boolean warnedAboutMainProjectArtifact =3D false; int numberMainArtifactReplacers =3D 0; for ( final Assembly assembly : assemblies ) { =E2=80=A6 for ( final String format : effectiveFormats ) =E2=80=A6 =E2=80=A6 (long if-then-else) else if ( !"pom".equals( type ) && format.equals( type ) ) { if ( !warnedAboutMainProjectArtifact ) if( numberMainArtifactReplacers > 1 )=20 { =E2=80=A6 emit above warning warnedAboutMainProjectArtifact =3D true; ++ numberMainArtifactReplacers; and perhaps, upgrade the warning to an error because it now only gets = emitted if there indeed will be a conflict. And some documentation on the website that says this can be done. Now, shoot, and tell me what this is a bad idea! :-)=20 Cheers, Johannes. Johannes Ernst Blog: http://upon2020.com/ Twitter: @Johannes_Ernst GPG key: http://upon2020.com/public/pubkey.txt = Check out UBOS, the Linux distro for personal servers: http://ubos.net/ = --Apple-Mail=_D2516A6E-1E29-4507-A0A2-00D80F139A7D--