Configure Eclipse Foundation account details for Git in Oomph setup
After setting up a new development environment (e.g. in case of a major Oomph setup change such as a new Eclipse or Java version) I have to update my Git user name/email for the new Git clone. By default I get my Windows username and similarly useless email address. I don't have global settings for this as I use different credentials for different projects. I may forget this and create commits with wrong user name/email. Pushing will fail due to Eclipse Foundation GitLab push checks. Correcting the already created commits is possible but takes some time and some advanced Git commands. It would be nice if this could be prevented.
When setting up a development environment for Eclipse ESCET using the Oomph setup, it would be nice to be able to set your Eclipse Foundation account details (name/email). That way, when committing, the correct name/email are used and there is no need to fix the commits afterwards.
This can be done by configuring some variables:
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.user.name"
defaultValue="${scope.user.name}"
label="Eclipse Foundation account user name">
<annotation
source="http://www.eclipse.org/oomph/setup/GlobalVariable"/>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.user.email"
label="Eclipse Foundation account email address">
<annotation
source="http://www.eclipse.org/oomph/setup/GlobalVariable"/>
<description></description>
</setupTask>
And then adding them to the Git config:
<setupTask
xsi:type="git:GitCloneTask"
id="org.eclipse.escet.git.clone"
remoteURI="https://gitlab.eclipse.org/eclipse/escet/escet.git">
<configSections
name="user">
<properties
key="name"
value="${eclipse.user.name}"/>
<properties
key="email"
value="${eclipse.user.email}"/>
</configSections>
<description>${scope.project.label}</description>
</setupTask>