Returns the arguments required to call "eclipsec" and run the p2 director application to install the artifacts from the repos in this model into the given directory and profile.
(File dstFolder, String profile)
| 312 | * to install the artifacts from the repos in this model into the given directory and profile. |
| 313 | */ |
| 314 | public DirectorApp directorApp(File dstFolder, String profile) { |
| 315 | return performWithoutMissingBundlePool(() -> { |
| 316 | DirectorApp builder = new DirectorApp(); |
| 317 | builder.clean(); |
| 318 | builder.consolelog(); |
| 319 | repos.forEach(repo -> builder.addArg("repository", repo)); |
| 320 | metadataRepos.forEach(repo -> builder.addArg("metadataRepository", repo)); |
| 321 | artifactRepos.forEach(repo -> builder.addArg("artifactRepository", repo)); |
| 322 | ius.forEach(iu -> builder.addArg("installIU", iu)); |
| 323 | builder.addArg("profile", profile); |
| 324 | builder.addArg("destination", FileMisc.asUrl(dstFolder)); |
| 325 | // deletes cached repository information, which will often include local paths |
| 326 | builder.doLast.add(() -> { |
| 327 | Path path = dstFolder.toPath().resolve("p2/org.eclipse.equinox.p2.engine/.settings"); |
| 328 | FileUtils.deleteDirectory(path.toFile()); |
| 329 | }); |
| 330 | return builder; |
| 331 | }); |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * An extension of EclipseApp with typed methods appropriate for p2 director. |