001
014
015 package com.liferay.portal.tools.deploy;
016
017 import com.liferay.portal.kernel.plugin.PluginPackage;
018 import com.liferay.portal.model.Plugin;
019 import com.liferay.portal.util.InitUtil;
020
021 import java.io.File;
022
023 import java.util.ArrayList;
024 import java.util.List;
025
026
029 public class HookDeployer extends BaseDeployer {
030
031 public static void main(String[] args) {
032 InitUtil.initWithSpring();
033
034 List<String> wars = new ArrayList<String>();
035 List<String> jars = new ArrayList<String>();
036
037 for (String arg : args) {
038 if (arg.endsWith(".war")) {
039 wars.add(arg);
040 }
041 else if (arg.endsWith(".jar")) {
042 jars.add(arg);
043 }
044 }
045
046 new HookDeployer(wars, jars);
047 }
048
049 public HookDeployer() {
050 }
051
052 public HookDeployer(List<String> wars, List<String> jars) {
053 super(wars, jars);
054 }
055
056 @Override
057 public void copyXmls(
058 File srcFile, String displayName, PluginPackage pluginPackage)
059 throws Exception {
060
061 super.copyXmls(srcFile, displayName, pluginPackage);
062
063 copyTomcatContextXml(srcFile);
064 }
065
066 @Override
067 public String getPluginType() {
068 return Plugin.TYPE_HOOK;
069 }
070
071 }