01: /*
02: * Copyright 2006 Luca Garulli (luca.garulli@assetdata.it)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.romaframework.wizard.command.project.impl;
18:
19: import java.io.File;
20:
21: import org.apache.tools.ant.launch.Launcher;
22: import org.romaframework.wizard.MainWizard;
23: import org.romaframework.wizard.command.project.OptionalProjectBaseWizardCommand;
24:
25: /**
26: * This wizard set the current project in roma config. See help to know syntax.
27: *
28: * @author Luca Garulli (luca.garulli@assetdata.it)
29: */
30: public class ProjectInfoWizard extends OptionalProjectBaseWizardCommand {
31: public String getName() {
32: return "info";
33: }
34:
35: public void execute(String[] iParameters) {
36:
37: iParameters = parseOptionalParameters(iParameters);
38:
39: File script = new File(MainWizard.getRomaHome()
40: + "common/wizard/base-wizard.xml");
41: if (script.exists()) {
42: Launcher.main(new String[] { "-f",
43: script.getAbsolutePath(), "show-project-info",
44: "-Dproject.name=" + projectName });
45: }
46: }
47: }
|