Git Product home page Git Product logo

ant-git-tasks's People

Contributors

fafriat avatar jkutzfla avatar mirvnillith avatar stephencdaly avatar verycrazydog avatar will-clark avatar yveszoundi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-git-tasks's Issues

Enhance the commit command for multiple specific paths

Summary
It is not possible to commit a specific set of changes among all possible git tree changes.

Details
The JGit API supports adding multiple specific paths by calling the setOnly method multiple times. http://download.eclipse.org/jgit/docs/jgit-3.2.0.201312181205-r/apidocs/org/eclipse/jgit/api/CommitCommand.html#setOnly(java.lang.String)

However, there's no fileset like support in the Ant Git tasks commit task. Fileset support should be implement in a similar way than in the AddCommand task.

Sample use case

  • For a snapshot release(no git tagging, snapshot artifacts deployment) , the tree must be clean, as your previous commits should have provided all required improvements and bug fixes.
  • For an official release(git tagging + staging artifacts deployment), you EXPECT the Git tree to be dirty with only changes related to bumping the version number. For a clean release, you only want to commit files impacted by the version number increase.

Tagger and push rejection

Tagger was not set from git:settings (same as with committer previously) and I added detection of "Push rejected." in the push messages to fail the push (it's what we see in Stash when a server-side hook fails and for some reason the returned result does not trigger a fail by itself).

Package as Eclipse Plugin

Would it be possible to package this library as an Eclipse plugin using the Task extension point and dependencies to the other plugins (JGit is already part of eclipse). Anything else could go to the Extra Classpath-Entry extension point.

Maybe you could even publish a feature and a site to marketplace?

This would really ease the use from within Eclipse itself.

Vague error on git clone

Trying to get pull / push / clone working. Local repo work seems to be running fine.

However, remote raises vague error about that it failed. Unclear whether it is due to authorization issues (tried ssh, https, key, user/pwd combination) or something else:

For instance:
<git:clone uri="https://github.com/rimerosolutions/playground-repo.git"/>

BUILD FAILED
E:\ws\itgen\build-itgen.xml:5246: Could not clone URL 'https://github.com/rimerosolutions/playground-repo.git'.

Suggested change:
Improve clarity of error message with a cause and maybe even a recommended action.

git describe support

Suggestion for an enhancement: as far as I can see there is no support for git describe with its variants. That would help us in our automated builds.

Allow creating a branch from a custom origin.

From email:

I have a real quick question regarding how to checkout branch tags from an exisiting repository using your custom ant task.

<git:git directory="${library.directory}" verbose="true" settingsRef="git.refID">
  <git:clone uri="<url>.git"/>
  <git:checkout branchName="origin/master" createBranch="true"/>
</git:git>

From reading the wiki this seems to be correct for checking out a remote branch, but I need to be able to checkout a particular branch tag.

Answer/Possible workaround:
I think that I should expose the setStartPoint method from JGit:
http://download.eclipse.org/jgit/docs/jgit-2.3.1.201302201838-r/apidocs/org/eclipse/jgit/api/CheckoutCommand.html#setStartPoint(java.lang.String)

Alternatively, you should be might able to get away with it by doing the following:

<git:git ...>
  <git checkout yourtag/>
 <git checkout your branch create=true/>
   </git:git>

Improve merge task error reporting

I've found the merge task to fail without any reason being logged. There must be more information in MergeResult that we're not looking at.

[taskdef] Could not load definitions from resource com/rimerosolutions/ant/git/jgit-ant-lib.xml. It could not be found.

I don't know if this issue tracker is still active, but I'm getting the error from the title. This is my config

<project name="Test" default="init" basedir="."
	xmlns:ivy="antlib:org.apache.ivy.ant"
	xmlns:git="antlib:com.rimerosolutions.ant.git">

	<target name="init">
		<ivy:cachepath pathid="ant.git.tasks.classpath" conf="compile"/>
		<taskdef uri="antlib:com.rimerosolutions.ant.git"
        resource="com/rimerosolutions/ant/git/jgit-ant-lib.xml">
        	<classpath>
        		<path refid="ant.git.tasks.classpath"/>
        	</classpath>
	    </taskdef>

		<!-- Install repositories -->
		<git:git directory=".">
 			<git:clone uri="someuri"/>
		</git:git>
	</target>
</project>
<ivy-module version="2.0">
	<info organisation="Test GmbH" module="Test"/>
	<configurations>
		<conf name="compile"/>		
	</configurations>
	<dependencies>
		<dependency org="org.eclipse.jgit"
			name="org.eclipse.jgit.ant" 
            rev="4.7.0.201704051617-r" conf="compile"/>
		<dependency org="org.eclipse.jgit" 
            name="org.eclipse.jgit" 
            rev="4.7.0.201704051617-r" conf="compile"/>
		<dependency org="com.jcraft" 
            name="jsch" 
            rev="0.1.54" conf="compile"/>
		<dependency org="com.rimerosolutions.ant" 
            name="ant-git-tasks"
            rev="1.3.2" 
            changing="true" conf="compile"/>
	</dependencies>
</ivy-module>
<ivysettings>
	<settings defaultResolver="central"/>
	<resolvers>
		<url name="sonatype-snapshots" m2compatible="true">
			<artifact pattern="https://oss.sonatype.org/content/repositories/snapshots/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
		</url>
		<ibiblio name="central" m2compatible="true"/>
	</resolvers>
</ivysettings>

And this is the error output

Buildfile: /home/tzfrs/dev/Test/TestAnt/build.xml

init:
[ivy:cachepath] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:cachepath] :: loading settings :: file = /home/tzfrs/dev/Test/TestAnt/ivysettings.xml
[ivy:cachepath] :: resolving dependencies :: Test GmbH#Test;working@tzfrs-home
[ivy:cachepath] 	confs: [compile]
[ivy:cachepath] 	found org.eclipse.jgit#org.eclipse.jgit.ant;4.7.0.201704051617-r in central
[ivy:cachepath] 	found org.eclipse.jgit#org.eclipse.jgit;4.7.0.201704051617-r in central
[ivy:cachepath] 	found com.jcraft#jsch;0.1.54 in central
[ivy:cachepath] 	found com.googlecode.javaewah#JavaEWAH;1.1.6 in central
[ivy:cachepath] 	found org.apache.httpcomponents#httpclient;4.3.6 in central
[ivy:cachepath] 	found org.apache.httpcomponents#httpcore;4.3.3 in central
[ivy:cachepath] 	found commons-logging#commons-logging;1.1.3 in central
[ivy:cachepath] 	found commons-codec#commons-codec;1.6 in central
[ivy:cachepath] 	found org.slf4j#slf4j-api;1.7.2 in central
[ivy:cachepath] 	found org.apache.ant#ant;1.9.6 in central
[ivy:cachepath] 	found org.apache.ant#ant-launcher;1.9.6 in central
[ivy:cachepath] 	found com.rimerosolutions.ant#ant-git-tasks;1.3.2 in central
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit.ant/4.7.0.201704051617-r/org.eclipse.jgit.ant-4.7.0.201704051617-r.jar ...
[ivy:cachepath] ......... (18kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.eclipse.jgit#org.eclipse.jgit.ant;4.7.0.201704051617-r!org.eclipse.jgit.ant.jar (58ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/4.7.0.201704051617-r/org.eclipse.jgit-4.7.0.201704051617-r.jar ...
[ivy:cachepath] .................................................................................................................................................................. (2397kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.eclipse.jgit#org.eclipse.jgit;4.7.0.201704051617-r!org.eclipse.jgit.jar (298ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar ...
[ivy:cachepath] ............................. (273kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] com.jcraft#jsch;0.1.54!jsch.jar (71ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/apache/ant/ant/1.9.6/ant-1.9.6.jar ...
[ivy:cachepath] ........................................................................................................................................ (1982kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.apache.ant#ant;1.9.6!ant.jar (208ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar ...
[ivy:cachepath] ...................... (161kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] com.googlecode.javaewah#JavaEWAH;1.1.6!JavaEWAH.jar(bundle) (68ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar ...
[ivy:cachepath] ................................................ (578kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.apache.httpcomponents#httpclient;4.3.6!httpclient.jar (96ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar ...
[ivy:cachepath] ............... (25kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.slf4j#slf4j-api;1.7.2!slf4j-api.jar (59ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar ...
[ivy:cachepath] ............................. (276kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.apache.httpcomponents#httpcore;4.3.3!httpcore.jar (69ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar ...
[ivy:cachepath] ............... (60kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] commons-logging#commons-logging;1.1.3!commons-logging.jar (82ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar ...
[ivy:cachepath] .......................... (227kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] commons-codec#commons-codec;1.6!commons-codec.jar (80ms)
[ivy:cachepath] downloading https://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.6/ant-launcher-1.9.6.jar ...
[ivy:cachepath] ........ (17kB)
[ivy:cachepath] .. (0kB)
[ivy:cachepath] 	[SUCCESSFUL ] org.apache.ant#ant-launcher;1.9.6!ant-launcher.jar (67ms)
[ivy:cachepath] :: resolution report :: resolve 2941ms :: artifacts dl 1170ms
[ivy:cachepath] 	:: evicted modules:
[ivy:cachepath] 	org.eclipse.jgit#org.eclipse.jgit.ant;3.0.0.201306101825-r by [org.eclipse.jgit#org.eclipse.jgit.ant;4.7.0.201704051617-r] in [compile]
[ivy:cachepath] 	org.eclipse.jgit#org.eclipse.jgit;3.0.0.201306101825-r by [org.eclipse.jgit#org.eclipse.jgit;4.7.0.201704051617-r] in [compile]
[ivy:cachepath] 	com.jcraft#jsch;0.1.50 by [com.jcraft#jsch;0.1.54] in [compile]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      compile     |   15  |   12  |   12  |   3   ||   11  |   11  |
	---------------------------------------------------------------------
  [taskdef] Could not load definitions from resource com/rimerosolutions/ant/git/jgit-ant-lib.xml. It could not be found.

BUILD FAILED
/home/tzfrs/dev/Test/TestAnt/build.xml:15: Problem: failed to create task or type antlib:com.rimerosolutions.ant.git:git
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/tzfrs/.ant/lib
        -a directory added on the command line with the -lib argument


Total time: 4 seconds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.