Apress / pivotal-certified-pro-spring-dev-exam-02

Source Code for 'Pivotal Certified Professional Core Spring 5 Developer Exam' by Iuliana Cosmina
Other
168 stars 239 forks source link

Import issue with Eclipse #20

Closed ra992 closed 3 years ago

ra992 commented 3 years ago

Hi, I tried to import the project in eclipse, but I am not able to configure it as package source. Can you please help? I am using

Eclipse IDE for Enterprise Java Developers (includes Incubating components)

Version: 2020-12 M2 (4.18.0 M2) Build id: 20201105-1505

Capture

iuliana commented 3 years ago

Hello @ra992,

I will take a look during the weekend, but unfortunately, how the project is loaded depends on the Eclipse Gradle Plugin. I can't promise anything.

If importing the project in Eclipse as a Gradle project does not yeild the expected result, I am not sure I can help.

What prevents you from using IntellJ IDEA community edition?

Cheers, Iuliana

ra992 commented 3 years ago

Hi Luliana, Only thing prevent me to use intellij is "no experience of using it" :)

iuliana commented 3 years ago

Hello @ra992 ,

I am installing Spring Tool now, but my recommendation would be try IntelliJ IDEA. In the book, I do mention a few key shortcuts and how to run things. Also, it has better integration with Gradle. And Maven, and Spring.

You might end up liking it. That's what happened to me more than 10 years ago.

Cheers, Iuliana Cosmina

iuliana commented 3 years ago

Hello @ra992 ,

I've installed Spring Tool Suite 4 downloaded from here: https://spring.io/tools Version: 4.8.1.RELEASE Build Id: 202010230733

I was able to import the project and the sources are identified correctly. However, the project is not usable in Eclipse, because it seems Eclipse has the same problem with Gradle that it had with Maven the last time I worked with it. If it cannot recognize a Gradle plugin it does not support its functionality.

The pivotal-certified-pro-spring-dev-exam-02 uses Java modules for its projects where possible. Support for compiling and running the project using Java Modules is enabled by a Gradle plugin Eclipse does not recognize. Thus, support for modules is disabled, and the project is ... unusable.

Giving up Java modules requires deleting all module-info.java file and removing all afterEvaluate tasks. You can give it a try if you really want to use Eclipse. You are welcome to submit a pull request if you make it happen.

I might give up using Java modules in the future too, because most people in the industry seem to avoid them like the plague.

Unfortunately, since Eclipse being a rigid bastard is not an issue of this project, I will close this. Thanks for the feedback!

Cheers, Iuliana Cosmina

ra992 commented 3 years ago

Hi Luliana,

Thanks for prompt reply. I will install the intellij, as eclipse have issue. Thanks a lot for all explanation :)