Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Git ComponentAvailable as of Camel 2.16 The git: component allows you to work with a generic Git repository. <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-git</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> URI Format git://localRepositoryPath[?options] URI OptionsThe producer allows to do operations on a specific repository.
Message Headers
Producer ExampleBelow is an example route of a producer that add a file test.java to a local repository, commit it with a specific message on master branch and then push it to remote repository. from("direct:start") .setHeader(GitConstants.GIT_FILE_NAME, constant("test.java")) .to("git:///tmp/testRepo?operation=add") .setHeader(GitConstants.GIT_COMMIT_MESSAGE, constant("first commit")) .to("git:///tmp/testRepo?operation=commit") .to("git:///tmp/testRepo?operation=push&remotePath=https://foo.com/test/test.git&username=xxx&password=xxx") Consumer ExampleBelow is an example route of a consumer that consumes commit: from("git:///tmp/testRepo?type=commit") .to(....) |