/** * Copy dependencies specified as carbon OSGi-lib option in system to the LIB_DIRECTORY. * * @param carbonHome carbon home dir */ private void copyOSGiLibBundles(Path carbonHome) { Path targetDirectory = carbonHome.resolve(LIB_DIRECTORY); Arrays.asList(system.getOptions(CopyOSGiLibBundleOption.class)).forEach(option -> { try { copyReferencedArtifactsToDeployDirectory(option.getMavenArtifactUrlReference().getURL(), targetDirectory); } catch (IOException e) { throw new TestContainerException(String.format("Error while copying artifacts to " + LIB_DIRECTORY), e); } }); }
/** * Copy dependencies specified as carbon OSGi-lib option in system to the LIB_DIRECTORY. * * @param carbonHome carbon home dir */ private void copyOSGiLibBundles(Path carbonHome) { Path targetDirectory = carbonHome.resolve(LIB_DIRECTORY); Arrays.asList(system.getOptions(CopyOSGiLibBundleOption.class)).forEach(option -> { try { copyReferencedArtifactsToDeployDirectory(option.getMavenArtifactUrlReference().getURL(), targetDirectory); } catch (IOException e) { throw new TestContainerException(String.format("Error while copying artifacts to " + LIB_DIRECTORY), e); } }); }
.version(casVersion) .type("war") .getURL();
public String getKarafDistro() { String groupId = System.getProperty(KARAF_DISTRO_GROUPID_PROP,KARAF_DISTRO_GROUPID); String artifactId = System.getProperty(KARAF_DISTRO_ARTIFACTID_PROP,KARAF_DISTRO_ARTIFACTID); String version = System.getProperty(KARAF_DISTRO_VERSION_PROP); String type = System.getProperty(KARAF_DISTRO_TYPE_PROP,KARAF_DISTRO_TYPE); if (version == null) { // We use a properties file to retrieve ${karaf.version}, instead of .versionAsInProject() // This avoids forcing all users to depend on Karaf in their POMs Properties abstractConfigTestBaseProps = new Properties(); try (InputStream abstractConfigTestBaseInputStream = Thread.currentThread().getContextClassLoader() .getResourceAsStream(PROPERTIES_FILENAME)) { abstractConfigTestBaseProps.load(abstractConfigTestBaseInputStream); } catch (IOException e) { LOG.error("Unable to load {} to determine the Karaf version", PROPERTIES_FILENAME, e); } version = abstractConfigTestBaseProps.getProperty(KARAF_DISTRO_VERSION_PROP); } MavenArtifactUrlReference karafUrl = maven() .groupId(groupId) .artifactId(artifactId) .version(version) .type(type); return karafUrl.getURL(); }
public String getKarafDistro() { String groupId = System.getProperty(KARAF_DISTRO_GROUPID_PROP, KARAF_DISTRO_GROUPID); String artifactId = System.getProperty(KARAF_DISTRO_ARTIFACTID_PROP, KARAF_DISTRO_ARTIFACTID); String type = System.getProperty(KARAF_DISTRO_TYPE_PROP, KARAF_DISTRO_TYPE); return maven().groupId(groupId).artifactId(artifactId).versionAsInProject().type(type).getURL(); }