Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C8721200C3D for ; Tue, 28 Feb 2017 05:54:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C69A2160B7D; Tue, 28 Feb 2017 04:54:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1DD62160B6C for ; Tue, 28 Feb 2017 05:54:49 +0100 (CET) Received: (qmail 13861 invoked by uid 500); 28 Feb 2017 04:54:49 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 13848 invoked by uid 99); 28 Feb 2017 04:54:49 -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; Tue, 28 Feb 2017 04:54:49 +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 8D68BC12C9 for ; Tue, 28 Feb 2017 04:54:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.546 X-Spam-Level: X-Spam-Status: No, score=-1.546 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id uYr1DBUpt70z for ; Tue, 28 Feb 2017 04:54:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 63DC15FB0B for ; Tue, 28 Feb 2017 04:54:47 +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 14997E0A0D for ; Tue, 28 Feb 2017 04:54:46 +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 60EF22413E for ; Tue, 28 Feb 2017 04:54:45 +0000 (UTC) Date: Tue, 28 Feb 2017 04:54:45 +0000 (UTC) From: "Daniel Halperin (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MSHADE-252) shadeSourcesContent is broken when combined with partial relocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Feb 2017 04:54:51 -0000 [ https://issues.apache.org/jira/browse/MSHADE-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15887257#comment-15887257 ] Daniel Halperin commented on MSHADE-252: ---------------------------------------- I was about to file a related issue -- I think this might happen even for regular (non-sources) contents: See a full repro: https://github.com/dhalperi/shading-demo > shadeSourcesContent is broken when combined with partial relocation > ------------------------------------------------------------------- > > Key: MSHADE-252 > URL: https://issues.apache.org/jira/browse/MSHADE-252 > Project: Maven Shade Plugin > Issue Type: Bug > Affects Versions: 2.4.3, 3.0.0 > Reporter: Zhenyu Yang > Labels: easyfix > > per description in https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#shadeSourcesContent, when set it to true, > "it will attempt to shade the contents of the java source files when creating the sources jar." However, it seems will blindly shade all the source files include those are excluded from relocation rules. > This could be illustrated with a simple example: > Assume there are two classes defined in two packages as below: > A.java: > package com.fake.fooA; > import com.fake.fooB; > public Class A {} > B.java: > package com.fake.fooB; > import com.fake.fooA; > public class B {} > and the maven config looks like: > > org.apache.maven.plugins > maven-shade-plugin > 2.4.3 > > > > package > > shade > > > false > true > true > > > com.fake > .com.fake.shaded > > com.fake.fooA.* > > > > Then the shade plugin will modify the B's source file to be: > package com.fake.shaded.fooB; > import com.fake.shaded.fooA; > public class B {} > Notice that package A's path was also updated, which is wrong as it's not got relocated. -- This message was sent by Atlassian JIRA (v6.3.15#6346)