1 /**
2 *
3 * Copyright 2004-2006 The Apache Software Foundation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package org.apache.geronimo.plugins.deployment;
19
20 import java.io.File;
21
22 import javax.enterprise.deploy.spi.DeploymentManager;
23 import javax.enterprise.deploy.spi.Target;
24 import javax.enterprise.deploy.spi.status.ProgressObject;
25
26 import org.apache.geronimo.plugins.util.DeploymentClient;
27
28
29
30
31
32 /**
33 * ???
34 *
35 * @goal distribute
36 *
37 * @version $Rev: 437248 $ $Date: 2006-08-26 16:39:49 -0700 (Sat, 26 Aug 2006) $
38 */
39 public class DistributeModuleMojo extends AbstractModuleMojo {
40
41 /**
42 * @parameter
43 */
44 private File module;
45
46 /**
47 * @parameter
48 */
49 private File plan;
50
51 protected void doExecute() throws Exception {
52 DeploymentManager manager = getDeploymentManager();
53 Target[] targets = manager.getTargets();
54
55 ProgressObject progress = manager.distribute(targets, module, plan);
56 DeploymentClient.waitFor(progress);
57 }
58 }