ANY23-322 Any23 embedded service is broken
[any23.git] / service / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
18 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19 <modelVersion>4.0.0</modelVersion>
20
21 <parent>
22 <groupId>org.apache.any23</groupId>
23 <artifactId>apache-any23</artifactId>
24 <version>2.3-SNAPSHOT</version>
25 <relativePath>../</relativePath>
26 </parent>
27
28 <artifactId>apache-any23-service</artifactId>
29 <packaging>war</packaging>
30
31 <name>Apache Any23 :: Service</name>
32 <description>Any23 Frontend and REST Service implementation.</description>
33
34 <properties>
35 <!-- the following property is used in the bash script as well, don't remove it! -->
36 <jetty.runner.version>9.4.10.RC0</jetty.runner.version>
37 <output.directory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/lib/apache-any23-openie</output.directory>
38 </properties>
39
40 <dependencies>
41 <!-- Any23 Modules -->
42 <dependency>
43 <groupId>org.apache.any23</groupId>
44 <artifactId>apache-any23-core</artifactId>
45 <version>${project.version}</version>
46 </dependency>
47 <dependency>
48 <groupId>org.apache.any23.plugins</groupId>
49 <artifactId>apache-any23-openie</artifactId>
50 <version>${project.version}</version>
51 <scope>provided</scope>
52 </dependency>
53 <dependency>
54 <groupId>org.allenai.openie</groupId>
55 <artifactId>openie_2.11</artifactId>
56 <version>${openie_2.11.version}</version>
57 <scope>provided</scope>
58 </dependency>
59 <dependency>
60 <groupId>org.allenai.openie</groupId>
61 <artifactId>openie_2.11</artifactId>
62 <version>${openie_2.11.version}</version>
63 <scope>provided</scope>
64 <type>pom</type>
65 </dependency>
66 <dependency>
67 <groupId>edu.washington.cs.knowitall</groupId>
68 <artifactId>openregex</artifactId>
69 <version>${openregex.version}</version>
70 <scope>provided</scope>
71 </dependency>
72
73 <!-- Logging -->
74 <dependency>
75 <groupId>org.slf4j</groupId>
76 <artifactId>slf4j-log4j12</artifactId>
77 <version>${slf4j.logger.version}</version>
78 <scope>test</scope>
79 </dependency>
80
81 <!-- BEGIN: Servlet Deps. -->
82 <dependency>
83 <groupId>org.mortbay.jetty</groupId>
84 <artifactId>servlet-api-3.0</artifactId>
85 <scope>provided</scope>
86 </dependency>
87 <dependency>
88 <groupId>org.mortbay.jetty</groupId>
89 <artifactId>jetty-servlet-tester</artifactId>
90 <scope>test</scope>
91 </dependency>
92 <!-- END: Servlet Deps. -->
93
94 <!-- BEGIN: Jetty Deps. -->
95 <dependency>
96 <groupId>org.eclipse.jetty</groupId>
97 <artifactId>jetty-runner</artifactId>
98 <version>${jetty.runner.version}</version>
99 <scope>provided</scope>
100 <optional>true</optional>
101 </dependency>
102 <!-- END: Jetty Deps. -->
103
104 <!-- BEGIN: Test Dependencies -->
105 <dependency>
106 <groupId>junit</groupId>
107 <artifactId>junit</artifactId>
108 <scope>test</scope>
109 </dependency>
110 <!-- END: Test Dependencies -->
111
112 </dependencies>
113
114 <build>
115 <plugins>
116 <plugin>
117 <groupId>org.eclipse.jetty</groupId>
118 <artifactId>jetty-maven-plugin</artifactId>
119 <version>${jetty.runner.version}</version>
120 <configuration>
121 <webAppConfig>
122 <contextPath>/${project.artifactId}</contextPath>
123 </webAppConfig>
124 </configuration>
125 </plugin>
126
127 <plugin>
128 <groupId>org.apache.maven.plugins</groupId>
129 <artifactId>maven-war-plugin</artifactId>
130 <configuration>
131 <webResources>
132 <resource>
133 <directory>${basedir}/src/main/resources/</directory>
134 <targetPath>/resources</targetPath>
135 <filtering>true</filtering>
136 </resource>
137 </webResources>
138 </configuration>
139 <executions>
140 <execution>
141 <id>self-contained-war</id>
142 <phase>package</phase>
143 <goals>
144 <goal>war</goal>
145 </goals>
146 <configuration>
147 <webResources>
148 <resource>
149 <directory>${project.build.directory}/war-legals/with-deps/</directory>
150 <targetPath>/META-INF</targetPath>
151 </resource>
152 </webResources>
153 </configuration>
154 </execution>
155 <execution>
156 <id>war-without-deps</id>
157 <phase>package</phase>
158 <goals>
159 <goal>war</goal>
160 </goals>
161 <configuration>
162 <classifier>without-deps</classifier>
163 <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
164 <archive>
165 <manifest>
166 <addClasspath>true</addClasspath>
167 <classpathPrefix>lib/</classpathPrefix>
168 </manifest>
169 </archive>
170 <webResources>
171 <resource>
172 <directory>${project.build.directory}/war-legals/without-deps/</directory>
173 <targetPath>/META-INF</targetPath>
174 </resource>
175 </webResources>
176 </configuration>
177 </execution>
178 </executions>
179 </plugin>
180
181 <!-- Generates the distribution package -->
182 <plugin>
183 <groupId>org.apache.maven.plugins</groupId>
184 <artifactId>maven-assembly-plugin</artifactId>
185 <executions>
186 <execution>
187 <id>prepare-package</id>
188 <phase>prepare-package</phase>
189 <goals>
190 <goal>single</goal>
191 </goals>
192 <configuration>
193 <attach>false</attach>
194 <finalName>war-legals</finalName>
195 <appendAssemblyId>false</appendAssemblyId>
196 <descriptors>
197 <descriptor>${basedir}/src/main/assembly/prepare-war-legals.xml</descriptor>
198 </descriptors>
199 </configuration>
200 </execution>
201 </executions>
202 <configuration>
203 <descriptors>
204 <descriptor>${basedir}/src/main/assembly/with-deps.xml</descriptor>
205 <descriptor>${basedir}/src/main/assembly/without-deps.xml</descriptor>
206 <descriptor>${basedir}/src/main/assembly/server-embedded.xml</descriptor>
207 </descriptors>
208 </configuration>
209 </plugin>
210
211 <!-- Used to provide dynamic OpenIE toggling within service -->
212 <plugin>
213 <groupId>org.apache.maven.plugins</groupId>
214 <artifactId>maven-dependency-plugin</artifactId>
215 <executions>
216 <execution>
217 <id>copy</id>
218 <phase>prepare-package</phase>
219 <goals>
220 <goal>copy-dependencies</goal>
221 </goals>
222 <configuration>
223 <includeScope>provided</includeScope>
224 <outputDirectory>${output.directory}</outputDirectory>
225 </configuration>
226 </execution>
227 </executions>
228 </plugin>
229
230 <plugin>
231 <groupId>org.apache.maven.plugins</groupId>
232 <artifactId>maven-surefire-plugin</artifactId>
233 <configuration>
234 <classpathDependencyExcludes>
235 <classpathDependencyExclude>org.apache.any23.plugins:apache-any23-openie</classpathDependencyExclude>
236 </classpathDependencyExcludes>
237 </configuration>
238 </plugin>
239
240 </plugins>
241 </build>
242
243 <profiles>
244 <profile>
245 <id>release</id>
246 <build>
247 <resources>
248 <resource>
249 <directory>${basedir}/../</directory>
250 <targetPath>${project.build.directory}/apidocs/META-INF</targetPath>
251 <includes>
252 <include>LICENSE.txt</include>
253 <include>NOTICE.txt</include>
254 </includes>
255 </resource>
256 </resources>
257 </build>
258 </profile>
259 </profiles>
260
261 </project>