I am setting up my first Maven multimodule project as a working example using the new integration test harness.
I had created the parent project with its pom, pointing to the production great-grandpappy pom that has all the dependencyManagement stuff (external dependencies, versions, etc.)
I had created a child project under the parent project, and made a pom for it pointing to the parent project’s pom.
I had made a <module> entry in the parent pom pointing to the child module, and also a <dependency> entry pointing to the same.
I had done a Maven Install on the parent project, to get it into my local Artifactory repository.
I had done a Maven Eclipse on the child project, bringing in the just-installed parent project and all the dependencies.
Flushed with success, I tried to extend ModuleStarter, one of the classes provided by the pom files. As expected, the class was not recognized, so I Ctrl+Shift+O’d it, but…nothing happened.
What could it be? I pressed Ctrl+Shift+O several more times; looked at the pom files; checked the Referenced Libraries (and yes, the class was there!) …
I spent many minutes on this, until I tried (again) to type out the fully-qualified name of the class I was extending. The red “this did not work” underlining did not go away, but this time I hovered the mouse over the class name to see what the error details were, to wit:
The type ModuleStarter cannot be the superclass of BlahBlah; a superclass must be a class
A different magic word
A superclass must be a class… a superclass must be a class… it took a few moments for the meaning of this to sink in, but then it hit me: ModuleStarter is not a class, it’s an interface. Ha!
So I just had my class say implements instead of extends ModuleStarter, and now Ctrl+Shift+O works again, and peace and happiness have returned to my multimodule project.
*I first played Will Crowther’s Colossal Cave text-based adventure game off of a 5.25″ 360K floppy disk on my family’s 8088 PC, in high school. The influence of this game on me rivals that of Scooby-Doo cartoons in the ’80s! In that game, a common exchange (for me anyway) was:
>xyzzy Nothing happens.