Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow importing into eclipse #2696

Merged
merged 1 commit into from Aug 3, 2019
Merged

Conversation

a1dutch
Copy link
Contributor

@a1dutch a1dutch commented Sep 22, 2018

This PR fixes the issue with not being able to import the project into eclipse using buildship (gradle integration). This is detailed in #1359.

Eclipse is able to have multiple projects unlike intellij which can only have one(i assume intellij sets the working directory to the root of this folder), eclipse sets it working directory to its workspace which is a different directory to its project directory. When it tries to find the last annotated tag via git its looking in the workspace directory which is not a git repo.

The fix simply adds the -C <project root directory> from the project so it can find the correct git repository.

I have imported the project into intellij and eclipse, all existing tests pass when run from a terminal.

@codecov
Copy link

codecov bot commented Sep 22, 2018

Codecov Report

Merging #2696 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2696   +/-   ##
=========================================
  Coverage     94.77%   94.77%           
  Complexity     3161     3161           
=========================================
  Files           354      354           
  Lines          8057     8057           
  Branches        608      608           
=========================================
  Hits           7636     7636           
  Misses          271      271           
  Partials        150      150

@dilipkrish dilipkrish added the PR label Nov 12, 2018
@dilipkrish
Copy link
Member

Thanks for your PR! I'll review and pull in this PR shortly.

@ashirley
Copy link

ashirley commented Mar 7, 2019

I can confirm this fixed importing the project into eclipse (using the Spring Tools Suite 4 build of eclipse)

@a1dutch
Copy link
Contributor Author

a1dutch commented May 14, 2019

@dilipkrish any plans to get this merged?

@dilipkrish dilipkrish added this to the 3.0 milestone Aug 3, 2019
@dilipkrish
Copy link
Member

@a1dutch sorry for the really late reply. Im just coming out of a hiatus. I had a question about this change.

While this apparently doesn't have any problems, Im curious why the build system needs to know about how the IDE works?

@dilipkrish dilipkrish merged commit 049acec into springfox:master Aug 3, 2019
@a1dutch
Copy link
Contributor Author

a1dutch commented Aug 3, 2019

@dilipkrish the issue is to do with how the ide’s set different working directories.

IntelliJ can only open a single project at a time and obviously sets the working directory to that project.

Eclipse on the other hand can import multiple projects into its workspace. The workspace is the working directory but not the directory of the project.

Gradle is aware of the absolute directory of the project it just needed to tell git what directory to use as the working directory is different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants