IDEasy supports to automatically check out and import required git repositories (with your source-code) into your IDE during project creation.
|
Note
|
Please do not mix this feature with the settings repository that contains the configuration for your IDE. Here we are talking about git repositories for development in your project that typically contain code. |
To configure this you put a .properties file for each desired project into the repository sub-folder in your settings.
Each .properties file describes one "project" which you would like to check out and (potentially) import:
path=myproject
workingsets=Set1,Set2
workspace=example
git_url=http://github.com/someorg/someproject
git_branch=develop
git_remote=upstream:http://github.com/someorg/someproject
build_path=.
build_cmd=mvn -DskipTests=true -Darchetype.test.skip=true clean install
link=symlink,folder/link=subfolder-in-repo
import=eclipse
active=true|
Note
|
To clone a repository into multiple workspaces, simply provide comma-separated workspace names like workspace=main,test,feature.
This will clone the repository into each specified workspace during project setup.
|
| Variable | Value | Meaning |
|---|---|---|
|
e.g. |
(required) Path into which the projects is cloned. This path is relative to the workspace. |
|
e.g. |
(optional) This will create working sets (in eclipse). Each module (eclipse project) of this project will be part of all these working sets. Working sets will be automatically created if necessary. |
|
|
Workspace(s) to use for checkout and import.
Supports comma-separated values to clone the repository into multiple workspaces (e.g., |
|
(required) Git URL to use for cloning the project. |
|
|
e.g. |
(optional) Git branch to checkout. Git default branch is default. |
|
e.g. |
(optional) Comma separated list of |
|
e.g. |
(optional) The directory inside |
|
e.g. |
(optional) The IDEasy command to build the project after clone or pull. If omitted no build is triggered. |
|
e.g. |
(optional) Comma separated list of IDEs to import the repository into. |
|
CSV of |
(optional) Comma separated list of symbolic links to link the repository into the workspace top-level folder. For a real-world use-case of this feature see AI usage. |
|
|
(optional) If set to |
Every value in a repository .properties file may contain variables using the $[«VARIABLE»] syntax as well as expression functions using the @«function»(…) syntax.
They are resolved before the value is used, so they also work in properties that are validated such as path.
A typical use-case is to clone the fork of the current user instead of the upstream repository and to add the upstream as an additional remote:
path=IDEasy
git_url=https://github.com/@ask-variable("GIT_USER", "Please enter your github login:", "home", "$[USER]")/IDEasy.git
git_remote=upstream:https://github.com/devonfw/IDEasy.git
git_branch=main
import=eclipse
active=trueOn the first setup the user is asked for the github login, the answer is stored as GIT_USER in ~/.ide/ide.properties (home) and reused on every following run.
The default $[USER] is the login name of the current user and works on all platforms.
|
Note
|
A repository with active=false is skipped before its properties are read, so a question from @ask-variable is never asked for a repository that is not set up.
|