1 package org
.argeo
.slc
.support
.deploy
;
5 import org
.apache
.commons
.logging
.Log
;
6 import org
.apache
.commons
.logging
.LogFactory
;
7 import org
.argeo
.slc
.SlcException
;
8 import org
.argeo
.slc
.build
.Distribution
;
9 import org
.argeo
.slc
.deploy
.DeployEnvironment
;
10 import org
.argeo
.slc
.deploy
.DeployedSystem
;
11 import org
.argeo
.slc
.deploy
.Deployment
;
12 import org
.argeo
.slc
.deploy
.DeploymentData
;
13 import org
.argeo
.slc
.deploy
.TargetData
;
15 public class HttpdApplicationDeployment
implements Deployment
{
16 private static final Log log
= LogFactory
17 .getLog(HttpdApplicationDeployment
.class);
19 private HttpdApplicationTargetData targetData
;
20 private DeploymentData deploymentData
;
21 private SimpleHttpdApplication deployedSystem
;
22 private Distribution distribution
;
24 private DeployEnvironment deployEnvironment
;
28 deployEnvironment
.unpackTo(distribution
, targetData
29 .getTargetRootLocation(), null);
31 // FIXME: make it generic
32 String deployDataPath
= targetData
.getTargetRootLocation()
35 deployEnvironment
.unpackTo(deploymentData
,
36 new File(deployDataPath
), null);
37 deployedSystem
= new SimpleHttpdApplication();
38 deployedSystem
.setTargetData(targetData
);
40 log
.info("Deployed " + distribution
+ " to " + targetData
);
41 } catch (Exception e
) {
42 throw new SlcException("Cannot deploy " + distribution
+ " to "
48 public void setTargetData(TargetData targetData
) {
49 this.targetData
= (HttpdApplicationTargetData
) targetData
;
52 public void setDeploymentData(DeploymentData deploymentData
) {
53 this.deploymentData
= deploymentData
;
56 public DeployedSystem
getDeployedSystem() {
57 return deployedSystem
;
60 public void setDistribution(Distribution distribution
) {
61 this.distribution
= distribution
;
64 public void setDeployEnvironment(DeployEnvironment deployEnvironment
) {
65 this.deployEnvironment
= deployEnvironment
;