summaryrefslogtreecommitdiffstats
path: root/jdisc_core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-08 21:05:37 +0200
committerGitHub <noreply@github.com>2022-05-08 21:05:37 +0200
commitba1ec40ccfe7f10ce757263871dd149b0709b8bf (patch)
tree5f4e641247d1455e9b245e16b373fd9def627eff /jdisc_core
parent485df32c64d4033a11b59801acedc1b54f95d941 (diff)
parent91449bc0aa5bf0196f0be48add49098865702f4a (diff)
Merge pull request #22507 from vespa-engine/prepare-for-logging-in-jdisc_corev7.583.48
Prepare for logging in jdisc core [run-systemtest]
Diffstat (limited to 'jdisc_core')
-rw-r--r--jdisc_core/pom.xml24
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/core/ExportPackagesIT.java42
2 files changed, 64 insertions, 2 deletions
diff --git a/jdisc_core/pom.xml b/jdisc_core/pom.xml
index 928258b5e75..1943e2905fa 100644
--- a/jdisc_core/pom.xml
+++ b/jdisc_core/pom.xml
@@ -66,7 +66,6 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>defaults</artifactId>
<version>${project.version}</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -171,7 +170,11 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>annotations</artifactId>
<version>${project.version}</version>
- <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>vespalog</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
<build>
@@ -249,7 +252,11 @@
<argument>${project.build.directory}/dependency/slf4j-jdk14.jar</argument>
<argument>${project.build.directory}/dependency/jcl-over-slf4j.jar</argument>
<argument>${project.build.directory}/dependency/log4j-over-slf4j.jar</argument>
+ <argument>${project.build.directory}/dependency/annotations.jar</argument>
<argument>${project.build.directory}/dependency/config-lib.jar</argument>
+ <argument>${project.build.directory}/dependency/defaults.jar</argument>
+ <argument>${project.build.directory}/dependency/vespajlib.jar</argument>
+ <argument>${project.build.directory}/dependency/vespalog.jar</argument>
<argument>${project.build.directory}/dependency/yolean.jar</argument>
<argument>${project.build.directory}/dependency/jaxb-api.jar</argument>
<argument>${project.build.directory}/dependency/jaxb-core.jar</argument>
@@ -279,6 +286,19 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>3.0.0-M6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/core/ExportPackagesIT.java b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ExportPackagesIT.java
new file mode 100644
index 00000000000..395ddc889ae
--- /dev/null
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ExportPackagesIT.java
@@ -0,0 +1,42 @@
+package com.yahoo.jdisc.core;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.Properties;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Integration tests for {@link ExportPackages}.
+ *
+ * @author gjoranv
+ */
+public class ExportPackagesIT {
+
+ @Rule
+ public TemporaryFolder tempFolder= new TemporaryFolder();
+
+ @Test
+ public void export_packages_are_added_from_dependency_jars() throws Exception {
+ File file = tempFolder.newFile(ExportPackages.PROPERTIES_FILE);
+
+ ExportPackages.main(new String[] { file.getAbsolutePath(), "target/dependency/guice-no_aop.jar" });
+ assertTrue(file.exists());
+ Properties props = new Properties();
+ String exportPackages;
+ try (FileReader reader = new FileReader(file)) {
+ props.load(reader);
+ exportPackages = props.getProperty(ExportPackages.EXPORT_PACKAGES);
+ }
+ assertNotNull(exportPackages);
+
+ assertTrue(exportPackages.contains("com.google.inject"));
+
+ }
+
+}