@ApplicationScoped public class GuvnorM2Repository extends Object
Constructor and Description |
---|
GuvnorM2Repository() |
GuvnorM2Repository(ArtifactRepositoryService factory) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsArtifact(GAV gav) |
boolean |
containsArtifact(GAV gav,
Predicate<ArtifactRepository> filter) |
void |
deployArtifact(InputStream jarStream,
GAV gav,
boolean includeAdditionalRepositories) |
void |
deployArtifact(InputStream jarStream,
GAV gav,
boolean includeAdditionalRepositories,
Predicate<ArtifactRepository> filter) |
void |
deployParentPom(GAV gav) |
void |
deployPom(InputStream pomStream,
GAV gav) |
String |
generateParentPOM(GAV gav) |
String |
generatePOM(GAV gav) |
static String |
generatePomProperties(GAV gav) |
File |
getArtifactFileFromRepository(GAV gav) |
protected Collection<org.eclipse.aether.artifact.Artifact> |
getArtifacts(List<String> wildcards) |
protected Collection<File> |
getFiles(List<String> wildcards) |
String |
getM2RepositoryDir(String repositoryName) |
String |
getM2RepositoryRootDir(String repositoryName) |
String |
getPomPropertiesPath(GAV gav) |
String |
getPomText(String path) |
String |
getPomXmlPath(GAV gav) |
String |
getRepositoryURL(String repositoryName) |
void |
init() |
List<org.eclipse.aether.artifact.Artifact> |
listArtifacts(String filters,
List<String> fileFormats) |
Collection<File> |
listFiles()
Finds files within the repository.
|
List<File> |
listFiles(String filters)
Finds files within the repository with the given filters.
|
List<File> |
listFiles(String filters,
List<String> fileFormats)
Finds files within the repository with the given filters and formats.
|
GAV |
loadGAVFromJar(String jarPath) |
static String |
loadPomFromJar(InputStream jarInputStream) |
static String |
loadPomPropertiesFromJar(InputStream jarInputStream) |
protected String |
toFileName(GAV gav,
String fileName) |
protected static String |
zipEntryToString(ZipFile zip,
ZipEntry entry) |
public GuvnorM2Repository()
@Inject public GuvnorM2Repository(ArtifactRepositoryService factory)
@PostConstruct public void init()
public void deployArtifact(InputStream jarStream, GAV gav, boolean includeAdditionalRepositories)
public void deployArtifact(InputStream jarStream, GAV gav, boolean includeAdditionalRepositories, Predicate<ArtifactRepository> filter)
public void deployPom(InputStream pomStream, GAV gav)
public void deployParentPom(GAV gav)
public Collection<File> listFiles()
public List<File> listFiles(String filters)
filters
- filter to apply when finding files. The filter is used to create a wildcard matcher, ie., "*filter*.*", in which "*" is
to represent a multiple wildcard characters.public List<File> listFiles(String filters, List<String> fileFormats)
filters
- filter to apply when finding files. The filter is used to create a wildcard matcher, ie., "*filter*.*", in which "*" is
to represent a multiple wildcard characters.fileFormats
- file formats to apply when finding files, ie., [ "jar", "kjar" ].public List<org.eclipse.aether.artifact.Artifact> listArtifacts(String filters, List<String> fileFormats)
protected Collection<File> getFiles(List<String> wildcards)
protected Collection<org.eclipse.aether.artifact.Artifact> getArtifacts(List<String> wildcards)
public static String loadPomFromJar(InputStream jarInputStream)
public static String loadPomPropertiesFromJar(InputStream jarInputStream)
public boolean containsArtifact(GAV gav)
public boolean containsArtifact(GAV gav, Predicate<ArtifactRepository> filter)
protected static String zipEntryToString(ZipFile zip, ZipEntry entry) throws IOException
IOException
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.