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 org.romaframework.wizard.command.project.OptionalProjectBaseWizardCommand;
20:
21: /**
22: * This wizard create a brand new project. See help to know syntax.
23: *
24: * @author Luca Garulli (luca.garulli@assetdata.it)
25: */
26: public class ProjectUpdateWizard extends
27: OptionalProjectBaseWizardCommand {
28: public String getName() {
29: return "update";
30: }
31:
32: @Override
33: public String getParameters() {
34: return super .getParameters() + " [<module-name>]";
35: }
36:
37: public void execute(String[] iParameters) {
38: if (iParameters.length < 2)
39: syntaxError();
40:
41: iParameters = parseOptionalParameters(iParameters);
42: }
43:
44: @Override
45: public void help() {
46: super .help();
47:
48: StringBuffer buffer = new StringBuffer();
49: buffer
50: .append(" <module-name> is the module you want to update the project specified");
51: buffer.append("\n");
52: buffer.append("\nExamples:");
53: buffer.append("\n");
54: buffer
55: .append("\nroma "
56: + getName()
57: + " * > will update all the modules of the current project to the version available locally");
58: buffer
59: .append("\nroma "
60: + getName()
61: + " -pAventinus persistence-jpox > will update only the module 'persistence-jpox' of the project 'Aventinus'");
62:
63: getIO().getOutput().println(buffer);
64: }
65: }
|