public class DeployUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DeployUtil.DeployDescriptorInfo
Provides information about deployment descriptor file location and its content
(copy of class with the same name in lr-test-engine project)
|
| Modifier and Type | Field and Description |
|---|---|
static Object |
LIVEREBEL_DEPLOY_LOCK
lock used for synchronizing deploy and undeploy operations so that when server has autodeploy functionality, then
we can disable it while performing either deploy or undeploy with LiveRebel
|
| Constructor and Description |
|---|
DeployUtil() |
| Modifier and Type | Method and Description |
|---|---|
static File |
copyFileToDirectory(File srcFile,
File destDir,
String contextPath)
Copies the given archive to a directory optionally using the context path as the new name.
|
static File |
getDeploymentFile(File srcFile,
File destDir,
String contextPath)
Returns a deployment file path in destination directory corresponding to the given context path
(if
null the source file name will be used). |
static File |
getDeploymentFile(File srcFile,
File destDir,
String contextPath,
String deploymentFileNameInfix) |
static boolean |
isMarkedDeployment(String path) |
static void |
markDeployment(File file)
Marks the given deployment.
|
static void |
markDeployment(String path)
Marks the given deployment.
|
static File |
prepareAndMoveDeployment(File originalArchive,
File deployDir,
String contextPath,
String virtualHostName,
String rootName,
DeployUtil.DeployDescriptorInfo descriptorInfo)
Creates new deployment archive based on
originalArchive by adding deployment descriptor with context path and virtualHostName, and places it to the deployDir |
static boolean |
unmarkDeployment(File file)
Unmarks the given deployment.
|
static boolean |
unmarkDeployment(String path)
Unmarks the given deployment.
|
static boolean |
unmarkDeploymentURL(String url)
Unmarks the given deployment.
|
static boolean |
unmarkDeploymentURL(URL url)
Unmarks the given deployment.
|
public static final Object LIVEREBEL_DEPLOY_LOCK
public static File copyFileToDirectory(File srcFile, File destDir, String contextPath) throws IOException
The file extension will be preserved.
If the context path is null the original file name will be used.
srcFile - deployment archive (typically JAR, WAR or EAR) not null.destDir - destination directory (not null).contextPath - context path of the web application (or null).IOExceptionpublic static File getDeploymentFile(File srcFile, File destDir, String contextPath)
null the source file name will be used).srcFile - deployment archive (typically JAR, WAR or EAR) not null.destDir - destination directory (not null).contextPath - context path of the web application (or null).public static File getDeploymentFile(File srcFile, File destDir, String contextPath, String deploymentFileNameInfix)
public static void markDeployment(File file)
public static void markDeployment(String path)
public static boolean unmarkDeploymentURL(String url)
true if the given deployment was actually marked.public static boolean unmarkDeploymentURL(URL url)
true if the given deployment was actually marked.public static boolean unmarkDeployment(File file)
true if the given deployment was actually marked.public static boolean unmarkDeployment(String path)
true if the given deployment was actually marked.public static boolean isMarkedDeployment(String path)
true if the given deployment is marked.public static File prepareAndMoveDeployment(File originalArchive, File deployDir, String contextPath, String virtualHostName, String rootName, DeployUtil.DeployDescriptorInfo descriptorInfo) throws IOException
originalArchive by adding deployment descriptor with context path and virtualHostName, deployDirIOExceptionCopyright © 2015. All rights reserved.