0

I am trying to set a project that can be used by developers using Intellij or Eclipse on Github. I am not sure I am doing it right.

I know I need the .classpath and project from Eclipse and *.iml for Intellij but I have concerns about the project structure (I am using Maven). In Intellij, everything is fine and I can commit the project as I usually do and the top level contains src folders, pom.xml and so on. With Eclipse the top level is the project folder itself and then inside that folder, I see the pom.xml and src folder.

I am looking for details and found this other SO (eclipse intellij can use Github for same project) but this is really about the file and not the structure.

Can you please help with the project structure ?

mkirouac
  • 113
  • 1
  • 12

1 Answers1

1

All you have to push are only src folder and pom.xml file. All another files and folders should be added to .gitignore. Then you can clone repository and open it in Eclipse or Intellij as existing project (in Intellij: New -> Project from existing sources) or just open it from version control: New -> Project from version control -> git. Also you can add this instructions to README.md file.

  • Thanks Stepan your answer. That is what I was trying and it didn't work for Eclipse but worked all fine with IntelliJ. I ended up creating everything in IntelliJ and I found they have a functionality to export project to Eclipse (Not sure if it is the paid version only). That created the 2 files required for Eclipse. I exported to Github and imported the project as is in Eclipse. Worked fine. Yes, I am carrying stuff from IntelliJ and Eclipse around but it works fine. Kudos to IntelliJ. I have been only using Eclipse until last year and was just giving IntelliJ a try. Much more robust IMO. – mkirouac Dec 05 '19 at 14:38