Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] [m2e-users] Get error "Project configuration is not up-to-date with pom.xml"

Use AbstractProjectConfigurator#hasConfigurationChanged then.

Btw, even with m2e extension you can map the maven plugin to <execute>
during full build without writing any java code.

--
Regards,
Igor

On 12-10-18 11:00 PM, Zhang, Xueqian wrote:
Igor,

Unfortunately I do not control the plugin, it is developed by another team. So I still want to get ride of it by modifying my configurator.

Thanks,
Chandler
________________________________________
From: m2e-dev-bounces@xxxxxxxxxxx [m2e-dev-bounces@xxxxxxxxxxx] on behalf of Igor Fedorenko [igor@xxxxxxxxxxxxxx]
Sent: Friday, October 19, 2012 10:14 AM
To: m2e-dev@xxxxxxxxxxx
Subject: Re: [m2e-dev] [m2e-users] Get error "Project configuration is not up-to-date with pom.xml"

If you control the plugin, I would recommend embedding <execute> mapping
metadata in the plugin itself, as described in [1]. This way you users
will not need to install any additional m2e extensions. I am not sure if
m2e will create configuration change errors in this case, but I think it
should not.

[1] http://wiki.eclipse.org/M2E_compatible_maven_plugins

--
Regards,
Igor

On 12-10-18 10:29 AM, Zhang, Xueqian wrote:
Here’s my scenario:

I have a maven plugin developed by ourselves, which I only want to be
executed in an eclipse FULL_BUILD. I implemented a configurator and
build participant to control this. I saw the error when I modified the
content of ‘<configuration>’ element of the maven plugin in pom.xml.

I think I can avoid this error simply by overriding the
AbstractProjectConfigurator#hasConfigurationChanged method. However, I
want to know whether this is a best practice? When should I return true
or false for this method?

Thanks,

Chandler

*From:*Fred Bricon [mailto:fbricon@xxxxxxxxx]
*Sent:* Thursday, October 18, 2012 6:29 PM
*To:* Zhang, Xueqian; Maven Integration for Eclipse developers mailing list
*Subject:* Re: [m2e-users] Get error "Project configuration is not
up-to-date with pom.xml"

You need to
override AbstractProjectConfigurator#hasConfigurationChanged(IMavenProjectFacade, ILifecycleMappingConfiguration,
MojoExecutionKey, IProgressMonitor)

#mavenProjectChanged is invoked whenever the pom.xml or the project
dependencies change, so you can perform some configuration modifications
on your project accordingly.

I'm moving this thread to the m2e-dev list, which is more appropriate to
discuss m2e API usage.

HIH

Fred Bricon

On Thu, Oct 18, 2012 at 11:03 AM, Zhang, Xueqian <xueqzhang@xxxxxxxx
<mailto:xueqzhang@xxxxxxxx>> wrote:

Hi,

I implemented an m2e connector for my own maven plugin. In my
configurator, I extended the 'AbstractProjectConfigurator' and only
implemented the 'getBuildParticipant' to return my participant.
However, when I modified some configurations of this maven plugin in
pom.xml, I got the error 'Project configuration is not up-to-date with
pom.xml'.

Is there any other methods I should implement? I debugged the m2e source
code and found that there was a method 'mavenProjectChanged' in
configurator. Should I implement it? What is the correct logic of this
method?

Thanks,
Chandler


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
"Have you tried turning it off and on again" - The IT Crowd



_______________________________________________
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
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top