Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] BuildContext null in Mojo when executed from within Eclipse
  • From: Oliver Drotbohm <odrotbohm@xxxxxxxxxx>
  • Date: Wed, 25 Nov 2020 21:57:49 +0000
  • Accept-language: de-DE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o0H/q0H0tkYH6BnlAuuTjnilU7usltFosg4kXmKnvKE=; b=eLTEupNCZ+Ln3seIv+5vmBovHc1bViWT2OdH532JYO9gTEP3vdzA+KPiZe7JTY6qixVtc9cVbQxh2Wj5nDudZywh4mZ3yTZtvPIuW/FUmn/+vuy1pqZkPEefr9KQBckSA77+NKtFtKSP6HKvVfD5GMps8/6EmX9KrsoVdMclNzxVhmqe3It9wJY0xwDJ783ZVJxQ2JRWuQCcNDXdOX6yJVISQZiSYFXvPSJOvS/bfVMqYvKO0c544sRJfXKSZZHFeLxjhtZbP4hjZqkf6i+GTvmcI+jjuLhVBQ1CvOXHpiGTP5+1EoUWUz4c+bQuHi/COeqBq37oPrx2kQTayK9EEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RpqLDWxg6FPY0wq+B8rTE2hcLSTCEQu6vZe2RhjuX9vAob4/AyXS3MwZ5L45FJdV/wzF09AKkM5uGb6uB1+j/iuiZnNv5ftZ0S1z/zQvPuIGMMLykkUONrKBPdsfgujF3dFGCXX6lq3APaxu45o+DNn7MHqtO0L8w6uLgPm/5q7UV380NtQm/RZUaYf/yYckAmMILSBj7qexwNF4tm3jnQ+z3yRbEGNJlsUoUywxqL+3E5A0c1wKaflcAQmtTl/3WR3u42xeMVXgiiwY4yPm1nu+/kzb2UOSwS3X5e9Onoe1Xw8MilKGt7+ZfBJXJGYInq3uBwvRfUTFDnq1yNp+uA==
  • Delivered-to: m2e-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/m2e-dev>
  • List-help: <mailto:m2e-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/m2e-dev>, <mailto:m2e-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/m2e-dev>, <mailto:m2e-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHWw2godZyjSkfbBUiWTlwqJ49jX6nZZTUA
  • Thread-topic: [m2e-dev] BuildContext null in Mojo when executed from within Eclipse

Thanks for the quick feedback Michael. I am monkey patching the ByteBuddy Maven plugin. So I am not sure I'll be able to create minimal reproducing example, just because of my inexperience of coding Maven plugins in the first place. That said, I can get my tweaks to work by disabling the Maven Workspace resolution which in my particular case flips some dependencies that are both dependencies of the project *and* the plugin setup from project dependency to artifact dependency.

I see the BuildContexts properly injected when using artifact dependencies but not injected when using the workspace resolution. Maybe that helps to think of a place in the m2e code that could cause this? I don't think regular users of the Maven plugin will run into this situation, so I probably rather fall back to unoptimized execution in case BuildContext is null for now.

Thanks,
Ollie

> Am 25.11.2020 um 21:17 schrieb Mickael Istria <mistria@xxxxxxxxxx>:
> 
> 
> Hi,
> 
> On Wed, Nov 25, 2020 at 9:04 PM Oliver Drotbohm <odrotbohm@xxxxxxxxxx> wrote:
> Anything obvious I am missing that could cause this?
> 
> Nothing obvious to me. The BuildContext is supposed to be injected by m2e into the container when running the mojo in incremental build. We'd need to debug m2e to find out at which point of this expected execution, something is broken or the buildContext becomes null.
> It could be a bug. (although I believe, or at least I strongly hope. this case is already covered by some tests). Please open a new bug report with a minimal project and minimal steps to reproduce the issue. Ideally, providing the code of a basic mojo consuming BuildContext and configured for incremental build and a basic project consuming it.
> 
> Thanks in advance,
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eclipse.org%2Fmailman%2Flistinfo%2Fm2e-dev&amp;data=04%7C01%7Codrotbohm%40vmware.com%7C26fdb7b17de5402c43b508d8917f4808%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637419323172301728%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z%2Bes4Z5ueubSLuJ%2BuAOpZrQnLaxikuhlNPuP9WA2j6I%3D&amp;reserved=0

Attachment: signature.asc
Description: Message signed with OpenPGP


Back to the top