1919import static io .aklivity .zilla .runtime .engine .EngineConfiguration .ENGINE_DIRECTORY ;
2020import static io .aklivity .zilla .runtime .engine .EngineConfiguration .ENGINE_VERBOSE ;
2121import static io .aklivity .zilla .runtime .engine .EngineConfiguration .ENGINE_WORKERS ;
22+ import static io .aklivity .zilla .runtime .engine .EngineConfiguration .ZILLA_DIRECTORY_PROPERTY ;
2223import static java .lang .Runtime .getRuntime ;
2324import static org .agrona .LangUtil .rethrowUnchecked ;
2425
4546@ Command (name = "start" , description = "Start engine" )
4647public final class ZillaStartCommand extends ZillaCommand
4748{
48- private static final String OPTION_PROPERTIES_PATH_DEFAULT = ".zilla/zilla.properties" ;
49+ private static final String ZILLA_DIRECTORY = System .getProperty (ZILLA_DIRECTORY_PROPERTY , "." );
50+ private static final String OPTION_PROPERTIES_PATH_DEFAULT = String .format ("%s/.zilla/zilla.properties" , ZILLA_DIRECTORY );
51+ private static final String ZILLA_ENGINE_PATH_DEFAULT = String .format ("%s/.zilla/engine" , ZILLA_DIRECTORY );
4952
5053 private final CountDownLatch stop = new CountDownLatch (1 );
5154 private final CountDownLatch stopped = new CountDownLatch (1 );
5255
5356 @ Option (name = {"-c" , "--config" },
54- description = "Configuration location" ,
55- hidden = true )
57+ description = "Configuration location" )
5658 public URI configURI ;
5759
5860 @ Option (name = {"-v" , "--verbose" },
@@ -64,26 +66,23 @@ public final class ZillaStartCommand extends ZillaCommand
6466 public int workers = -1 ;
6567
6668 @ Option (name = {"-P" , "--property" },
67- description = "Property name=value" ,
68- hidden = true )
69+ description = "Property name=value" )
6970 public List <String > properties ;
7071
7172 @ Option (name = {"-p" , "--properties" },
72- description = "Path to properties" ,
73- hidden = true )
73+ description = "Path to properties" )
7474 public String propertiesPath ;
7575
76- @ Option (name = "-e" ,
77- description = "Show exception traces" ,
78- hidden = true )
76+ @ Option (name = {"-e" , "--exception-traces" },
77+ description = "Show exception traces" )
7978 public boolean exceptions ;
8079
8180 @ Override
8281 public void run ()
8382 {
8483 Runtime runtime = getRuntime ();
8584 Properties props = new Properties ();
86- props .setProperty (ENGINE_DIRECTORY .name (), ".zilla/engine" );
85+ props .setProperty (ENGINE_DIRECTORY .name (), ZILLA_ENGINE_PATH_DEFAULT );
8786
8887 Path path = Paths .get (propertiesPath != null ? propertiesPath : OPTION_PROPERTIES_PATH_DEFAULT );
8988 if (Files .exists (path ) || propertiesPath != null )
0 commit comments