diff --git a/pom.xml b/pom.xml
index afcd711..661f97a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,23 +3,23 @@
4.0.0
org.oecd.ant
org.oecd.ant.git
- 1.3.0
-
+ 1.4.0
+
UTF-8
-
+
scm:git:https://pacps01.oecd.org/gitblit/r/ant/git-ant-tasks.git
-
+
jgit-repository
https://repo.eclipse.org/content/groups/releases/
-
+
src
@@ -30,7 +30,7 @@
-
+
@@ -50,14 +50,14 @@
-
+
maven-compiler-plugin
3.1
- 1.7
- 1.7
+ 8
+ 8
UTF-8
@@ -95,10 +95,26 @@
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.8.0
+
+
+
+ copy-dependencies
+
+ package
+
+ compile
+
+
+
+
${project.artifactId}-${project.version}-${buildNumber}
-
+
org.slf4j
@@ -109,7 +125,7 @@
org.eclipse.jgit
org.eclipse.jgit
- 4.1.0.201509280440-r
+ 7.7.0.202606012155-r
httpclient
@@ -124,5 +140,5 @@
provided
-
-
\ No newline at end of file
+
+
diff --git a/src/org/oecd/ant/git/CloneTask.java b/src/org/oecd/ant/git/CloneTask.java
index 146440c..2aa8fdd 100644
--- a/src/org/oecd/ant/git/CloneTask.java
+++ b/src/org/oecd/ant/git/CloneTask.java
@@ -96,7 +96,7 @@ public final void execute() throws BuildException {
Git git = cc.call();
// some testing on current HEAD, wrong branch parameter can leave the clone in a bad state
- Ref headRef = git.getRepository().getRef(Constants.HEAD);
+ Ref headRef = git.getRepository().findRef(Constants.HEAD);
if (headRef != null) {
if (!headRef.isSymbolic())
throw new BuildException("detached HEAD");
diff --git a/src/org/oecd/ant/git/CommitTask.java b/src/org/oecd/ant/git/CommitTask.java
index 750e299..2cf67d3 100644
--- a/src/org/oecd/ant/git/CommitTask.java
+++ b/src/org/oecd/ant/git/CommitTask.java
@@ -104,7 +104,7 @@ protected void executeCustom(Git git) throws Exception {
RevCommit commit = cc.call();
- Ref head = git.getRepository().getRef(Constants.HEAD);
+ Ref head = git.getRepository().findRef(Constants.HEAD);
String branchName;
if (!head.isSymbolic())
diff --git a/src/org/oecd/ant/git/RefTask.java b/src/org/oecd/ant/git/RefTask.java
index 0af3f5c..5f00313 100644
--- a/src/org/oecd/ant/git/RefTask.java
+++ b/src/org/oecd/ant/git/RefTask.java
@@ -34,7 +34,7 @@ protected void checkProperties() throws Exception {
@Override
protected void executeCustom(Git git) throws Exception {
- Ref ref = git.getRepository().getRef(name);
+ Ref ref = git.getRepository().findRef(name);
if (ref == null) {
throw new BuildException(MessageFormat.format("Ref ''{1}'' not found in ''{0}''", getRepo().getAbsolutePath(), name));
}
diff --git a/src/org/oecd/ant/git/SimpleProgressMonitor.java b/src/org/oecd/ant/git/SimpleProgressMonitor.java
index c11a126..971ad7a 100644
--- a/src/org/oecd/ant/git/SimpleProgressMonitor.java
+++ b/src/org/oecd/ant/git/SimpleProgressMonitor.java
@@ -34,4 +34,10 @@ public boolean isCancelled() {
return false;
}
+ /**
+ * No implementation of showing duration
+ */
+ public void showDuration(boolean show) {
+ }
+
}
diff --git a/src/org/oecd/ant/git/custom/CustomAddCommand.java b/src/org/oecd/ant/git/custom/CustomAddCommand.java
index 51e28bc..7c959c6 100644
--- a/src/org/oecd/ant/git/custom/CustomAddCommand.java
+++ b/src/org/oecd/ant/git/custom/CustomAddCommand.java
@@ -174,7 +174,7 @@ else if (!(path.equals(lastAddedFile))) {
if (FileMode.GITLINK != mode) {
entry.setLength(sz);
- entry.setLastModified(f.getEntryLastModified());
+ entry.setLastModified(f.getEntryLastModifiedInstant());
long contentSize = f.getEntryContentLength();
InputStream in = f.openEntryStream();
try {