Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] WTP and Multi-module project woes.

Hello,

We do not have a JAR type project that depends on a WAR type project. In fact, it's the other way around, exactly how you describe it. I'm sorry if this wasn't clear from my earlier description.

Our project layout looks a bit like this (simplified names and reduced amount of modules to improve readability):

parent-project (type=POM)
 +- domain-entities (type=JAR)
 +- util (type=JAR)
 +- ejb (type=EJB)
 +- internal-webservices (type=WAR)
 +- external-webservices (type=WAR)
 +- distributable (type=EAR)

Both of the WAR projects have the JAR projects as dependencies, etc.

The issue that I've been describing in this mail-thread relates to Eclipse reporting compilation problems in the modules "internal-webservices" and "external-webservices" (as described in my previous e-mails).

One thing of interest is that some time ago, we had all of these projects as separate, stand-alone Maven projects (as opposed to all of them combined in one multi-module project). The reported issue did not occur then (although the projects were increasingly hard to maintain, which is why migrated to one multi-module project).

Regards,

  Guus


On 15 February 2011 17:44, Asaf Mesika <asaf.mesika@xxxxxxxxx> wrote:
Why do you have a JAR type project which depends on a WAR type project?

Why not externalize the shared classes to another JAR (lets say core) project, and have both the war and jar projects depend on it?

Makes things simpler.


On Tue, Feb 15, 2011 at 5:49 PM, Guus der Kinderen <guus.der.kinderen@xxxxxxxxx> wrote:
Hi Igor,

I have a multi-modules project in Eclipse. Two of the modules in that project are of type 'war.' Most other modules are of type 'jar' (although there's one 'ejb').

I've imported the project through the Maven SCM integration plugin ("Check out as Maven project"). This gives me several Eclipse projects: one for the parent project, and one for each of the modules.

Apart from both "war" modules, all projects are problem-free, in a sense that all of the code can be build by Eclipse. The projects that refer to the "war" modules on the other hand, are full of compilation problems. By looking at Eclipses problem view, I can easily determine that by for the most (if not all) of the problems relate to "missing" classes that should have been provided by the Maven dependencies of the module. (I would see similar problems if I would simply have removed everything in <dependencies /> of the modules POM).

If I build the parent project through the command line (mvn clean compile), everything works as expected (no compilation problems in any of the modules, not even in the "war" modules). I have not tried compiling through the Eclipse context menu as you asked (I've re-installed most plugins now, which makes this impossible to do right now. If you want me to, I'd be happy to revert to my old workspace settings and try).

For arguments sake, I tried changing the type of the "war" modules. If I change the <type> definition in the POMs of the "war" modules from 'war' to 'jar', Eclipse rebuilds and all compilation problems disappear.

To summarise:
  • the observed behaviour is: Eclipse fails to compile code in the "war" modules, even though the dependencies are defined correctly.
  • The expected behaviour: Eclipse should be able to compile code in the "war" modules.
I'd be happy to provide additional details if you would like to see those.

Regards,

  Guus



On 15 February 2011 16:20, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
"dependencies of WAR-typed modules appear to be messed up" does not
provide enough information to be able to help you troubleshoot the problem.

* What are you trying to do ("start wtp tomcat server",
"run-as->maven-install", etc)?
* What is expected behaviour?
* What is the observed behaviour?

--
Regards,
Igor


On 11-02-15 08:53 AM, Guus der Kinderen wrote:
Hello,

Using my combination of Eclipse, M2Eclipse and the WTP extra, a pretty
annoying problem pops up. For all of our multi-module projects, the
dependencies of WAR-typed modules appear to be messed up, while
"workspace resolution" is enabled (removing the <type>war</type>
declaration from their pom resolves the problem immediately). Compiling
the code from the command line works fine, which leads me to believe
that m2eclipse is a contributing factor in this problem.

I've found several JIRA issues that all appear to relate to similar issues:

   * http://jira.codehaus.org/browse/MNGECLIPSE-1224
   * http://jira.codehaus.org/browse/MDEP-259
   * http://jira.codehaus.org/browse/MWAR-192

in MWAR-192 Eugene Kuleshov appears to indicate that using a WTP
integration should prevent this problem from occurring. I /am/ using WTP
integration, but I'm experiencing an issue. Where does this go wrong,
and more importantly: is there a way to work around it?

Related version information:

   * Eclipse Helios SR1
   * Maven Integration for Eclipse (Required) 0.12.1.20110112-1712
   * Maven Integration for WTP (Optional) 0.11.1.20101108-1810

User odin_ on irc.codehaus.org <http://irc.codehaus.org> / #m2eclipse

suggested that I first uninstall all Maven-related plugins from Eclipse,
and then reinstall them. I did (which gave me the exact same versions of
both plugins) but this did not resolve our issue.

What is going on here? Can this issue be prevented in such a way that:

   * our Eclipse projects appear as compliation-problem free, and;
   * does not require me to explain to all of my co-workers that they
     have to install all modules in their local repository for these
     projects to work?

Regards,

  Guus



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


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



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



Back to the top