Not a very good title, I'll try and explain.
This has worked for months, then today for some unknown reason, eclipse cant resolve any of the imports from siblings (peer projects), when nothing has changed (really!). No eclipse or eclipse plugin updates, no source code changes, no config changes.
I have a fairly standard project structure:
parent_project -- clild_project_a ---- pom.xml -- clild_project_b ---- pom.xml -- child_project_c ---- pom.xml -- pom.xml (for parent).
Now both project a and b are dependent on the code from c.
project a pom.xml.
<parent>
<artifactId>parent_project</artifactId>
<groupId>com.mydomain.ge</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
...
<dependencies>
<dependency>
<groupId>com.mydomain.ge</groupId>
<artifactId>child_project_c</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
and in the parent pom.xml:
<modules>
<module>child_project_a</module>
<module>child_project_b</module>
<module>child_project_c</module>
</modules>
So now in Eclipse, all the import statements in say project A importing from project c:
package com.skillkash.ge.api;
import com.skillkash.ge.dao.AlreadyExistsException;
This gives:
The import com.skillkash.ge.dao.AlreadyExistsException cannot be resolved.
I tried the follwing:
- doing a maven clean (using right click->run as-> maven clen on all child and parents.
- doing a maven update dependences on all projects
- doing a maven package on each project.
- doing m2 maven->"update project configurations" on all projects.
- restarting eclipse.
- restarting the computer.
Note 1, in eclipse I have 4 separate projects, one for each child, and one for the parent. the three child projects are also checked into SVN, but I cant easily checkin the parent project as it has the child project folders underneath it.
NOTE 2, I know a lot about ant, but am a noob at maven, but havent had any problems with it till now. e.g. Ive no idea if maven is telling eclipse to use the source of the depentant project, or if it has to compile jar constantly into the local m2 repository, and the dependant project uses that.
NOTE 3, all the other (external) dependences are ok.
NOTE 4, Ive checked that "Resolve dependencies from Workspace projects" is checked.
NOTE 5, in the ecipse java build path dialogue, the peer projects on which it is dependent do not seem to be in either "source", "projects" or "libraries" tabs. Libraries has a "maven depedencies" sub tree, but under thare are just external jars like log4j.