summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjoranv <gv@oath.com>2017-08-30 14:38:07 +0200
committergjoranv <gv@oath.com>2017-09-01 17:47:14 +0200
commit01a006ea8329b165cf2b0ff7f49ca245532d087e (patch)
treebb624a580363a2def73480609a8217f27c033615
parent0d408cd082052f9629f52f8c058ea74323f21667 (diff)
Make antlr and antlr4 invisible for customer projects.
- Visible only in test classpath.
-rw-r--r--application/pom.xml12
-rw-r--r--container-dev/pom.xml22
-rw-r--r--container-search/pom.xml3
-rw-r--r--pom.xml11
4 files changed, 44 insertions, 4 deletions
diff --git a/application/pom.xml b/application/pom.xml
index 3fd9e8054e7..2d9096e49f1 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -75,6 +75,18 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+
+ <!-- All dependencies that should be visible in test classpath, but not compile classpath,
+ for user projects must be added in compile scope here.
+ These dependencies are explicitly excluded (or set to non-compile scope) in the container-dev module. -->
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/container-dev/pom.xml b/container-dev/pom.xml
index 7ac2eb03016..e858ba1c50b 100644
--- a/container-dev/pom.xml
+++ b/container-dev/pom.xml
@@ -112,11 +112,33 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>container-search-and-docproc</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>config-bundle</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <!-- Dependencies below are added explicitly to exclude transitive deps that are not provided runtime by the container,
+ and hence make them invisible to user projects' build classpath.
+ Excluded artifacts should be added explicitly to the application module to make then visible in users' test classpath. -->
+ <dependency>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>predicate-search-core</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr-runtime</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
</dependencies>
</project>
diff --git a/container-search/pom.xml b/container-search/pom.xml
index 837629c44b9..f622567acde 100644
--- a/container-search/pom.xml
+++ b/container-search/pom.xml
@@ -143,7 +143,6 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
- <version>4.5</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
@@ -211,7 +210,7 @@
<plugin> <!-- For the YQL query language -->
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
- <version>4.5</version>
+ <version>${antlr4.version}</version>
<executions>
<execution>
<configuration>
diff --git a/pom.xml b/pom.xml
index 63783722af9..a5101861f58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.5.2</version>
+ <version>${antlr.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -569,7 +569,12 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
- <version>3.5.2</version>
+ <version>${antlr.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ <version>${antlr4.version}</version>
</dependency>
<dependency>
<groupId>org.apache.aries.spifly</groupId>
@@ -884,6 +889,8 @@
<properties>
<javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version> <!-- must be kept in sync with version used by current jersey2.version -->
+ <antlr.version>3.5.2</antlr.version>
+ <antlr4.version>4.5</antlr4.version>
<aries.spifly.version>1.0.8</aries.spifly.version>
<aries.util.version>1.0.0</aries.util.version>
<asm-debug-all.version>5.0.3</asm-debug-all.version>