简体   繁体   中英

Do you need to close Eclipse before running gradle eclipse task?

I've recently started in a new job where Eclipse and Gradle are used. To generate the eclipse project files we run the gradle eclipse task. Now, some of my colleagues say that it is important to close Eclipse before running the gradle eclipse task. But when I look at the documentation for the Gradle eclipse plugin https://docs.gradle.org/6.8.1/userguide/eclipse_plugin.html , I can see no mention of anything about that.

So do you need to close Eclipse if you are running the gradle eclipse task or is that just a superstition? Also, is it ok to leave Eclipse open while running the cleanEclipse task?

No, Eclipse does not need to be closed to run the Gradle eclipse task.

The Gradle eclipse task creates and/or modifies configuration files ( .classpath , .settings/org.eclipse.jdt.ui.prefs , etc.). It is safe to edit these files while Eclipse is running. A couple of plug-ins and tools do it this way, including the Java language support of Visual Studio Code that is based on a headless Eclipse. And if I remember correctly, I've even seen Eclipse code that does it that way. It's recommended to share these files , from which can be concluded that these files can be safely modified while Eclipse is running.

Note: In most cases, the Gradle eclipse task is not required. To create/open/import a project as a Gradle project, use File > Import...: Gradle > Existing Gradle Project (the Gradle eclipse task is not required for that).

no, it doesn't. you just run it. a feature like that would be unintuitive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM