Rough Project structure is as follows:
Parent module
<groupId>groupId</groupId>
<artifactId>Module-Parent</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Parent Project</name>
<modules>
<module>Module1</module>
<module>Module2</module>
<module>PluginModule3</module>
</modules>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
PluginProject pom.xml
<parent>
<groupId>groupId</groupId>
<artifactId>Module-Parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>PluginProject</artifactId>
<name>Plugin Project</name>
<packaging>eclipse-plugin</packaging>
<dependencies>
<dependency>
<groupId>Module2groupID</groupId>
<artifactId>module2</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
// tycho dependencies included
Now since the packaging of the parent and sub-module are different. I am not able to refer the parent classes in my code using eclipse and the maven dependencies/libraries are also not considered. However I am able to build all the modules successfully using maven and Tycho respectively (if I don't refer any classes from parent project).
All the libraries related to Maven are getting removed by itself from the build path of the plugin-project as soon as the eclipse-pluginentry added in sub module pom.xml.
Please help me how to resolve my parent class references in my plugin-project.