public class DeploymentUpdater
extends java.lang.Object
isCopyFilesIntoGit()
.
For some common containers like Tomcat we also auto-detect special files like OPENSHIFT_CONFIG_CATALINA_PROPERTIES
so that we can enable the use of a shared folder for deploying jars on a shared classpath across deployment units.
This allows, for example, shared features to be used across deployment units; such as, say, Apache Camel jars to be installed
and shared across all web applications in the container.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPENSHIFT_CONFIG_CATALINA_PROPERTIES |
Constructor and Description |
---|
DeploymentUpdater(io.fabric8.agent.download.DownloadManager downloadManager,
io.fabric8.api.Container container,
java.lang.String webAppDir,
java.lang.String deployDir) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDeploymentsIntoPom(org.eclipse.jgit.api.Git git,
java.io.File baseDir,
io.fabric8.api.Profile profile,
java.util.Set<java.lang.String> bundles,
java.util.Set<org.apache.karaf.features.Feature> features)
|
protected void |
copyDeploymentsIntoGit(org.eclipse.jgit.api.Git git,
java.io.File baseDir,
java.util.Set<java.lang.String> bundles,
java.util.Set<org.apache.karaf.features.Feature> features)
|
protected void |
deleteFiles(org.eclipse.jgit.api.Git git,
java.io.File baseDir,
java.lang.String path,
java.util.List<java.lang.String> fileNames) |
protected void |
enableDeployDirectory(org.eclipse.jgit.api.Git git,
java.io.File baseDir)
Checks things like Tomcat to see if the deployDir needs to be added to the shared class loader
|
protected java.util.List<java.lang.String> |
filesToDelete(java.io.File baseDir,
java.lang.String path)
Returns a list of file names contained in the path from the given base directory or an empty
list if the path is null or the directory does not exist
|
java.lang.String |
getDeployDir() |
java.lang.String |
getRepositories() |
java.lang.String |
getWebAppDir() |
boolean |
isCopyFilesIntoGit() |
protected java.util.List<io.fabric8.agent.mvn.MavenRepositoryURL> |
parseMavenRepositoryURLs() |
void |
setCopyFilesIntoGit(boolean copyFilesIntoGit) |
void |
setRepositories(java.lang.String repositories) |
void |
updateDeployment(org.eclipse.jgit.api.Git git,
java.io.File baseDir,
org.eclipse.jgit.transport.CredentialsProvider credentials) |
public static final java.lang.String OPENSHIFT_CONFIG_CATALINA_PROPERTIES
public DeploymentUpdater(io.fabric8.agent.download.DownloadManager downloadManager, io.fabric8.api.Container container, java.lang.String webAppDir, java.lang.String deployDir)
public void updateDeployment(org.eclipse.jgit.api.Git git, java.io.File baseDir, org.eclipse.jgit.transport.CredentialsProvider credentials) throws java.lang.Exception
java.lang.Exception
protected void copyDeploymentsIntoGit(org.eclipse.jgit.api.Git git, java.io.File baseDir, java.util.Set<java.lang.String> bundles, java.util.Set<org.apache.karaf.features.Feature> features) throws java.lang.Exception
java.lang.Exception
protected void addDeploymentsIntoPom(org.eclipse.jgit.api.Git git, java.io.File baseDir, io.fabric8.api.Profile profile, java.util.Set<java.lang.String> bundles, java.util.Set<org.apache.karaf.features.Feature> features) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, javax.xml.xpath.XPathExpressionException, java.io.IOException, javax.xml.transform.TransformerException, org.eclipse.jgit.api.errors.GitAPIException
webAppDir
or deployDir
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
javax.xml.xpath.XPathExpressionException
java.io.IOException
javax.xml.transform.TransformerException
org.eclipse.jgit.api.errors.GitAPIException
protected java.util.List<io.fabric8.agent.mvn.MavenRepositoryURL> parseMavenRepositoryURLs() throws java.net.MalformedURLException
java.net.MalformedURLException
protected void enableDeployDirectory(org.eclipse.jgit.api.Git git, java.io.File baseDir) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
protected java.util.List<java.lang.String> filesToDelete(java.io.File baseDir, java.lang.String path)
protected void deleteFiles(org.eclipse.jgit.api.Git git, java.io.File baseDir, java.lang.String path, java.util.List<java.lang.String> fileNames) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
public java.lang.String getWebAppDir()
public java.lang.String getDeployDir()
public boolean isCopyFilesIntoGit()
public void setCopyFilesIntoGit(boolean copyFilesIntoGit)
public java.lang.String getRepositories()
public void setRepositories(java.lang.String repositories)
Copyright © 2016 Red Hat. All Rights Reserved.