public class DeploymentUpdater extends 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 String |
OPENSHIFT_CONFIG_CATALINA_PROPERTIES |
Constructor and Description |
---|
DeploymentUpdater(io.fabric8.agent.download.DownloadManager downloadManager,
io.fabric8.api.FabricService fabricService,
io.fabric8.api.Container container,
String webAppDir,
String deployDir) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDeploymentsIntoPom(org.eclipse.jgit.api.Git git,
File baseDir,
io.fabric8.api.Profile profile,
Set<String> bundles,
Set<org.apache.karaf.features.Feature> features)
|
protected void |
copyDeploymentsIntoGit(org.eclipse.jgit.api.Git git,
File baseDir,
Set<String> bundles,
Set<org.apache.karaf.features.Feature> features)
|
protected void |
deleteFiles(org.eclipse.jgit.api.Git git,
File baseDir,
String path,
List<String> fileNames) |
protected void |
enableDeployDirectory(org.eclipse.jgit.api.Git git,
File baseDir)
Checks things like Tomcat to see if the deployDir needs to be added to the shared class loader
|
protected List<String> |
filesToDelete(File baseDir,
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
|
String |
getDeployDir() |
String |
getRepositories() |
String |
getWebAppDir() |
boolean |
isCopyFilesIntoGit() |
protected List<io.fabric8.agent.mvn.MavenRepositoryURL> |
parseMavenRepositoryURLs() |
void |
setCopyFilesIntoGit(boolean copyFilesIntoGit) |
void |
setRepositories(String repositories) |
void |
updateDeployment(org.eclipse.jgit.api.Git git,
File baseDir,
org.eclipse.jgit.transport.CredentialsProvider credentials) |
public static final String OPENSHIFT_CONFIG_CATALINA_PROPERTIES
public void updateDeployment(org.eclipse.jgit.api.Git git, File baseDir, org.eclipse.jgit.transport.CredentialsProvider credentials) throws Exception
Exception
protected void copyDeploymentsIntoGit(org.eclipse.jgit.api.Git git, File baseDir, Set<String> bundles, Set<org.apache.karaf.features.Feature> features) throws Exception
Exception
protected void addDeploymentsIntoPom(org.eclipse.jgit.api.Git git, File baseDir, io.fabric8.api.Profile profile, Set<String> bundles, Set<org.apache.karaf.features.Feature> features) throws SAXException, ParserConfigurationException, XPathExpressionException, IOException, TransformerException, org.eclipse.jgit.api.errors.GitAPIException
webAppDir
or deployDir
SAXException
ParserConfigurationException
XPathExpressionException
IOException
TransformerException
org.eclipse.jgit.api.errors.GitAPIException
protected List<io.fabric8.agent.mvn.MavenRepositoryURL> parseMavenRepositoryURLs() throws MalformedURLException
MalformedURLException
protected void enableDeployDirectory(org.eclipse.jgit.api.Git git, File baseDir) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
protected List<String> filesToDelete(File baseDir, String path)
protected void deleteFiles(org.eclipse.jgit.api.Git git, File baseDir, String path, List<String> fileNames) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
public String getWebAppDir()
public String getDeployDir()
public boolean isCopyFilesIntoGit()
public void setCopyFilesIntoGit(boolean copyFilesIntoGit)
public String getRepositories()
public void setRepositories(String repositories)
Copyright © 2011–2014 Red Hat. All rights reserved.