Skip to content

Commit 2cff52b

Browse files
authored
Merge pull request #75 from egineering-llc/hotfix/1.7.2
Hotfix/1.7.2
2 parents a002a6a + d2eb0e6 commit 2cff52b

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<groupId>com.e-gineering</groupId>
1010
<artifactId>gitflow-helper-maven-plugin</artifactId>
1111

12-
<version>1.7.1</version>
12+
<version>1.7.2</version>
1313
<packaging>maven-plugin</packaging>
1414

1515
<name>gitflow-helper-maven-plugin</name>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public static String resolveUrlOrExpression(final MavenProject project, final Lo
3535
if (StringUtils.isBlank(connectionUrl)) {
3636
connectionUrl = project.getScm().getConnection();
3737
}
38-
return connectionUrl;
38+
39+
// Issue #74, missing an emtpy / null check before returning.
40+
if (!StringUtils.isBlank(connectionUrl)) {
41+
return connectionUrl;
42+
}
3943
}
4044

4145
return DEFAULT_URL_EXPRESSION;

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.apache.maven.scm.ScmException;
1010
import org.apache.maven.scm.ScmFileSet;
1111
import org.apache.maven.scm.ScmTagParameters;
12+
import org.apache.maven.scm.command.tag.TagScmResult;
1213
import org.apache.maven.scm.provider.ScmProvider;
1314
import org.apache.maven.scm.repository.ScmRepository;
1415

@@ -51,7 +52,15 @@ protected void execute(final GitBranchType type, final String gitBranch, final S
5152
ScmTagParameters tagParams = new ScmTagParameters("Release tag [" + sanitizedTag + "] generated by gitflow-helper-maven-plugin.");
5253
tagParams.setRemoteTagging(true);
5354

54-
provider.tag(repository, new ScmFileSet(project.getBasedir()), sanitizedTag, tagParams);
55+
final TagScmResult tagScmResult = provider.tag(repository, new ScmFileSet(project.getBasedir()), sanitizedTag, tagParams);
56+
if (!tagScmResult.isSuccess()) {
57+
getLog().error("Provider message:");
58+
getLog().error(tagScmResult.getProviderMessage());
59+
getLog().error("Command output:");
60+
getLog().error(tagScmResult.getCommandOutput());
61+
62+
throw new MojoFailureException(tagScmResult.getProviderMessage() );
63+
}
5564
} catch (ScmException scme) {
5665
throw new MojoFailureException("Unable to tag master branch.", scme);
5766
}

0 commit comments

Comments
 (0)