本文整理汇总了Java中org.eclipse.wst.server.core.IServer.PUBLISH_FULL属性的典型用法代码示例。如果您正苦于以下问题:Java IServer.PUBLISH_FULL属性的具体用法?Java IServer.PUBLISH_FULL怎么用?Java IServer.PUBLISH_FULL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.wst.server.core.IServer
的用法示例。
在下文中一共展示了IServer.PUBLISH_FULL属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: publishJar
protected void publishJar(String jarURI, Properties properties, List<IStatus> statuses,
IProgressMonitor monitor) throws CoreException {
IPath path = getModuleDeployDirectory(module[0]);
boolean moving = false;
// Get URI used for previous publish, if known
String oldURI = (String) properties.get(module[1].getId());
if (oldURI != null) {
// If old URI found, detect if jar is moving or changing its name
if (jarURI != null) {
moving = !oldURI.equals(jarURI);
}
}
// If we don't have a jar URI, make a guess so we have one if we need it
if (jarURI == null) {
jarURI = "WEB-INF/lib/" + module[1].getName() + ".jar";
}
IPath jarPath = path.append(jarURI);
// Make our best determination of the path to the old jar
IPath oldJarPath = jarPath;
if (oldURI != null) {
oldJarPath = path.append(oldURI);
}
// Establish the destination directory
path = jarPath.removeLastSegments(1);
// Remove if requested or if previously published and are now serving without publishing
if (moving || kind == IServer.PUBLISH_CLEAN || deltaKind == ServerBehaviourDelegate.REMOVED
|| isServeModulesWithoutPublish()) {
File file = oldJarPath.toFile();
if (file.exists())
file.delete();
properties.remove(module[1].getId());
if (deltaKind == ServerBehaviourDelegate.REMOVED
|| isServeModulesWithoutPublish())
return;
}
if (!moving && kind != IServer.PUBLISH_CLEAN && kind != IServer.PUBLISH_FULL) {
// avoid changes if no changes to module since last publish
IModuleResourceDelta[] delta = getPublishedResourceDelta(module);
if (delta == null || delta.length == 0)
return;
}
// make directory if it doesn't exist
if (!path.toFile().exists()) {
path.toFile().mkdirs();
}
IModuleResource[] mr = getResources(module);
IStatus[] status = helper.publishZip(mr, jarPath, monitor);
addArrayToList(statuses, status);
properties.put(module[1].getId(), jarURI);
}
示例2: publishArchiveModule
protected void publishArchiveModule(String jarURI, Properties p, List<IStatus> statuses,
IProgressMonitor monitor) {
IPath path = getModuleDeployDirectory(module[0]);
boolean moving = false;
// Get URI used for previous publish, if known
String oldURI = (String) p.get(module[1].getId());
if (oldURI != null) {
// If old URI found, detect if jar is moving or changing its name
if (jarURI != null) {
moving = !oldURI.equals(jarURI);
}
}
// If we don't have a jar URI, make a guess so we have one if we need it
if (jarURI == null) {
jarURI = "WEB-INF/lib/" + module[1].getName();
}
IPath jarPath = path.append(jarURI);
// Make our best determination of the path to the old jar
IPath oldJarPath = jarPath;
if (oldURI != null) {
oldJarPath = path.append(oldURI);
}
// Establish the destination directory
path = jarPath.removeLastSegments(1);
// Remove if requested or if previously published and are now serving without publishing
if (moving || kind == IServer.PUBLISH_CLEAN || deltaKind == ServerBehaviourDelegate.REMOVED
|| isServeModulesWithoutPublish()) {
File file = oldJarPath.toFile();
if (file.exists()) {
file.delete();
}
p.remove(module[1].getId());
if (deltaKind == ServerBehaviourDelegate.REMOVED
|| isServeModulesWithoutPublish()) {
return;
}
}
if (!moving && kind != IServer.PUBLISH_CLEAN && kind != IServer.PUBLISH_FULL) {
// avoid changes if no changes to module since last publish
IModuleResourceDelta[] delta = getPublishedResourceDelta(module);
if (delta == null || delta.length == 0) {
return;
}
}
// make directory if it doesn't exist
if (!path.toFile().exists()) {
path.toFile().mkdirs();
}
IModuleResource[] mr = getResources(module);
IStatus[] status = helper.publishToPath(mr, jarPath, monitor);
addArrayToList(statuses, status);
p.put(module[1].getId(), jarURI);
}