Announcement Announcement Module
Collapse
No announcement yet.
GGTS 3.0.0 - importing mavenized grails project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GGTS 3.0.0 - importing mavenized grails project

    Using GGTS 3.0.0, Grails 2.1.0, Maven 2.2.1, I would like to import a previously mavenized Grails project that uses the pom for dependency and plugin declarations. However, when I navigate to File > Import and am prompted to choose an "import source" Grails is not one of the available types.

    So I choose "existing maven project" as that seems to be the closest to what I've got. Then I get the plugin configurator errors, which I agree to resolve later. Next up is a "Convert to Grails Project" dialog, with the following message:

    "The project foo looks like a Grails Project but... is not configured for use with the STS Grails tools. To fix this problem, the project needs to be converted to an STS Grails Project. Do you want to convert the project now?"

    Well, OK, I can do this - and it all seems to finish successfully. (Sort of... Later I have to tell m2e to ignore the grails-maven-plugin goals that are not supported, but that's another topic.)

    Am I missing something? Why can't I select Grails as the project type to import in the first place?

  • #2
    We haven't put much effort into maven support for grails projects yet. It is one of our goals post 3.0. The reason why you can't import the maven project as a grails project is that our grails importer assumes that the projects it imports has a certain shape. This shape is violated by a mavenized grails project.

    Keep an eye on this issue to track our progress: https://issuetracker.springsource.com/browse/STS-596

    Comment


    • #3
      No, I don't think you are missing anything. The maven/grails scenario really isn't one that we have good support for.
      The STS Grails tools assume that you use Grails, not maven, infrastructure.

      It is a good point that there is no 'import Grails' wizard. The import story in Eclipse is a bit complicated. There so many different ways to 'import' projects:

      - via SCM tools
      - via the 'New Project Wizard'
      - via 'Import Existing projects'

      The 'recommended' way used to be to use the New Project Wizard. But this really unintuitive to most people, so they end up using the 'Import Existing Project' wizard instead. We started to support this by adding a listener that detects when things that 'look like' Grails projects appear in the workspace and offer to configure them, regardless of how they got into the workspace.

      Nowadays we recommend people to import Grails projects using the 'Import Existing Projects' wizard as this the scenario we focussed most of our effort on in development and testing.

      However the question to have a dedicated 'Import Grails Project' wizard has come up a few times and is something that may be worthwhile. (I just don't think adding this Wizard will stop users from getting projects into the workspace via various other workflows :-)

      There is an issue somewhat related to creating such a dedicated wizard here:
      https://issuetracker.springsource.com/browse/STS-1728

      One of the most compelling motivations for creating such a wizard is that some people may delete their .project (and other eclipse metadata) for whatever reason and such projects currently don't have an easy/obvious way to import them.

      Another good reason, of course, is that it is what many people may be looking for when trying to import a Grails project.

      For the maven case however, perhaps it may be good if we support the workflow that you tried, i.e. 'import as maven project' and then make sure that our existing 'configuration helper' that detects grails projects and offers to configure them, actually works well for maven projects.

      Anyway, John, thanks for bringing this up. Let's follow up with the maven/grails discussion in this issue (I see you already found your way there :-)

      https://issuetracker.springsource.com/browse/STS-596

      And if you want to weigh in on the need for a dedicated 'Import Grails' wizard feel free to do so on
      https://issuetracker.springsource.com/browse/STS-1728

      Kris
      Last edited by Kris De Volder; Aug 20th, 2012, 11:48 AM. Reason: grammar, spelling

      Comment


      • #4
        Anything that improves our ability to manage Grails projects with Maven will be most welcome. Improved integration with Maven is probably the most important new feature of Grails 2.1.0. I'm glad to hear that more support for this feature is on the roadmap for GGTS 3.1.+

        Comment

        Working...
        X