maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SCM-884) Upgrade jgit to last version of java 7 release (4.5.0.201609210915-r)
Date Wed, 02 May 2018 01:45:00 GMT

    [ https://issues.apache.org/jira/browse/SCM-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460386#comment-16460386
] 

ASF GitHub Bot commented on SCM-884:
------------------------------------

olamy closed pull request #54: [SCM-884] Raise to last version of java 7 release
URL: https://github.com/apache/maven-scm/pull/54
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-scm-plugin/pom.xml b/maven-scm-plugin/pom.xml
index 4bd375f44..2f12e7fe0 100644
--- a/maven-scm-plugin/pom.xml
+++ b/maven-scm-plugin/pom.xml
@@ -43,6 +43,8 @@
   <properties>
     <mavenVersion>2.2.1</mavenVersion>
     <mavenPluginVersion>3.2</mavenPluginVersion>
+
+    <maven.compiler.target>1.7</maven.compiler.target>
   </properties>
 
   <prerequisites>
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml
index 20b93fad9..22cfcc994 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml
@@ -35,6 +35,10 @@
     see http://eclipse.org/jgit/
   </description>
 
+  <properties>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
   <dependencies>
     <!-- Test -->
     <dependency>
@@ -50,8 +54,8 @@
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit</artifactId>
-      <!-- 4.x version are java 7 -->
-      <version>3.7.1.201504261725-r</version>
+      <version>4.5.0.201609210915-r</version>
+      <scope>compile</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
index d530d9ca0..b6900b47c 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
@@ -243,7 +243,7 @@ public static boolean hasCommits( Repository repo )
             {
                 list.add( new ScmFile( diff.getNewPath(), ScmFileStatus.CHECKED_IN ) );
             }
-            rw.release();
+            rw.close();
         }
         return list;
     }
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/branch/JGitBranchCommand.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/branch/JGitBranchCommand.java
index 4b0565ea6..7fd7c3535 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/branch/JGitBranchCommand.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/branch/JGitBranchCommand.java
@@ -99,7 +99,7 @@ protected ScmResult executeBranchCommand( ScmProviderRepository repo, ScmFileSet
             // search for the tagged files
             final RevWalk revWalk = new RevWalk( git.getRepository() );
             RevCommit commit = revWalk.parseCommit( branchResult.getObjectId() );
-            revWalk.release();
+            revWalk.close();
 
             final TreeWalk walk = new TreeWalk( git.getRepository() );
             walk.reset(); // drop the first empty tree, which we do not need here
@@ -111,7 +111,7 @@ protected ScmResult executeBranchCommand( ScmProviderRepository repo,
ScmFileSet
             {
                 files.add( new ScmFile( walk.getPathString(), ScmFileStatus.CHECKED_OUT )
);
             }
-            walk.release();
+            walk.close();
 
             return new BranchScmResult( "JGit branch", files );
 
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/checkout/JGitCheckOutCommand.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/checkout/JGitCheckOutCommand.java
index 60f3d44bb..b89299aa1 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/checkout/JGitCheckOutCommand.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/checkout/JGitCheckOutCommand.java
@@ -167,7 +167,7 @@ else if ( localBranchNames.contains( branch ) )
 
             RevWalk revWalk = new RevWalk( git.getRepository() );
             RevCommit commit = revWalk.parseCommit( git.getRepository().resolve( Constants.HEAD
) );
-            revWalk.release();
+            revWalk.close();
 
             final TreeWalk walk = new TreeWalk( git.getRepository() );
             walk.reset(); // drop the first empty tree, which we do not need here
@@ -179,7 +179,7 @@ else if ( localBranchNames.contains( branch ) )
             {
                 listedFiles.add( new ScmFile( walk.getPathString(), ScmFileStatus.CHECKED_OUT
) );
             }
-            walk.release();
+            walk.close();
 
             getLogger().debug( "current branch: " + git.getRepository().getBranch() );
 
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/diff/JGitDiffCommand.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/diff/JGitDiffCommand.java
index f640b030c..d699a445f 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/diff/JGitDiffCommand.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/diff/JGitDiffCommand.java
@@ -131,7 +131,7 @@ private AbstractTreeIterator getTreeIterator( Repository repo, String
name )
         }
         finally
         {
-            or.release();
+            or.close();
         }
     }
 }
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/tag/JGitTagCommand.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/tag/JGitTagCommand.java
index 4957a2934..2083a4b12 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/tag/JGitTagCommand.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/tag/JGitTagCommand.java
@@ -97,7 +97,7 @@ public ScmResult executeTagCommand( ScmProviderRepository repo, ScmFileSet
fileS
             // search for the tagged files
             RevWalk revWalk = new RevWalk( git.getRepository() );
             RevCommit commit = revWalk.parseCommit( tagRef.getObjectId() );
-            revWalk.release();
+            revWalk.close();
 
             final TreeWalk walk = new TreeWalk( git.getRepository() );
             walk.reset(); // drop the first empty tree, which we do not need here
@@ -109,7 +109,7 @@ public ScmResult executeTagCommand( ScmProviderRepository repo, ScmFileSet
fileS
             {
                 taggedFiles.add( new ScmFile( walk.getPathString(), ScmFileStatus.CHECKED_OUT
) );
             }
-            walk.release();
+            walk.close();
 
             return new TagScmResult( "JGit tag", taggedFiles );
         }
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/checkin/JGitCheckInCommandCommitterAuthorTckTest.java
b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/checkin/JGitCheckInCommandCommitterAuthorTckTest.java
index 8aeccce22..b391e91fd 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/checkin/JGitCheckInCommandCommitterAuthorTckTest.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/checkin/JGitCheckInCommandCommitterAuthorTckTest.java
@@ -270,7 +270,7 @@ private RevCommit getHeadCommit( Repository repository )
         RevWalk rw = new RevWalk( repository );
         AnyObjectId headId = repository.resolve( Constants.HEAD );
         RevCommit head = rw.parseCommit( headId );
-        rw.release();
+        rw.close();
         return head;
     }
 
diff --git a/maven-scm-providers/maven-scm-providers-standard/pom.xml b/maven-scm-providers/maven-scm-providers-standard/pom.xml
index 4d4efa9b9..9b5118655 100644
--- a/maven-scm-providers/maven-scm-providers-standard/pom.xml
+++ b/maven-scm-providers/maven-scm-providers-standard/pom.xml
@@ -33,6 +33,10 @@
 
   <name>Maven SCM Standard Providers</name>
 
+  <properties>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Upgrade jgit to last version of java 7 release (4.5.0.201609210915-r)
> ---------------------------------------------------------------------
>
>                 Key: SCM-884
>                 URL: https://issues.apache.org/jira/browse/SCM-884
>             Project: Maven SCM
>          Issue Type: Improvement
>          Components: maven-scm-provider-jgit
>    Affects Versions: 1.9.5
>            Reporter: Jeremy Landis
>            Priority: Minor
>
> revwalk.release is now revwalk.close in newer versions which prevents usage of this plugin
with newer revisions.  To allow all newer revsions (4.9 at time of last check), this plugin
would need to be raised to java 7 and can safely be on 4.5.0 jgit.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message