# HG changeset patch # User Raimund Renkert # Date 1477561787 -7200 # Node ID 5bc1260b55f1cc58d2d3f9c005b31f3774c539ea # Parent de7184e1370dd5c9d934de67b2bb03a00001b47b# Parent 2c198f13270ba5bf3efb9a86a7f77be509c23156 merged. diff -r 2c198f13270b -r 5bc1260b55f1 pom.xml --- a/pom.xml Wed Oct 26 20:18:11 2016 +0200 +++ b/pom.xml Thu Oct 27 11:49:47 2016 +0200 @@ -176,6 +176,11 @@ 1.0.0.Alpha7 test + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + test + @@ -245,6 +250,21 @@ + + org.antlr + antlr4-maven-plugin + 4.5 + + ${basedir}/src/main/java + + + + + antlr4 + + + + diff -r 2c198f13270b -r 5bc1260b55f1 src/test/java/de/intevation/lada/BaseTest.java --- a/src/test/java/de/intevation/lada/BaseTest.java Wed Oct 26 20:18:11 2016 +0200 +++ b/src/test/java/de/intevation/lada/BaseTest.java Thu Oct 27 11:49:47 2016 +0200 @@ -7,13 +7,16 @@ */ package de.intevation.lada; +import java.io.File; import java.util.List; import org.apache.log4j.Logger; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.exporter.ZipExporter; import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; import org.junit.After; import org.junit.AfterClass; @@ -41,11 +44,21 @@ */ @Deployment(testable=true) public static WebArchive createDeployment() throws Exception { + File[] files = Maven.resolver().loadPomFromFile("pom.xml") + .importRuntimeAndTestDependencies().resolve().withTransitivity().asFile(); + File antlr = null; + for (File f : files) { + logger.debug(f.getName()); + if (f.getName().contains("antlr4")) { + antlr = f; + } + } WebArchive archive = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME) .addPackages(true, Package.getPackage("de.intevation.lada")) .addAsResource("log4j.properties", "log4j.properties") .addAsResource("shibboleth.properties", "shibboleth.properties") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") + .addAsLibrary(antlr) .addAsResource("META-INF/test-persistence.xml", "META-INF/persistence.xml"); return archive;