Skip to content

Commit

Permalink
remove logic that was moved to the git-commit-id-plugin-core
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSnoozer committed Mar 2, 2024
1 parent 64d51ee commit 0d17e06
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 322 deletions.
28 changes: 0 additions & 28 deletions src/main/java/pl/project13/maven/git/GitCommitIdMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1207,24 +1207,10 @@ public void error(String msg, Throwable t) {
return;
}

dotGitDirectory = lookupGitDirectory();
if (failOnNoGitDirectory && !directoryExists(dotGitDirectory)) {
throw new GitCommitIdExecutionException(
".git directory is not found! Please specify a valid [dotGitDirectory] in your"
+ " pom.xml");
}

if (gitDescribe == null) {
gitDescribe = new GitDescribeConfig();
}

if (dotGitDirectory != null) {
log.info("dotGitDirectory '" + dotGitDirectory.getAbsolutePath() + "'");
} else {
log.info("dotGitDirectory is null, aborting execution!");
return;
}

try {
commitIdGenerationModeEnum =
CommitIdGenerationMode.valueOf(commitIdGenerationMode.toUpperCase());
Expand Down Expand Up @@ -1503,16 +1489,6 @@ private void appendPropertiesToReactorProjects(LogInterface log, Properties prop
log.info("Added properties to '" + reactorProjects.size() + "' projects");
}

/**
* Find the git directory of the currently used project. If it's not already specified, this
* method will try to find it.
*
* @return the File representation of the .git directory
*/
private File lookupGitDirectory() throws GitCommitIdExecutionException {
return new GitDirLocator(project.getBasedir()).lookupGitDirectory(dotGitDirectory);
}

private void logProperties(LogInterface log, Properties propertiesToPublish) {
for (String propertyName : propertiesToPublish.stringPropertyNames()) {
log.info("including property '" + propertyName + "' in results");
Expand All @@ -1522,8 +1498,4 @@ private void logProperties(LogInterface log, Properties propertiesToPublish) {
private boolean isPomProject(@Nonnull MavenProject project) {
return project.getPackaging().equalsIgnoreCase("pom");
}

private boolean directoryExists(@Nullable File fileLocation) {
return fileLocation != null && fileLocation.exists() && fileLocation.isDirectory();
}
}
174 changes: 0 additions & 174 deletions src/main/java/pl/project13/maven/git/GitDirLocator.java

This file was deleted.

120 changes: 0 additions & 120 deletions src/test/java/pl/project13/maven/git/GitDirLocatorTest.java

This file was deleted.

0 comments on commit 0d17e06

Please sign in to comment.