Pomless Tycho build in Eclipse with inherited Maven dependencies

Viewed 226

I'm currently working on creating a Maven-Tycho build environment for a relatively large RCP project. The Maven build is already completing successfully, but I'm having trouble removing all the errors from the projects when opening all the sub-projects in the Eclipse IDE. One of the problems that is most common is, that a MANIFEST.MF contains a Require-Bundle line that cannot be found. This is mostly because I'm using the tycho-pomless extension to reduce the number of pom files I need to maintain. So the error that happens is, that it cannot find a dependency in the Manifest, because the project should inherit it from the parent-pom. Because it is a pomless build though, the temporary pom for the project is only existing while building the project with tycho-maven. This means that eclipse does not seem aware of the inheritance of the dependency.

I've created a minimal example HERE.

If you open this workspace with an Eclipse IDE you can see, that there are errors and the following lines in App.java have errors:

import com.github.oxo42.stateless4j.conversion.ParameterConversion;

 ParameterConversion.validate(null,null);

The required dependency is in the parent pom in the root directory of the workspace:

<dependency>
    <groupId>com.github.oxo42</groupId>
    <artifactId>stateless4j</artifactId>
    <version>2.5.0</version>
</dependency>

The dependency is also in the Manifest of module 1, but it cannot be found in the Eclipse IDE.

If you try to build the project with Maven from a shell, you will notice that the dependency inheritance is honored, even without test.module1 having a pom file and the build succeeds.

So the current state is: CLI Maven build is working, but Eclipse IDE cannot resolve the dependencies correctly making development a bit of a mess.

Is there a way around this, or will I just have to create a pom file for those specific modules?

0 Answers
Related