Open mlopezFC opened 2 months ago
My two cents:
C:\dev\projects\customer\
Customer-based organization is important, as it enables quick removal of all customer-related sources once retention is no longer necessary. (This can be improved in case one works with many different customers at once.)
I also use a separate directory for Eclipse workspaces (C:\dev\workspaces\project
) so that the checked out project is free from .metadata
. This means they aren't tied to a specific IDE version, making it easier to roll back during IDE upgrades.
I like to have all of them in the same directory (eventually, one needs to use an older IDE for some legacy project; or maybe one wants to try a new IDE). The same applies for JDKs
C:\dev\ide\eclipse-jee-2023-03
C:\dev\jdk\jdk-17.0.0_35-corretto
Set JAVA_HOME
to the bin directory of your preferred JDK, and include %JAVA_HOME%\bin
in the PATH. This way you don't need to update both variables after a JDK upgrade. To ensure the right version is used, add %JAVA_HOME%\bin
immediately after the %SystemRoot%
entries. (Since earlier paths take precedence, your preferred JDK will remain the default even Even if a different java.exe is added to the PATH.)
It’s handy to store them in a well-known location that's easy to type when a project requires a specific Maven version.
Example: C:\dev\app\apache-maven-3.9.7
Add C:\dev\app\apache-maven-3.9.7\bin
to the PATH.
(Optionally, make C:\dev\app\apache-maven
a symlink to the default installation of Maven, and point the PATH to it.)
At first, I used a custom location, but after forgetting to configure it a few times and ending up with duplicate downloads, I decided to stick with the default %USERPROFILE%\.m2\repository
If the build fails because "CreateProcess error=206, The filename or extension is too long" one can mount it somewhere else:
subst M: %USERPROFILE%\.m2\repository
mvn -Dmaven.repo.local=M:\ spring-boot:run
None. I'm happy with the defaults.
It would be nice to write some documentation regarding useful tips and guidelines regarding local setup: