-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.support.deploy;\r
-\r
-import java.io.File;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.build.Distribution;\r
-import org.argeo.slc.deploy.DeployEnvironment;\r
-import org.argeo.slc.deploy.DeployedSystem;\r
-import org.argeo.slc.deploy.Deployment;\r
-import org.argeo.slc.deploy.DeploymentData;\r
-import org.argeo.slc.deploy.TargetData;\r
-\r
-public class HttpdApplicationDeployment implements Deployment {\r
- private static final Log log = LogFactory\r
- .getLog(HttpdApplicationDeployment.class);\r
-\r
- private HttpdApplicationTargetData targetData;\r
- private DeploymentData deploymentData;\r
- private SimpleHttpdApplication deployedSystem;\r
- private Distribution distribution;\r
-\r
- private DeployEnvironment deployEnvironment;\r
-\r
- public void run() {\r
- try {\r
- deployEnvironment.unpackTo(distribution, targetData\r
- .getTargetRootLocation(), null);\r
-\r
- // FIXME: make it generic\r
- String deployDataPath = targetData.getTargetRootLocation()\r
- .getCanonicalPath();\r
-\r
- deployEnvironment.unpackTo(deploymentData,\r
- new File(deployDataPath), null);\r
- deployedSystem = new SimpleHttpdApplication();\r
- deployedSystem.setTargetData(targetData);\r
-\r
- log.info("Deployed " + distribution + " to " + targetData);\r
- } catch (Exception e) {\r
- throw new SlcException("Cannot deploy " + distribution + " to "\r
- + targetData, e);\r
- }\r
-\r
- }\r
-\r
- public void setTargetData(TargetData targetData) {\r
- this.targetData = (HttpdApplicationTargetData) targetData;\r
- }\r
-\r
- public void setDeploymentData(DeploymentData deploymentData) {\r
- this.deploymentData = deploymentData;\r
- }\r
-\r
- public DeployedSystem getDeployedSystem() {\r
- return deployedSystem;\r
- }\r
-\r
- public void setDistribution(Distribution distribution) {\r
- this.distribution = distribution;\r
- }\r
-\r
- public void setDeployEnvironment(DeployEnvironment deployEnvironment) {\r
- this.deployEnvironment = deployEnvironment;\r
- }\r
-\r
-}\r
+package org.argeo.slc.support.deploy;
+
+import java.io.File;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.build.Distribution;
+import org.argeo.slc.deploy.DeployEnvironment;
+import org.argeo.slc.deploy.DeployedSystem;
+import org.argeo.slc.deploy.Deployment;
+import org.argeo.slc.deploy.DeploymentData;
+import org.argeo.slc.deploy.TargetData;
+
+public class HttpdApplicationDeployment implements Deployment {
+ private static final Log log = LogFactory
+ .getLog(HttpdApplicationDeployment.class);
+
+ private HttpdApplicationTargetData targetData;
+ private DeploymentData deploymentData;
+ private SimpleHttpdApplication deployedSystem;
+ private Distribution distribution;
+
+ private DeployEnvironment deployEnvironment;
+
+ public void run() {
+ try {
+ deployEnvironment.unpackTo(distribution, targetData
+ .getTargetRootLocation(), null);
+
+ // FIXME: make it generic
+ String deployDataPath = targetData.getTargetRootLocation()
+ .getCanonicalPath();
+
+ deployEnvironment.unpackTo(deploymentData,
+ new File(deployDataPath), null);
+ deployedSystem = new SimpleHttpdApplication();
+ deployedSystem.setTargetData(targetData);
+
+ log.info("Deployed " + distribution + " to " + targetData);
+ } catch (Exception e) {
+ throw new SlcException("Cannot deploy " + distribution + " to "
+ + targetData, e);
+ }
+
+ }
+
+ public void setTargetData(TargetData targetData) {
+ this.targetData = (HttpdApplicationTargetData) targetData;
+ }
+
+ public void setDeploymentData(DeploymentData deploymentData) {
+ this.deploymentData = deploymentData;
+ }
+
+ public DeployedSystem getDeployedSystem() {
+ return deployedSystem;
+ }
+
+ public void setDistribution(Distribution distribution) {
+ this.distribution = distribution;
+ }
+
+ public void setDeployEnvironment(DeployEnvironment deployEnvironment) {
+ this.deployEnvironment = deployEnvironment;
+ }
+
+}