public static File createAppPackageFile(){
  final String version=System.getProperty("apex.version");
  final List<String> params=new LinkedList<>();
  params.add("clean");
  params.add("package");
  params.add("-DskipTests");
  if (version != null && version.length() > 0) {
    params.add("-Dapex.version=" + version);
  }
  Assert.assertEquals(0,mavenCli.doMain(params.toArray(new String[params.size()]),workingDirectory,System.out,System.err));
  return new File(workingDirectory,"target/mydtapp-1.0-SNAPSHOT.apa");
}

public static File createAppPackageFile ( ) { final String version = System . getProperty ( "apex.version" ) ; final List < String > params = new LinkedList < > ( ) ; params . add ( "clean" ) ; params . add ( "package" ) ; params . add ( "-DskipTests" ) ; if ( version != null && version . length ( ) > 0 ) { params . add ( "-Dapex.version=" + version ) ; } Assert . assertEquals ( 0 , mavenCli . doMain ( params . toArray ( new String [ params . size ( ) ] ) , workingDirectory , System . out , System . err ) ) ; return new File ( workingDirectory , "target/mydtapp-1.0-SNAPSHOT.apa" ) ; }
create an apppackage zip using the sample apppackage located in src / test / resources / testapppackage / testapppackagesrc .
