Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] War overlays in m2e-wtp with workspace projects - is it possible?

Joakim Erdfelt suggested that maybe the integration should be between m2e and the maven-war-plugin (which is used by jetty plugin). And, in fact, this may be correct. As far as I know this integration isn't perfect either. For instance, if you try to run the "package" goal inside Eclipse on the project I attached you'll get an error saying projectB shouldn't be a directory.


Webby seems like a good bet, but still needs some work (namely, the ability to parse and configure more options of the jetty-plugin, such as jettyXmlCfg. I'm investigating the https://github.com/sonatype/m2eclipse-webby to see how hard it would be to incorportate those changes.


Miguel

On Tue, Jan 15, 2013 at 2:28 PM, Fred Bricon <fbricon@xxxxxxxxx> wrote:
the jetty plugin doesn't seem overly multi-module friendly (http://jira.codehaus.org/browse/JETTY-1517)
It seems that, without hacking some extraClasspath attribute AND having to install the dependencies in the local repo first, maven-jetty-plugin is unable to support projects from the maven reactor. Given that workspace projects behave more or less like project reactors, it won't work in eclipse.

For jetty:run to work in eclipse, *some* process would have to execute the project installation / assembly first, replace m2e's file reference (currently the target/classes folder) in the Artifact instance used by the jetty plugin, then the jetty plugin would unzip the binary to do its thing. Seems preposterous right? A more elegant approach would probably be to inject some extraclasspath magic dust into jetty  when invoking jetty:run

If Jesse doesn't want to make his plugin support workspace projects, somebody will have to step up and do the work. The best place to strenghten the bridge between m2e and jetty would probably be webby at the moment. Or a new m2e-jetty integration plugin. Not m2e core, not m2e-wtp.

Currently, your best chance is probably to forget jetty:run in eclipse and either use webby or m2e-wtp, whichever works best for your use case.


On Tue, Jan 15, 2013 at 2:18 PM, Miguel Almeida <migueldealmeida@xxxxxxxxx> wrote:
Fred,



On Tue, Jan 15, 2013 at 12:23 PM, Miguel Almeida <migueldealmeida@xxxxxxxxx> wrote:


Your problem *may* be caused by the jetty plugin not supporting the workspace projects exposed by m2e. Finding out would require debugging jetty:run. have you asked the jetty plugin maintainers?
Trying on IRC (I'm asking Jesse), I might also try the mailing list. But I take it it's a long shot. How or in what path are the workspace projects exposed by m2e in? I take it that the plugin doesn't like workspace projects very much, as when I run jetty:run-war it'll be expecting a jar/war dependency and complain about the workspace project dependency [1]

As Jesse McConnell points out, "that is something the jetty plugin will never do, it is intended to run on the command line and not care about editors or workspaces".
What I don't understand is why m2e (or m2e-wtp) is failing to expose the overlay's resources to the warTest classpath.



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




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

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



Back to the top