/** * Installs a feature-pack provided as a local archive. * * @param featurePack path to feature-pack archive * @param installInUniverse whether to install the feature-pack artifact into the universe repository * @throws ProvisioningException in case installation fails */ public void install(Path featurePack, boolean installInUniverse) throws ProvisioningException { install(getLayoutFactory().addLocal(featurePack, installInUniverse)); }
/** * Builds a layout for the configuration including the feature-pack contained in the local archive. * Optionally, installs the feature-pack archive to the universe repository. * * @param featurePack feature-pack archive * @param installInUniverse whether to install the feature-pack into the universe repository * @return layout * @throws ProvisioningException in case of a failure */ public ProvisioningLayout<FeaturePackLayout> newConfigLayout(Path featurePack, boolean installInUniverse) throws ProvisioningException { return newConfigLayout(ProvisioningConfig.builder().addFeaturePackDep(addLocal(featurePack, installInUniverse)).build()); }
@Override protected void runCommand(PmCommandInvocation commandInvocation) throws CommandExecutionException { try { FeaturePackLocation fpl = commandInvocation.getPmSession().getLayoutFactory().addLocal(path.toPath(), install == null ? true : install); commandInvocation.println(fpl + " imported."); } catch (ProvisioningException ex) { throw new CommandExecutionException(commandInvocation.getPmSession(), CliErrors.importFeaturePackFailed(), ex); } } }
fpl = manager.getLayoutFactory().addLocal(localPath, false);
fpl = pm.getLayoutFactory().addLocal(fp.getNormalizedPath(), false); } else if (fp.getGroupId() != null && fp.getArtifactId() != null) { Path path = resolveMaven(fp, (MavenRepoManager) artifactResolver); fpl = pm.getLayoutFactory().addLocal(path, false); } else { fpl = FeaturePackLocation.fromString(fp.getLocation()); pm.getLayoutFactory().addLocal(localResolverItem.getNormalizedPath(), localResolverItem.getInstallInUniverse()); } else if (localResolverItem.hasArtifactCoords()) { Path path = resolveMaven(localResolverItem, (MavenRepoManager) artifactResolver); pm.getLayoutFactory().addLocal(path, false); } else { throw new MojoExecutionException("resolve-local element appears to be neither path not maven artifact");
if (filePath != null) { Path p = Util.resolvePath(session.getConfiguration().getAeshContext(), filePath); loc = session.getPmSession().getLayoutFactory().addLocal(p, true);