-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
193 lines (173 loc) · 7.67 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vast</groupId>
<artifactId>executable-solr</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>Executable Solr Install</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<!-- version of solr -->
<solr.version>4.6.1</solr.version>
<slf4j.version>1.7.5</slf4j.version>
<logback.version>1.0.13</logback.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>${solr.version}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
<!-- the war plugin needs this to be a dependency of the project for it to work -->
<dependency>
<groupId>com.vast.common</groupId>
<artifactId>executable-war</artifactId>
<version>1.0.0</version>
<!-- use provided scope -->
<scope>provided</scope>
</dependency>
<!-- use logback for logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- pull in the solr lib in case we need it for customization -->
<!-- note all the excludes - solr is a Bad JVM Citizen and directly depends on concrete logging implemnentations -->
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>${solr.version}</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- add geospatial stuff -->
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version>
</dependency>
</dependencies>
<build>
<finalName>executable-solr</finalName>
<plugins>
<!-- take the vanilla solr WAR and use it as a base for the customizations defined in this project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<!-- add a main class manifest entry so the war will be runnable -->
<mainClass>com.vast.util.EmbeddedJettyServer</mainClass>
</manifest>
</archive>
<!-- make sure the executable war bits don't get put in the lib dir -->
<packagingExcludes>WEB-INF/lib/executable-war-*.jar</packagingExcludes>
<dependentWarExcludes>WEB-INF/lib/*log4j*.jar,WEB-INF/lib/*slf4j*.jar</dependentWarExcludes>
<overlays>
<overlay>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
</overlay>
<overlay>
<groupId>com.vast.common</groupId>
<artifactId>executable-war</artifactId>
<type>jar</type>
</overlay>
</overlays>
</configuration>
</plugin>
<!-- Generate the files that will be deployed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-installer</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/installer.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<finalName>executable-solr-${project.version}</finalName>
<tarLongFileMode>gnu</tarLongFileMode>
<!-- do not attach as a module artifact! we do not want to deploy this into maven. -->
<attach>false</attach>
</configuration>
</execution>
</executions>
</plugin>
<!-- this is intended for development purposes only. -->
<!-- if you use the maven jetty plugin to deploy a prod/test/staging instance you should feel bad and
start to reconsider your life choices. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.1.0.M0</version>
<configuration>
<systemProperties>
<systemProperty>
<name>solr.solr.home</name>
<value>${project.basedir}/src/main/config</value>
</systemProperty>
<systemProperty>
<!-- make solr write it's data to the target/tmp dir so the source tree doesn't get polluted -->
<name>solr.data.dir</name>
<value>${project.build.outputDirectory}/solr-data</value>
</systemProperty>
</systemProperties>
<webApp>
<contextPath>/solr</contextPath>
</webApp>
</configuration>
</plugin>
</plugins>
</build>
</project>