Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Question about including sibling dependency(Question about including sibling dependency)
Question about including sibling dependency [message #532920] Tue, 11 May 2010 15:03
Eric is currently offline EricFriend
Messages: 2
Registered: May 2010
Junior Member
Hi,

I have two projects defined under a parent project. It uses the Eclipse "flat-style" where the parent project and the children are all defined at the same folder level (I'm not sure if that matters, but I just wanted to point it out.)

Anyway, one child project references the classes from the other child. The problem that I'm experiencing is in Eclipse, all of the places where there is an import to a class from the other child project, the compilation is failing. However, if I make the dependency to the sibling project "provided" then Eclipse finds everything fine.

So, it is like this:

a) parent-project
b) child-project #1
- Class A
c) child-project #2
- Class B - imports Class A
- pom.xml - refers to child-project #1 (compile)

This causes Eclipse to show that Class B cannot find Class A.

Now, if I change the pom.xml to refer to child-project #1 using "provided", then Eclipse compiles correctly. But, of course, I want to put the JAR from project #1 into project #2, so provided won't work.

One other note... if I compile via the command line, everything works fine using compile or provided.

Does anyone know why this would be different?

Thanks in advance,
Eric
Previous Topic:m2eclipse fails to go through HTTP proxy
Next Topic:Getting started with Tycho?
Goto Forum:
  


Current Time: Thu Apr 25 04:37:23 GMT 2024

Powered by FUDForum. Page generated in 0.02537 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top