Lucene - Core
  1. Lucene - Core
  2. LUCENE-5043

Eclipse project name change - autogenerated

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.4, 6.0
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The eclipse project name (created by 'ant eclipse') for most of the 4.x versions comes up as "lucene_solr_branch_4x" ... which causes a few problems. Recently I needed to take a look at a particular class in Solr 4.2.1, 4.3.0, and branch_4x. I couldn't load all three projects into Eclipse at the same time, because they have the same project name. Even if I could have, it would have been very confusing. I would like to improve this situation for the future.

      I have a couple of ideas right up front, both of which seem like reasonable ways to go:

      1) Use the directory name, similar to what IntelliJ Idea does.
      2) Use the "fakeReleaseVersion" property in the central build.xml.

      1. LUCENE-5043.patch
        3 kB
        Shawn Heisey
      2. LUCENE-5043.patch
        1 kB
        Shawn Heisey

        Activity

        Hide
        Shawn Heisey added a comment -

        The first option has an advantage over the second - you could have multiple copies of the same version (such as trunk) imported into eclipse at the same time. It would be easier to work on more than one issue without juggling projects. For that reason, I would prefer that option.

        I did wonder what happens if you change a project name outside of eclipse, so I tried editing .project. Eclipse doesn't notice the change, even if you shut it down and restart it. I don't think that will be a disadvantage for option 1, because the only way the project name would change is if you move the project or rename the directory, in which case you'd have to re-import it into eclipse anyway.

        Show
        Shawn Heisey added a comment - The first option has an advantage over the second - you could have multiple copies of the same version (such as trunk) imported into eclipse at the same time. It would be easier to work on more than one issue without juggling projects. For that reason, I would prefer that option. I did wonder what happens if you change a project name outside of eclipse, so I tried editing .project. Eclipse doesn't notice the change, even if you shut it down and restart it. I don't think that will be a disadvantage for option 1, because the only way the project name would change is if you move the project or rename the directory, in which case you'd have to re-import it into eclipse anyway.
        Hide
        Robert Muir added a comment -

        I dont understand the issue, when i want to use eclipse i always do this:
        1. svn co https://svn.apache.org/repos/asf/lucene/dev/trunk lucene-XXXX
        2. cd lucene-XXXX; ant eclipse
        3. File->New Java Project->lucene-XXXX

        I have many of these open at a time, with the name i chose (the directory name)

        Show
        Robert Muir added a comment - I dont understand the issue, when i want to use eclipse i always do this: 1. svn co https://svn.apache.org/repos/asf/lucene/dev/trunk lucene-XXXX 2. cd lucene-XXXX; ant eclipse 3. File->New Java Project->lucene-XXXX I have many of these open at a time, with the name i chose (the directory name)
        Hide
        Shawn Heisey added a comment -

        I use File->Import... and use the "Existing Projects into Workspace" type under General.

        Show
        Shawn Heisey added a comment - I use File->Import... and use the "Existing Projects into Workspace" type under General.
        Hide
        Robert Muir added a comment -

        I think that causes the trouble, just do new project, and when you give it lucene-XXXX which is a folder already in the workspace, it sees its already setup and uses it with that name.

        Show
        Robert Muir added a comment - I think that causes the trouble, just do new project, and when you give it lucene-XXXX which is a folder already in the workspace, it sees its already setup and uses it with that name.
        Hide
        Shawn Heisey added a comment -

        That never occurred to me ... I wasn't making a new project, I was using an existing one. Although it's a great workaround, I think we still should fix what 'ant eclipse' puts in for the project name.

        Show
        Shawn Heisey added a comment - That never occurred to me ... I wasn't making a new project, I was using an existing one. Although it's a great workaround, I think we still should fix what 'ant eclipse' puts in for the project name.
        Hide
        Shawn Heisey added a comment -

        Patch against trunk. This changes the eclipse target so it gives the eclipse project the same name as its containing directory.

        Show
        Shawn Heisey added a comment - Patch against trunk. This changes the eclipse target so it gives the eclipse project the same name as its containing directory.
        Hide
        Uwe Schindler added a comment -

        Nice idea. Patch looks good.
        This helps me, as I have multiple checkouts of the same branch next to each other. This makes them have a good name.

        Show
        Uwe Schindler added a comment - Nice idea. Patch looks good. This helps me, as I have multiple checkouts of the same branch next to each other. This makes them have a good name.
        Hide
        Steve Rowe added a comment -

        +1

        Show
        Steve Rowe added a comment - +1
        Hide
        Shawn Heisey added a comment -

        Updated patch, with CHANGES.txt and some additional tweaks recommended by Uwe.

        I added UTF-8 encoding to the filtered file copy, and found other places where files were being filtered without encoding. I did change one instance where it was already specified - it had the outputencoding parameter, which isn't really necessary.

        Show
        Shawn Heisey added a comment - Updated patch, with CHANGES.txt and some additional tweaks recommended by Uwe. I added UTF-8 encoding to the filtered file copy, and found other places where files were being filtered without encoding. I did change one instance where it was already specified - it had the outputencoding parameter, which isn't really necessary.
        Hide
        Uwe Schindler added a comment -

        +1 to commit. Thanks for fixing charsets!

        Show
        Uwe Schindler added a comment - +1 to commit. Thanks for fixing charsets!
        Hide
        Shawn Heisey added a comment -

        Committed to trunk, r1490450. Because this does slightly change some ant tasks related to maven files, and I have no idea how to make sure maven is working correctly, I will wait to ensure that jenkins looks good before backporting to 4x.

        Show
        Shawn Heisey added a comment - Committed to trunk, r1490450. Because this does slightly change some ant tasks related to maven files, and I have no idea how to make sure maven is working correctly, I will wait to ensure that jenkins looks good before backporting to 4x.
        Hide
        Shawn Heisey added a comment -

        Jenkins never sent me any direct email, and the jenkins maven failures that I saw looked like the failures that have been happening for quite some time now, so I have backported this to 4x, commit r1490726.

        Show
        Shawn Heisey added a comment - Jenkins never sent me any direct email, and the jenkins maven failures that I saw looked like the failures that have been happening for quite some time now, so I have backported this to 4x, commit r1490726.
        Hide
        Steve Rowe added a comment -

        Bulk close resolved 4.4 issues

        Show
        Steve Rowe added a comment - Bulk close resolved 4.4 issues

          People

          • Assignee:
            Shawn Heisey
            Reporter:
            Shawn Heisey
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development