Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split GitFacet and GitAPIFacet since they really represent separate c…
…oncerns
- Loading branch information
1 parent
9ac8ce0
commit ff3116c
Showing
2 changed files
with
41 additions
and
18 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
git-tools/src/main/java/org/jboss/forge/git/GitAPIFacet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.jboss.forge.git; | ||
|
||
import javax.inject.Inject; | ||
|
||
import org.jboss.forge.project.dependencies.Dependency; | ||
import org.jboss.forge.project.dependencies.DependencyBuilder; | ||
import org.jboss.forge.project.dependencies.DependencyInstaller; | ||
import org.jboss.forge.project.facets.BaseFacet; | ||
import org.jboss.forge.shell.plugins.Alias; | ||
|
||
/** | ||
* @author <a href="mailto:jevgeni.zelenkov@gmail.com">Jevgeni Zelenkov</a> | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
@Alias("forge.vcs.git.api") | ||
public class GitAPIFacet extends BaseFacet | ||
{ | ||
private static final Dependency GIT_DEPENDENCY = DependencyBuilder.create() | ||
.setGroupId("org.eclipse.jgit") | ||
.setArtifactId("org.eclipse.jgit.pgm"); | ||
|
||
@Inject | ||
public DependencyInstaller installer; | ||
|
||
@Override | ||
public boolean install() | ||
{ | ||
installer.install(project, GIT_DEPENDENCY); | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean isInstalled() | ||
{ | ||
return installer.isInstalled(project, GIT_DEPENDENCY); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters