git-sparse-checkout-plugin

A Maven plugin to perform a sparse checkout (fetch only a subtree) from a given Git repository

License

License

Categories

Categories

Git Development Tools Version Controls
GroupId

GroupId

com.github.gastaldi
ArtifactId

ArtifactId

git-sparse-checkout-plugin
Last Version

Last Version

1.0.0.Alpha3
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

git-sparse-checkout-plugin
A Maven plugin to perform a sparse checkout (fetch only a subtree) from a given Git repository
Project URL

Project URL

https://github.com/gastaldi/git-checkout-plugin
Source Code Management

Source Code Management

https://github.com/gastaldi/git-checkout-plugin

Download git-sparse-checkout-plugin

How to add to project

<plugin>
    <groupId>com.github.gastaldi</groupId>
    <artifactId>git-sparse-checkout-plugin</artifactId>
    <version>1.0.0.Alpha3</version>
</plugin>

Dependencies

compile (1)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.6.3

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

Project Modules

There are no modules declared in this project.

git-checkout-plugin

A Maven plugin to perform a sparse checkout (fetch only a subtree) from a given Git repository

POM Configuration

<project>
  ...
  <build>
    <plugins>
       <plugin>
          <groupId>com.github.gastaldi</groupId>
          <artifactId>git-checkout-plugin</artifactId>
          <version>1.0.0.Alpha1</version>
          <executions>
             <execution>
                <id>get-docs</id>
                <phase>process-resources</phase>
                <goals>
                   <goal>git-checkout</goal>
                </goals>
             </execution>
          </executions>
          <configuration>
             <!-- The git repository to use -->
             <repository>[email protected]:openshiftio/appdev-documentation.git</repository>
             <!-- The paths to checkout -->
             <paths>
                <path>docs/topics/readme</path>
             </paths>
          </configuration>
       </plugin>
    </plugins>
  </build>
   ...
</project>

Output

[INFO] --- git-checkout-plugin:1.0.0-SNAPSHOT:git-checkout (get-docs) @ launchpad-addon ---
Initialized empty Git repository in /home/ggastald/workspace/launchpad/launchpad-addon/target/classes/.git/
remote: Counting objects: 2614, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 2614 (delta 0), reused 1 (delta 0), pack-reused 2609
Receiving objects: 100% (2614/2614), 2.90 MiB | 1.00 MiB/s, done.
Resolving deltas: 100% (1570/1570), done.
From github.com:openshiftio/appdev-documentation
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
[INFO] Files available in: /home/ggastald/workspace/launchpad/launchpad-addon/target/classes

Versions

Version
1.0.0.Alpha3
1.0.0.Alpha2
1.0.0.Alpha1