@Deployment public static WebArchive processArchive() { return initWebArchiveDeployment("test.war", "singleEngineWithProcessEnginePlugin.xml") .addClass(GroovyProcessEnginePlugin.class) .addAsResource("org/camunda/bpm/integrationtest/deployment/war/groovy.bpmn20.xml") .addAsResource("org/camunda/bpm/integrationtest/deployment/war/groovyAsync.bpmn20.xml") .addAsLibraries(Maven.resolver() .offline() .loadPomFromFile("pom.xml") .resolve("org.codehaus.groovy:groovy-all") .withoutTransitivity() .as(JavaArchive.class)); }
protected static File[] resolve(PomEquippedResolveStage resolver, String... coordinates) { final File[] files = resolver.resolve(coordinates).withoutTransitivity().as(File.class); if (files == null || files.length == 0) throw new IllegalArgumentException("Null or empty files (" + Arrays.toString(files) + "): " + Arrays.toString(coordinates)); return files; } }
private static File resolveVersion(String warVersion) { try { return getResolver().resolve(warVersion).withoutTransitivity().asSingleFile(); } catch (NoResolvedResultException e) { LOG.warn("Could not find version", e); return null; } }
private static File resolveVersion(String warVersion) { try { return getResolver().resolve(warVersion).withoutTransitivity().asSingleFile(); } catch (NoResolvedResultException e) { LOG.warn("Could not find version", e); return null; } }
private File shrinkwrapResolve(MavenCoordinates artefact) { File[] resolved = Maven.resolver().resolve(artefact.toString()).withoutTransitivity().asFile(); if (resolved == null || resolved.length == 0) throw new IllegalStateException("Cannot obtain maven artefact: " + artefact); if (resolved.length > 1) throw new IllegalStateException("Multiple maven artefacts for: " + artefact); return resolved[0]; }
private File shrinkwrapResolve(MavenCoordinates artefact) { File[] resolved = Maven.resolver().resolve(artefact.toString()).withoutTransitivity().asFile(); if (resolved == null || resolved.length == 0) throw new IllegalStateException("Cannot obtain maven artefact: " + artefact); if (resolved.length > 1) throw new IllegalStateException("Multiple maven artefacts for: " + artefact); return resolved[0]; }
private File getDependency(final String coordinates) { return getResolver().resolve(coordinates).withoutTransitivity().asSingle(File.class); } }
public MavenResolvedArtifact resolveArtifact(String artifact) { try { /* do offline check first */ return Maven.configureResolver().workOffline().resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } catch (NoResolvedResultException nre) { return Maven .configureResolver() .withRemoteRepo("Sonatype Nexus Snapshots", "https://oss.sonatype.org/content/repositories/snapshots/", "default") .resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } }
public MavenResolvedArtifact resolveArtifact(String artifact) { try { /* do offline check first */ return Maven.configureResolver().workOffline().resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } catch (NoResolvedResultException nre) { return Maven .configureResolver() .withRemoteRepo("Sonatype Nexus Snapshots", "https://oss.sonatype.org/content/repositories/snapshots/", "default") .resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } }
public MavenResolvedArtifact resolveArtifact(String artifact) { try { /* do offline check first */ return Maven.configureResolver().workOffline().resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } catch (NoResolvedResultException nre) { return Maven .configureResolver() .withRemoteRepo("Sonatype Nexus Snapshots", "https://oss.sonatype.org/content/repositories/snapshots/", "default") .resolve(artifact).withoutTransitivity().asSingleResolvedArtifact(); } }
private JavaArchive resolve(String coordinate, ConfigurableMavenResolverSystem maven) { final MavenCoordinate highestVersion = maven.resolveVersionRange(coordinate).getHighestVersion(); return maven.resolve(highestVersion.toCanonicalForm()).withoutTransitivity().asSingle(JavaArchive.class); }
/** * Obtains JavaArchive with phantomjs binary */ protected File getJavaArchive(String version) { String v = version; if (v == null) { v = ResolverConfiguration.get().version(); } final String gav = getArtifactCanonicalForm(v); return Maven.resolver().resolve(gav).withoutTransitivity().asSingleFile(); }
@Override public File call() throws Exception { return Maven.resolver().resolve(distributableCoordinate.toCanonicalForm()) .withoutTransitivity() .asSingle(GenericArchive.class) .as(ExplodedExporter.class) .exportExploded(targetDirectory, "."); } });
@Override public File call() throws Exception { return Maven.resolver().resolve(distributableCoordinate.toCanonicalForm()) .withoutTransitivity() .asSingle(GenericArchive.class) .as(ExplodedExporter.class) .exportExploded(targetDirectory, "."); } });
private static Collection<File> dependency(String gav, boolean transitive) { MavenStrategyStage mavenStrategyStage = Maven.resolver().resolve( gav ); MavenFormatStage mavenFormatStage; if ( transitive ) { mavenFormatStage = mavenStrategyStage.withTransitivity(); } else { mavenFormatStage = mavenStrategyStage.withoutTransitivity(); } return Arrays.asList( mavenFormatStage.asFile() ); } }
private static Collection<File> dependency(String gav, boolean transitive) { MavenStrategyStage mavenStrategyStage = Maven.resolver().resolve( gav ); MavenFormatStage mavenFormatStage; if ( transitive ) { mavenFormatStage = mavenStrategyStage.withTransitivity(); } else { mavenFormatStage = mavenStrategyStage.withoutTransitivity(); } return Arrays.asList( mavenFormatStage.asFile() ); } }
public static WebArchive createKieServerWar() { try { final File kieServerFile = Maven.configureResolver().workOffline().loadPomFromFile("pom.xml") .resolve("org.kie.server:kie-server:war:ee7:?").withoutTransitivity().asSingleFile(); return ShrinkWrap.create(ZipImporter.class, "kie-server.war").importFrom(kieServerFile) .as(WebArchive.class); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex); } }
public static WebArchive createKieServerControllerWar() { try { final File kieServerControllerFile = Maven.configureResolver().workOffline().loadPomFromFile("pom.xml") .resolve("org.kie.server:kie-server-controller-standalone:war:ee7:?").withoutTransitivity().asSingleFile(); return ShrinkWrap.create(ZipImporter.class, "kie-server-controller.war").importFrom(kieServerControllerFile) .as(WebArchive.class); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex); } }
public static WebArchive createKieServerWar() { try { final File kieServerFile = Maven.configureResolver().workOffline().loadPomFromFile("pom.xml") .resolve("org.kie.server:kie-server:war:ee7:?").withoutTransitivity().asSingleFile(); return ShrinkWrap.create(ZipImporter.class, "kie-server.war").importFrom(kieServerFile) .as(WebArchive.class); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex); } }
private String getCaseAppContext() { final String showcaseGAV = loadShowcaseGAV(); final File file = Maven.configureResolver().workOffline().resolve(showcaseGAV).withoutTransitivity().asSingleFile(); return "/" + FilenameUtils.getBaseName(file.getName()); }