Skip to content

Commit 717be90

Browse files
committed
Fix style
1 parent 8c36581 commit 717be90

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ protected String getCurrentProjectVersion() throws MojoFailureException {
254254
*/
255255
private MavenProject reloadProject(MavenProject project) throws MojoFailureException {
256256
try {
257-
ProjectBuildingResult result = projectBuilder.build(project.getFile(), mavenSession.getProjectBuildingRequest());
258-
return result.getProject();
257+
ProjectBuildingResult result = projectBuilder.build(project.getFile(), mavenSession.getProjectBuildingRequest());
258+
return result.getProject();
259259
} catch (Exception e) {
260260
throw new MojoFailureException("Error re-loading project info", e);
261261
}
@@ -313,7 +313,8 @@ protected void checkSnapshotDependencies() throws MojoFailureException {
313313
getLog().warn(s);
314314
}
315315
throw new MojoFailureException(
316-
"There is some SNAPSHOT dependencies in the project, see warnings above. Change them or ignore with `allowSnapshots` property.");
316+
"There is some SNAPSHOT dependencies in the project, see warnings above."
317+
+ " Change them or ignore with `allowSnapshots` property.");
317318
}
318319
}
319320

@@ -329,9 +330,9 @@ protected void checkSnapshotDependencies() throws MojoFailureException {
329330
*/
330331
protected boolean validBranchName(final String branchName)
331332
throws MojoFailureException, CommandLineException {
332-
CommandResult r = executeGitCommandExitCode("check-ref-format",
333+
CommandResult res = executeGitCommandExitCode("check-ref-format",
333334
"--allow-onelevel", branchName);
334-
return r.getExitCode() == SUCCESS_EXIT_CODE;
335+
return res.getExitCode() == SUCCESS_EXIT_CODE;
335336
}
336337

337338
/**
@@ -1000,11 +1001,11 @@ protected void mvnSetVersions(final String version) throws MojoFailureException,
10001001
getLog().info("Updating version(s) to '" + version + "'.");
10011002

10021003
String newVersion = "-DnewVersion=" + version;
1003-
String g = "";
1004-
String a = "";
1004+
String grp = "";
1005+
String art = "";
10051006
if (versionsForceUpdate) {
1006-
g = "-DgroupId=";
1007-
a = "-DartifactId=";
1007+
grp = "-DgroupId=";
1008+
art = "-DartifactId=";
10081009
}
10091010

10101011
if (tychoBuild) {
@@ -1017,7 +1018,7 @@ protected void mvnSetVersions(final String version) throws MojoFailureException,
10171018
executeMvnCommand(TYCHO_VERSIONS_PLUGIN_SET_GOAL, prop, newVersion, "-Dtycho.mode=maven");
10181019
} else {
10191020
if (!skipUpdateVersion) {
1020-
executeMvnCommand(VERSIONS_MAVEN_PLUGIN_SET_GOAL, g, a, newVersion, "-DgenerateBackupPoms=false");
1021+
executeMvnCommand(VERSIONS_MAVEN_PLUGIN_SET_GOAL, grp, art, newVersion, "-DgenerateBackupPoms=false");
10211022
}
10221023

10231024
if (StringUtils.isNotBlank(versionProperty)) {

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ && notSameProdDevName()) { // if no release branch
344344
}
345345

346346
if (!keepBranch) {
347-
if (skipMergeProdBranch){
347+
if (skipMergeProdBranch) {
348348
//force delete as upstream merge is skipped
349349
gitBranchDeleteForce(hotfixBranchName);
350350
} else {

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
227227

228228
if (useSnapshotInHotfix && mavenSession.getUserProperties().get("useSnapshotInHotfix") != null) {
229229
getLog().warn(
230-
"The useSnapshotInHotfix parameter is set from the command line. Don't forget to use it in the finish goal as well."
230+
"The useSnapshotInHotfix parameter is set from the command line."
231+
+ " Don't forget to use it in the finish goal as well."
231232
+ " It is better to define it in the project's pom file.");
232233
}
233234

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
309309

310310
if (commitDevelopmentVersionAtStart && !notSameProdDevName()) {
311311
getLog().warn(
312-
"The commitDevelopmentVersionAtStart will not have effect. It can be enabled only when there are separate branches for development and production.");
312+
"The commitDevelopmentVersionAtStart will not have effect. "
313+
+ "It can be enabled only when there are separate branches for development and production.");
313314
commitDevelopmentVersionAtStart = false;
314315
}
315316

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
186186

187187
if (commitDevelopmentVersionAtStart && !notSameProdDevName()) {
188188
getLog().warn(
189-
"The commitDevelopmentVersionAtStart will not have effect. It can be enabled only when there are separate branches for development and production.");
189+
"The commitDevelopmentVersionAtStart will not have effect. "
190+
+ "It can be enabled only when there are separate branches for development and production.");
190191
commitDevelopmentVersionAtStart = false;
191192
}
192193

@@ -208,7 +209,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
208209

209210
if (useSnapshotInRelease && mavenSession.getUserProperties().get("useSnapshotInRelease") != null) {
210211
getLog().warn(
211-
"The useSnapshotInRelease parameter is set from the command line. Don't forget to use it in the finish goal as well."
212+
"The useSnapshotInRelease parameter is set from the command line."
213+
+ " Don't forget to use it in the finish goal as well."
212214
+ " It is better to define it in the project's pom file.");
213215
}
214216

0 commit comments

Comments
 (0)