@Test public void checkTargetDefaultMatches() throws Exception { Cli c = new Cli(); c.run( new String[] {} ); ManipulationSession session = (ManipulationSession) FieldUtils.readField( c, "session", true ); File defaultTarget = (File) FieldUtils.readField( c, "target", true ); assertEquals( "Session file should match", defaultTarget, session.getPom() ); }
@SuppressWarnings("WeakerAccess") public int run( String[] args ) { CommandLine cl = new CommandLine(this); cl.setUsageHelpAutoWidth(true); cl.setExecutionStrategy(new CommandLine.RunAll()); cl.setOverwrittenOptionsAllowed(true); return cl.execute(args); }
Cli implements Callable<Integer> { @SuppressWarnings("WeakerAccess") public int run( String[] args ) { CommandLine cl = new CommandLine(this); cl.setUsageHelpAutoWidth(true); cl.setExecutionStrategy(new CommandLine.RunAll()); cl.setOverwrittenOptionsAllowed(true); return cl.execute(args); } }
Cli implements Callable<Integer> { @SuppressWarnings("WeakerAccess") public int run( String[] args ) { CommandLine cl = new CommandLine(this); cl.setUsageHelpAutoWidth(true); cl.setExecutionStrategy(new CommandLine.RunAll()); cl.setOverwrittenOptionsAllowed(true); return cl.execute(args); }  }
Cli implements Callable<Integer> { @SuppressWarnings("WeakerAccess") public int run( String[] args ) { CommandLine cl = new CommandLine(this); cl.setUsageHelpAutoWidth(true); cl.setExecutionStrategy(new CommandLine.RunAll()); cl.setOverwrittenOptionsAllowed(true); return cl.execute(args); }  static void main( String[] args ); @SuppressWarnings("WeakerAccess") // Public API. int run( String[] args ); @Override Integer call(); }
Cli implements Callable<Integer> { @SuppressWarnings("WeakerAccess") public int run( String[] args ) { CommandLine cl = new CommandLine(this); cl.setUsageHelpAutoWidth(true); cl.setExecutionStrategy(new CommandLine.RunAll()); cl.setOverwrittenOptionsAllowed(true); return cl.execute(args); }  static void main( String[] args ); @SuppressWarnings("WeakerAccess") // Public API. int run( String[] args ); @Override Integer call();  }