Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Refresh another Project from a m2e configurator

Thanks a ton, that worked great :-) Used the below snippet.

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();

//refreshing all changed projects
for(String refreshableProjectName: refreshableProjectNames){
IProject refreshableProject  = root.getProject(refreshableProjectName);
if(refreshableProject!= null){
refreshableProject.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
}


On Thu, Nov 13, 2014 at 12:35 PM, Anton Tanasenko <atg.sleepless@xxxxxxxxx> wrote:
Hi,
If you already have an m2e connector, which is an eclipse plugin, then you should be able to use standard eclipse IResource#refresh() api from your project builder.


2014-11-13 8:50 GMT+02:00 CoderPlus Team <admin@xxxxxxxxxxxxx>:
Hi all,
I have a very non-standard internal maven plugin which generates sources in other projects. I mean when I execute that specific plugin goal on ProjectA, it generates sources in Project B. I managed to create an m2e connector which can handle the lifecycle and generate the sources properly, but the generated sources in ProjectB doesn't show up unless I do a manual refresh

Is there a way to automatically refresh ProjectB once the plugin goal is executed on ProjectA. I tried using the BuildContext.refresh(..), but it seems that can only refresh directories within the same project.

Thanks,
Aneesh

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev



--
Regards,
Anton.

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top