Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] webby: Could not locate configuration for maven-war-plugin

You are right. This was webby / m2eclipse-wtp conflict. I was not able to cause Webby to regenerate target/m2e-webby directory with any refresh / clean / build combination, until I've uninstalled m2eclipse-wtp connector.

Afterwards I managed to start my application with webby however it required clean / rebuild/ maven project configuration combo not only on the on web application itself, but also on all of the project providing war overlays. That's not a problem since I was recovering the workspace from an abnormal situation. Later I've removed the projects from workspace, blown away eclipse .settings, .project, .classpath and target directories and reimported them. Everyting built cleanly, cyklotron-webapp/target/m2e-webby/war was created and populated correctly, including overlay content and the application launched with no problems.

When both m2eclipse-wtp & webby were both installed, wtp connector "hijacked" war plugin and no error message revealing lifecycle mapping conflict was given by m2e core, neither while importing projects into workspace or later.

I think such problems should be detected and reported during import & maven project configuration update and reported in the same dialog that missing mappings are. I also think the user should be able to choose one of the conflicting configurators in the import dialog, and possibly change it later through project > Properties > Maven page. I understand that this poses an design problem because it would require remembering this choice on per-project basis, which would introduce third layer of lifecycle mapping configuration over runtime platform and POM hierarchy. Sure enough conflicts of this kind will arise (we just had a conflict between m2e-wtp and pomproperties recently!) and something needs to be done.

Overriding lifecycle mapping through POM is IMO not sufficient - in some cases you import foreign code into your workspace, and it's developers might have no idea / no interest in whatever m2e connectors you are using. You could modify their POMs locally, but when you are working on a team this needs to be done in multiple workspaces. In theory you could fork the foreign project to share customizations across the team, but that can quickly turn into maintenance nightmare... Workspace level lifecycle mapping override seems a convenient alternative, but of course feasibility of each option depends on the size of the team, complexity of the projects etc.

cheers,
Rafał

On 07/05/2011 07:52 PM, Benjamin Bentmann wrote:
Rafał Krzewski wrote:

When I tried running my application I got the follwing error message:
"Specified working directory does not exist or is not a directory:
/home/rafal/workspaces/cyklotron-indigo/cyklotron-webapp/target/m2e-webby"
which is quite correct, because I've blown away the target directory
more than a few times while tweaking module packaging. I'd expect to
Webby to re-create this directory behind the scenes and not bail out
like this.

Yes, that's a sane assumption and this is how Webby generally works. Considering that you have also installed/experimented with m2e-wtp, to me the question is: Does Webby still run at all on your project? For instance, if after a refresh-clean-build cycle on the web project, no target/m2e-webby/war directory shows up at all, that would be a clear indication that Webby, or at least its build relevant part, has been taken out of the game.

By their nature, m2e-webby and m2e-wtp both report to m2e-core that they handle the maven-war-plugin. I currently can't tell what exactly is supposed to happen if two m2e extensions conflict like this.



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



Back to the top