@ApplicationScoped public class GuvnorM2Repository extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
KIE_DEPLOYMENT_DESCRIPTOR_XML |
protected static String |
KMODULE_XML |
protected static String |
META_INF |
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 |
getKieDeploymentDescriptorText(String path) |
String |
getKModuleText(String path) |
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.
|
protected static String |
loadFileTextFromJar(File jarFile,
String path,
String fileName) |
GAV |
loadGAVFromJar(String jarPath) |
protected String |
loadKieTextFromJar(String jarFilePath,
String subPath,
String fileName) |
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) |
protected static final String META_INF
protected static final String KMODULE_XML
protected static final String KIE_DEPLOYMENT_DESCRIPTOR_XML
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)
protected String loadKieTextFromJar(String jarFilePath, String subPath, String fileName)
protected static String loadFileTextFromJar(File jarFile, String path, String fileName)
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–2020 JBoss by Red Hat. All rights reserved.