Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.oecd.ant</groupId>
<artifactId>org.oecd.ant.git</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<scm>
<connection>scm:git:https://pacps01.oecd.org/gitblit/r/ant/git-ant-tasks.git</connection>
</scm>

<repositories>
<repository>
<id>jgit-repository</id>
<url>https://repo.eclipse.org/content/groups/releases/</url>
</repository>
</repositories>

<build>
<sourceDirectory>src</sourceDirectory>
<resources>
Expand All @@ -30,7 +30,7 @@
</excludes>
</resource>
</resources>

<pluginManagement>
<plugins>
<plugin>
Expand All @@ -50,14 +50,14 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Expand Down Expand Up @@ -95,10 +95,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>package</phase>
<configuration>
<includeScope>compile</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
</build>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -109,7 +125,7 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>4.1.0.201509280440-r</version>
<version>7.7.0.202606012155-r</version>
<exclusions>
<exclusion>
<artifactId>httpclient</artifactId>
Expand All @@ -124,5 +140,5 @@
<scope>provided</scope>
</dependency>
</dependencies>
</project>

</project>
2 changes: 1 addition & 1 deletion src/org/oecd/ant/git/CloneTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/org/oecd/ant/git/CommitTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/org/oecd/ant/git/RefTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
6 changes: 6 additions & 0 deletions src/org/oecd/ant/git/SimpleProgressMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ public boolean isCancelled() {
return false;
}

/**
* No implementation of showing duration
*/
public void showDuration(boolean show) {
}

}
2 changes: 1 addition & 1 deletion src/org/oecd/ant/git/custom/CustomAddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down