]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/support/deploy/HttpdApplicationDeployment.java
git-svn-id: https://svn.argeo.org/slc/trunk@1286 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / support / deploy / HttpdApplicationDeployment.java
index 79eb0bd4fb318f60e276e126d15d989e01881758..6c6cffdce05a04e3256baff08735bbd59840c228 100644 (file)
@@ -8,11 +8,11 @@ import org.argeo.slc.core.SlcException;
 import org.argeo.slc.core.build.Distribution;\r
 import org.argeo.slc.core.deploy.DeployEnvironment;\r
 import org.argeo.slc.core.deploy.DeployedSystem;\r
+import org.argeo.slc.core.deploy.Deployment;\r
 import org.argeo.slc.core.deploy.DeploymentData;\r
-import org.argeo.slc.core.deploy.ExecutableDeployment;\r
 import org.argeo.slc.core.deploy.TargetData;\r
 \r
-public class HttpdApplicationDeployment implements ExecutableDeployment {\r
+public class HttpdApplicationDeployment implements Deployment {\r
        private static final Log log = LogFactory\r
                        .getLog(HttpdApplicationDeployment.class);\r
 \r
@@ -25,20 +25,21 @@ public class HttpdApplicationDeployment implements ExecutableDeployment {
 \r
        public void execute() {\r
                try {\r
-                       deployEnvironment.unpackTo(getDistribution(), targetData\r
+                       deployEnvironment.unpackTo(distribution, targetData\r
                                        .getTargetRootLocation(), null);\r
-                       \r
+\r
                        // FIXME: make it generic\r
                        String deployDataPath = targetData.getTargetRootLocation()\r
                                        .getCanonicalPath();\r
-                       \r
-                       deployEnvironment.unpackTo(getDeploymentData(), new File(\r
-                                       deployDataPath), null);\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 " + deploymentData + " to "\r
+                       throw new SlcException("Cannot deploy " + distribution + " to "\r
                                        + targetData, e);\r
                }\r
 \r
@@ -56,18 +57,6 @@ public class HttpdApplicationDeployment implements ExecutableDeployment {
                return deployedSystem;\r
        }\r
 \r
-       public DeploymentData getDeploymentData() {\r
-               return deploymentData;\r
-       }\r
-\r
-       public TargetData getTargetData() {\r
-               return targetData;\r
-       }\r
-\r
-       public Distribution getDistribution() {\r
-               return distribution;\r
-       }\r
-\r
        public void setDistribution(Distribution distribution) {\r
                this.distribution = distribution;\r
        }\r