Results 1 to 5 of 5

Thread: Importing Gradle project error

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    9

    Default Importing Gradle project error

    Hi, I'm new to Gradle, and I need to convert an existing Java with an ant build file to Gradle. I wrote a build.gradle for it and now trying to import Gradle Project through MyEclipse with STS Gradle Integration loaded. After running Build Model, it gives the error: At least one project must be selected to import. And I don't see any project listed in the Project, Description panel.

    This a single project and the build.gradle does not have mutli-project definition in it.

    Does it need to be a multi-project for Import Gradle Project to work? Can someone tell me what I'm missing?

    Thanks!
    Ngan

  2. #2
    Join Date
    Mar 2010
    Posts
    9

    Default

    I tested on a smaller project and it gave the same error. But when I rearranged the project into multi-project structure, rewrote the build.gradle and included settings.gradle, Importing Gradle project worked.

  3. #3
    Join Date
    May 2010
    Posts
    398

    Default

    > Does it need to be a multi-project for Import Gradle Project to work?

    Shouldn't have to be. I've worked with non-multi project samples before and had no problems.

    > I tested on a smaller project and ...

    Do you still have this small project? If you can attach a zip file and some instructions on how you try to import it I can take a look and maybe figure out why it isn't working. Could be it is a bug in the tools that I need to fix.
    Kris De Volder -- SpringSource

  4. #4
    Join Date
    Mar 2010
    Posts
    9

    Default

    From MyEclipse or Eclipse, File->Import->Gradle Project, hit next, browse to Root folder of the project, hit Build Model.

    How do you attach a zip file here?

  5. #5
    Join Date
    May 2010
    Posts
    398

    Default

    Sorry for the long delay in responding. Holliday break :-) Happy new year :-)

    It looks like you cannot attach zip files from the 'quick reply'. You need to click on the 'Go Advanced' button at the bottom of the quick reply. There is a way to attach files there.

    By the way, there is a sample non-multiproject project that you can try out that *should* work. At least it works for me. Maybe looking at this may help figuring out what about your sample is different that is causing trouble for the tools.

    To create the sample go to "File >> New >> Project"
    Select "Gradle Project"
    Click "Next"

    Type a name for your project like 'simple-sample'.
    Select "Java Quickstart" for "Sample Project".
    Click "Finish".

    The sample project will be created and imported.
    Kris De Volder -- SpringSource

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •