[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] <runOnConfiguration> and copying resources
|
On Oct 19, 2012, at 4:24 AM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> Your maven plugin is expected to only add new source root and do nothing
> else during import/configuration. All source code generation should
> happen during normal full/incremental build.
So how do I tell from my plugin that it's project import/configuration and not a normal full/incremental build?
Steve
>
> --
> Regards,
> Igor
>
> On 12-10-19 12:56 AM, Steven Bethard wrote:
>> On Oct 18, 2012, at 9:16 PM, Steven Bethard <steven.bethard@xxxxxxxxxxxx> wrote:
>>> The problem seems to be that resources:resources isn't copying anything over during project import/configuration.
>>
>> Ok, after some more debugging, I conclude that this is intentional, since <runOnConfiguration> is not set to "true" for the "maven-resources-plugin":
>>
>> http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.lifecyclemapping.defaults/lifecycle-mapping-metadata.xml
>>
>> So I can't even collect the input files that I should be checking with BuildContext.hasDelta because:
>> * I have to load the TypeSystem to find all the input files
>> * Loading the TypeSystem with an incomplete classpath will result in errors
>> * The classpath is incomplete because maven-resources-plugin has not copied the resources
>>
>> Is there some other way to tell that I'm in the project import/configuration phase? Here's a horrible hack that seems to work:
>>
>> if (this.buildContext instanceof ThreadBuildContext
>> && ThreadBuildContext.getContext().getClass().getName().equals(
>> "org.eclipse.m2e.core.internal.builder.EclipseEmptyBuildContext")) {
>> return;
>> }
>>
>> Is there something nicer than this?
>>
>> Steve
>> _______________________________________________
>> 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