Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Scanning for changed files in a m2e compatible Maven plugin

But the problem is that when building from command-line,
DefaultBuildContext will not help me optimize the build so the plugin
is only executed when there have been changes to the sources since the
last CLI execution. The end result will be that the maven plugin is
fully executed for every CLI build. Not good if it takes a long time
to execute and there is no need to execute it.
Or am I missing something?

/Anders

On Thu, Aug 2, 2012 at 5:34 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> No, you just use BuildContext. DefaultBuildContext is used when the
> build runs on command line and m2e will inject workspace-aware
> implementation when the build is invoked as part of workspace build.
>
> --
> Regards,
> Igor
>
>
> On 12-08-02 11:22 AM, Anders Hammar wrote:
>>
>> I'm trying to make the JAXB Maven Plugin of Codehaus Mojo compatible
>> with m2e as outlined in [1].
>>
>> I'd like the plugin to skip execution when there are no changes to the
>> sources even when run from command-line (which there is already
>> support). Hoping to be able to use the BuildContext features for this,
>> I see that the DefaultBuildContext implementation does not support
>> this (it will always say all files are newly created).
>>
>> So, my question is, do I need to implement two different code logics
>> to decide if the sources have changed? I.e., when
>> BuildContext.isIncremental() returns true I can use BuildContext, but
>> when it returns false I have to implement some other logic.
>>
>> /Anders
>>
>> [1] http://wiki.eclipse.org/M2E_compatible_maven_plugins
>> _______________________________________________
>> m2e-dev mailing list
>> m2e-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>>
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top