@@ -1207,24 +1207,10 @@ public void error(String msg, Throwable t) {
1207
1207
return ;
1208
1208
}
1209
1209
1210
- dotGitDirectory = lookupGitDirectory ();
1211
- if (failOnNoGitDirectory && !directoryExists (dotGitDirectory )) {
1212
- throw new GitCommitIdExecutionException (
1213
- ".git directory is not found! Please specify a valid [dotGitDirectory] in your"
1214
- + " pom.xml" );
1215
- }
1216
-
1217
1210
if (gitDescribe == null ) {
1218
1211
gitDescribe = new GitDescribeConfig ();
1219
1212
}
1220
1213
1221
- if (dotGitDirectory != null ) {
1222
- log .info ("dotGitDirectory '" + dotGitDirectory .getAbsolutePath () + "'" );
1223
- } else {
1224
- log .info ("dotGitDirectory is null, aborting execution!" );
1225
- return ;
1226
- }
1227
-
1228
1214
try {
1229
1215
commitIdGenerationModeEnum =
1230
1216
CommitIdGenerationMode .valueOf (commitIdGenerationMode .toUpperCase ());
@@ -1503,16 +1489,6 @@ private void appendPropertiesToReactorProjects(LogInterface log, Properties prop
1503
1489
log .info ("Added properties to '" + reactorProjects .size () + "' projects" );
1504
1490
}
1505
1491
1506
- /**
1507
- * Find the git directory of the currently used project. If it's not already specified, this
1508
- * method will try to find it.
1509
- *
1510
- * @return the File representation of the .git directory
1511
- */
1512
- private File lookupGitDirectory () throws GitCommitIdExecutionException {
1513
- return new GitDirLocator (project .getBasedir ()).lookupGitDirectory (dotGitDirectory );
1514
- }
1515
-
1516
1492
private void logProperties (LogInterface log , Properties propertiesToPublish ) {
1517
1493
for (String propertyName : propertiesToPublish .stringPropertyNames ()) {
1518
1494
log .info ("including property '" + propertyName + "' in results" );
@@ -1522,8 +1498,4 @@ private void logProperties(LogInterface log, Properties propertiesToPublish) {
1522
1498
private boolean isPomProject (@ Nonnull MavenProject project ) {
1523
1499
return project .getPackaging ().equalsIgnoreCase ("pom" );
1524
1500
}
1525
-
1526
- private boolean directoryExists (@ Nullable File fileLocation ) {
1527
- return fileLocation != null && fileLocation .exists () && fileLocation .isDirectory ();
1528
- }
1529
1501
}
0 commit comments