3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.cdm
.server
;
13 import org
.apache
.commons
.cli
.Option
;
14 import org
.apache
.commons
.cli
.OptionBuilder
;
15 import org
.apache
.commons
.cli
.Options
;
17 public class CommandOptions
{
19 private static Options options
= null;
21 public static final Option HELP
= new Option( "help", "print this message" );
22 public static final Option JMX
= new Option( "jmx", "Start the server with the Jetty MBeans. " );
24 @SuppressWarnings("static-access")
25 public static final Option WEBAPP
= OptionBuilder
28 .withDescription( "use the specified webapplication this either can be a compresses war or extracted file. " +
29 "If this options is used extraction of the war from the cdmserver jar file is omitted." +
30 "Developers can run the server completely from the traget folder or completly from source " +
31 "when using the following paths: \n" +
32 "'{cdmlib-project-root}/cdmlib-remote/target/cdmserver' " +
33 "'{cdmlib-project-root}/cdmlib-remote/src/main/webapp' " )
36 @SuppressWarnings("static-access")
37 public static final Option HTTP_PORT
= OptionBuilder
38 .withArgName("httpPortNumber")
40 .withDescription( "set the http listening port. Default is 8080")
43 @SuppressWarnings("static-access")
44 public static final Option DATASOURCES_FILE
= OptionBuilder
45 .withArgName("datasourcesfile")
47 .withDescription( "use the specified datasources file. Default is {user.home}/.cdmLibrary/datasources.xml")
48 .create("datasources");
52 public static Options
getOptions(){
54 options
= new Options();
55 options
.addOption(HELP
);
56 options
.addOption(WEBAPP
);
57 options
.addOption(HTTP_PORT
);
58 options
.addOption(DATASOURCES_FILE
);
59 options
.addOption(JMX
);