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
\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
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