Announcement Announcement Module
No announcement yet.
issues moving multimodule maven project from 2.9.2/3.1.0 workspace to 3.2.0 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • issues moving multimodule maven project from 2.9.2/3.1.0 workspace to 3.2.0

    I have a multimodule maven project that I've imported and set up successfully under both STS 2.9.2 as well as in 3.1.0. However, when I copy this project to a new workspace that I set up specifically to use with the new STS 3.2.0 I get the dreaded "Cannot resolve the name 'repository:repository' to a(n) 'type definition' component." . There are a top parent project, an API and children projects that inherit dependency versions and such from the parent.

    I've followed advice on this issue at Stackoverflow, but it seems this issue will stick no matter what I do. If I go to my old workspace from STS 3.2.0 the same project opens and builds without issues.

    Any suggestions on what kind of issue I might have here? I'll do a file comparison next on everything, but I haven't really changed that much, at least not intentionally.

  • #2
    I am not familiar with this problem, but it would be good to get some more data. What happens if you try the build from the command line? Also, what version of m2e are you running in your new and old STS? Go to Help -> About STS -> Installation details.

    It is possible that the different versions of m2e are behaving differently. So, it would be good to know if you can successfully compile on the command line. Lastly, make sure to record which version of maven you are using on the command line and embedded in your STS (go to Preferences -> Maven -> Installations).


    • #3
      It builds from the command line and tests run green. Comparing to the old workspace I noticed that somehow the Spring nature had been lost. I copied the project folders with everything including project settings, but I may have ran mvn clean and not cheching to restore spring nature inside STS. Anyway, I restored Spring nature and still had this issue until I did a clean rebuild. Problem gone now.

      I think it would be good if STS noticed a lack of Spring nature in a project referencing Spring. Perhaps I should search and see if there is a feature request already.


      • #4
        Hmmm...the m2e Spring project configurator looks for a spring-core dependency and if it finds one, it automatically adds the nature. Or at least that is the way that it *should* work. Or perhaps your project only has an indirect dependency on spring-core?


        • #5
          Well, all of them that do have spring dependency have it explicitly. Btw, the parent pom is in a sibling folder, not in the parent folder.