Skip to content

Commit 83b52d6

Browse files
committed
Fixed #43 by adding connectionType to the SCM plugin configuration.
Also added a check that the gitURL does not already contain "scm:git:" which may be the case when the value is obtained from the POM.
1 parent 0962591 commit 83b52d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/e_gineering/maven/gitflowhelper/TagMasterMojo.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ protected void execute(final GitBranchType type, final String gitBranch, final S
4747
gitURLExpression = "${env.GIT_URL}";
4848
}
4949
String gitURL = resolveExpression(gitURLExpression);
50+
if (!gitURL.startsWith("scm:git:")) {
51+
gitURL = "scm:git:" + gitURL;
52+
}
5053
getLog().debug("gitURLExpression: '" + gitURLExpression + "' resolved to: '" + gitURL + "'");
5154
ExpansionBuffer eb = new ExpansionBuffer(gitURL);
5255
if (!eb.hasMoreLegalPlaceholders()) {
@@ -63,7 +66,8 @@ protected void execute(final GitBranchType type, final String gitBranch, final S
6366
goal("tag"),
6467
configuration(
6568
element(name("tag"), tag),
66-
element(name("developerConnectionUrl"), "scm:git:" + gitURL)
69+
element(name("connectionType"), "developerConnection"),
70+
element(name("developerConnectionUrl"), gitURL)
6771
),
6872
executionEnvironment(
6973
project,

0 commit comments

Comments
 (0)