xref: /OpenGrok/opengrok-indexer/pom.xml (revision 56f072caf7d2bfa8d9934d1e7cbac3987de2dc17)
108a0c20eSJorgen Austvik<?xml version="1.0" encoding="UTF-8"?>
218446c8aSKnut Anders Hatlen<!--
318446c8aSKnut Anders Hatlen
418446c8aSKnut Anders HatlenCDDL HEADER START
518446c8aSKnut Anders Hatlen
618446c8aSKnut Anders HatlenThe contents of this file are subject to the terms of the
718446c8aSKnut Anders HatlenCommon Development and Distribution License (the "License").
818446c8aSKnut Anders HatlenYou may not use this file except in compliance with the License.
918446c8aSKnut Anders Hatlen
1018446c8aSKnut Anders HatlenSee LICENSE.txt included in this distribution for the specific
1118446c8aSKnut Anders Hatlenlanguage governing permissions and limitations under the License.
1218446c8aSKnut Anders Hatlen
1318446c8aSKnut Anders HatlenWhen distributing Covered Code, include this CDDL HEADER in each
1418446c8aSKnut Anders Hatlenfile and include the License file at LICENSE.txt.
1518446c8aSKnut Anders HatlenIf applicable, add the following below this CDDL HEADER, with the
1618446c8aSKnut Anders Hatlenfields enclosed by brackets "[]" replaced with your own identifying
1718446c8aSKnut Anders Hatleninformation: Portions Copyright [yyyy] [name of copyright owner]
1818446c8aSKnut Anders Hatlen
1918446c8aSKnut Anders HatlenCDDL HEADER END
2018446c8aSKnut Anders Hatlen
21*56f072caSAdam HornáčekCopyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
22431a6d7cSChris FrairePortions Copyright (c) 2017-2018, Chris Fraire <cfraire@me.com>.
2318446c8aSKnut Anders Hatlen
2418446c8aSKnut Anders Hatlen-->
250170aac5SAdam Hornáček<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">
2608a0c20eSJorgen Austvik    <modelVersion>4.0.0</modelVersion>
2708a0c20eSJorgen Austvik
2808a0c20eSJorgen Austvik    <parent>
29*56f072caSAdam Hornáček        <groupId>org.opengrok</groupId>
3008a0c20eSJorgen Austvik        <artifactId>opengrok</artifactId>
31ace62994SVladimir Kotal        <version>1.1-SNAPSHOT</version>
3208a0c20eSJorgen Austvik    </parent>
3308a0c20eSJorgen Austvik
340170aac5SAdam Hornáček    <artifactId>opengrok-indexer</artifactId>
350170aac5SAdam Hornáček    <version>1.1-SNAPSHOT</version>
360170aac5SAdam Hornáček    <packaging>jar</packaging>
370170aac5SAdam Hornáček
380170aac5SAdam Hornáček    <name>OpenGrok Indexer</name>
390170aac5SAdam Hornáček
400170aac5SAdam Hornáček    <dependencies>
410170aac5SAdam Hornáček        <dependency>
420170aac5SAdam Hornáček            <groupId>org.apache.bcel</groupId>
430170aac5SAdam Hornáček            <artifactId>bcel</artifactId>
440170aac5SAdam Hornáček        </dependency>
450170aac5SAdam Hornáček        <dependency>
460170aac5SAdam Hornáček            <groupId>org.apache.lucene</groupId>
470170aac5SAdam Hornáček            <artifactId>lucene-core</artifactId>
480170aac5SAdam Hornáček        </dependency>
490170aac5SAdam Hornáček        <dependency>
500170aac5SAdam Hornáček            <groupId>org.apache.lucene</groupId>
510170aac5SAdam Hornáček            <artifactId>lucene-analyzers-common</artifactId>
520170aac5SAdam Hornáček        </dependency>
530170aac5SAdam Hornáček        <dependency>
540170aac5SAdam Hornáček            <groupId>org.apache.lucene</groupId>
552cacd6e7SAdam Hornáček            <artifactId>lucene-highlighter</artifactId>
562cacd6e7SAdam Hornáček        </dependency>
572cacd6e7SAdam Hornáček        <dependency>
582cacd6e7SAdam Hornáček            <groupId>org.apache.lucene</groupId>
592cacd6e7SAdam Hornáček            <artifactId>lucene-join</artifactId>
602cacd6e7SAdam Hornáček        </dependency>
612cacd6e7SAdam Hornáček        <dependency>
622cacd6e7SAdam Hornáček            <groupId>org.apache.lucene</groupId>
632cacd6e7SAdam Hornáček            <artifactId>lucene-memory</artifactId>
642cacd6e7SAdam Hornáček        </dependency>
652cacd6e7SAdam Hornáček        <dependency>
662cacd6e7SAdam Hornáček            <groupId>org.apache.lucene</groupId>
672cacd6e7SAdam Hornáček            <artifactId>lucene-queries</artifactId>
682cacd6e7SAdam Hornáček        </dependency>
692cacd6e7SAdam Hornáček        <dependency>
702cacd6e7SAdam Hornáček            <groupId>org.apache.lucene</groupId>
710170aac5SAdam Hornáček            <artifactId>lucene-queryparser</artifactId>
720170aac5SAdam Hornáček        </dependency>
730170aac5SAdam Hornáček        <dependency>
740170aac5SAdam Hornáček            <groupId>org.apache.lucene</groupId>
750170aac5SAdam Hornáček            <artifactId>lucene-suggest</artifactId>
760170aac5SAdam Hornáček        </dependency>
770170aac5SAdam Hornáček        <dependency>
780170aac5SAdam Hornáček            <groupId>javax.servlet</groupId>
790170aac5SAdam Hornáček            <artifactId>servlet-api</artifactId>
800170aac5SAdam Hornáček        </dependency>
810170aac5SAdam Hornáček        <dependency>
820170aac5SAdam Hornáček            <groupId>com.googlecode.json-simple</groupId>
830170aac5SAdam Hornáček            <artifactId>json-simple</artifactId>
840170aac5SAdam Hornáček        </dependency>
850170aac5SAdam Hornáček        <dependency>
86*56f072caSAdam Hornáček            <groupId>org.opengrok</groupId>
870170aac5SAdam Hornáček            <artifactId>jrcs</artifactId>
880170aac5SAdam Hornáček            <version>${project.version}</version>
890170aac5SAdam Hornáček        </dependency>
900170aac5SAdam Hornáček        <dependency>
910170aac5SAdam Hornáček            <groupId>org.apache.ant</groupId>
920170aac5SAdam Hornáček            <artifactId>ant</artifactId>
930170aac5SAdam Hornáček        </dependency>
940170aac5SAdam Hornáček        <dependency>
950170aac5SAdam Hornáček            <groupId>junit</groupId>
960170aac5SAdam Hornáček            <artifactId>junit</artifactId>
970170aac5SAdam Hornáček            <scope>test</scope>
980170aac5SAdam Hornáček        </dependency>
990170aac5SAdam Hornáček
1000170aac5SAdam Hornáček    </dependencies>
1010170aac5SAdam Hornáček
10208a0c20eSJorgen Austvik    <build>
103aa4907e2SLubos Kosco
10408a0c20eSJorgen Austvik        <plugins>
105e0f7ec00SKnut Anders Hatlen            <plugin>
1060d40e9d0SAdam Hornáček                <artifactId>maven-assembly-plugin</artifactId>
107e0f7ec00SKnut Anders Hatlen                <configuration>
108e0f7ec00SKnut Anders Hatlen                    <archive>
109e0f7ec00SKnut Anders Hatlen                        <manifest>
110*56f072caSAdam Hornáček                            <mainClass>org.opengrok.index.Indexer</mainClass>
111e0f7ec00SKnut Anders Hatlen                        </manifest>
112e0f7ec00SKnut Anders Hatlen                    </archive>
1130d40e9d0SAdam Hornáček                    <descriptorRefs>
11492788b82SAdam Hornáček                        <descriptorRef>jar-with-dependencies</descriptorRef>
1150d40e9d0SAdam Hornáček                    </descriptorRefs>
116e0f7ec00SKnut Anders Hatlen                </configuration>
1170d40e9d0SAdam Hornáček                <executions>
1180d40e9d0SAdam Hornáček                    <execution>
1190d40e9d0SAdam Hornáček                        <phase>package</phase>
1200d40e9d0SAdam Hornáček                        <goals>
1210d40e9d0SAdam Hornáček                            <goal>single</goal>
1220d40e9d0SAdam Hornáček                        </goals>
1230d40e9d0SAdam Hornáček                    </execution>
1240d40e9d0SAdam Hornáček                </executions>
125e0f7ec00SKnut Anders Hatlen            </plugin>
126e0f7ec00SKnut Anders Hatlen
12708a0c20eSJorgen Austvik            <plugin>
12808a0c20eSJorgen Austvik                <groupId>de.jflex</groupId>
12945ec3841SLubos Kosco                <artifactId>jflex-maven-plugin</artifactId>
1304e6518cbSLubos Kosco                <version>1.6.1</version>
13108a0c20eSJorgen Austvik                <executions>
13208a0c20eSJorgen Austvik                    <execution>
13308a0c20eSJorgen Austvik                        <goals>
13408a0c20eSJorgen Austvik                            <goal>generate</goal>
13508a0c20eSJorgen Austvik                        </goals>
136eeb7e5b3SAdam Hornáček                        <phase>generate-sources</phase>
13708a0c20eSJorgen Austvik                        <configuration>
13808a0c20eSJorgen Austvik                            <lexDefinitions>
13958f88ff1SChris Fraire                                <lexDefinition>${basedir}/target/jflex-sources</lexDefinition>
14008a0c20eSJorgen Austvik                            </lexDefinitions>
14145ec3841SLubos Kosco                            <inputStreamCtor>false</inputStreamCtor>
14208a0c20eSJorgen Austvik                        </configuration>
14308a0c20eSJorgen Austvik                    </execution>
14408a0c20eSJorgen Austvik                </executions>
14508a0c20eSJorgen Austvik            </plugin>
1469182cd30SLubos Kosco
147eeb7e5b3SAdam Hornáček            <!-- patches jflex generated files to stop increasing buffer beyond token size that lucene accepts
148ff70ede8SLubos Kosco            https://github.com/OpenGrok/OpenGrok/issues/1170 make parsers stop producing tokens > 32766 chars
149ba14bbd8SLubos Kosco            at least for PlainFullTokenizer, PlainSymbolTokenizer, JavaScriptSymbolTokenizer, JavaSymbolTokenizer
1509182cd30SLubos Kosco            use below
1519182cd30SLubos Kosco            -->
1529182cd30SLubos Kosco
153ff70ede8SLubos Kosco            <plugin>
154ff70ede8SLubos Kosco                <groupId>com.google.code.maven-replacer-plugin</groupId>
155ff70ede8SLubos Kosco                <artifactId>replacer</artifactId>
1569182cd30SLubos Kosco                <version>1.5.3</version>
157ff70ede8SLubos Kosco                <executions>
158ff70ede8SLubos Kosco                    <execution>
1599182cd30SLubos Kosco                        <phase>generate-sources</phase>
160ff70ede8SLubos Kosco                        <goals>
161ff70ede8SLubos Kosco                            <goal>replace</goal>
162ff70ede8SLubos Kosco                        </goals>
163ff70ede8SLubos Kosco                    </execution>
164ff70ede8SLubos Kosco                </executions>
165ff70ede8SLubos Kosco                <configuration>
1669182cd30SLubos Kosco                    <filesToInclude>
167*56f072caSAdam Hornáček                        ${basedir}/target/generated-sources/jflex/org/opengrok/analysis/java/JavaSymbolTokenizer.java,${basedir}/target/generated-sources/jflex/org/opengrok/analysis/javascript/JavaScriptSymbolTokenizer.java,${basedir}/target/generated-sources/jflex/org/opengrok/analysis/plain/PlainFullTokenizer.java,${basedir}/target/generated-sources/jflex/org/opengrok/analysis/plain/PlainSymbolTokenizer.java
1689182cd30SLubos Kosco                    </filesToInclude>
1699182cd30SLubos Kosco                    <replacements>
1709182cd30SLubos Kosco                        <replacement>
1719182cd30SLubos Kosco                            <token>private static final int ZZ_BUFFERSIZE =</token>
1729182cd30SLubos Kosco                            <value>private int ZZ_BUFFERSIZE =</value>
1739182cd30SLubos Kosco                        </replacement>
1749182cd30SLubos Kosco                        <replacement>
1759182cd30SLubos Kosco                            <token>int requested = zzBuffer\.length - zzEndRead;</token>
1769182cd30SLubos Kosco                            <value>int requested = zzBuffer.length - zzEndRead - zzFinalHighSurrogate;</value>
1779182cd30SLubos Kosco                        </replacement>
1789182cd30SLubos Kosco                        <replacement>
1799182cd30SLubos Kosco                            <token>(zzFinalHighSurrogate = 1;)(\r?\n)</token>
1809182cd30SLubos Kosco                            <value>$1$2          if (numRead == 1) { return true; }$2</value>
1819182cd30SLubos Kosco                        </replacement>
1829182cd30SLubos Kosco
1839182cd30SLubos Kosco                        <replacement>
1849182cd30SLubos Kosco                            <token>[ \t]*/\* is the buffer big enough\? \*/\s+if \(zzCurrentPos >= zzBuffer\.length.*?\}[ \t]*\r?\n</token>
1859182cd30SLubos Kosco                            <value></value>
1869182cd30SLubos Kosco                        </replacement>
1879182cd30SLubos Kosco                        <!-- also revert 0 character check that got in with 1.6.1 : https://github.com/jflex-de/jflex/blob/master/jflex/examples/zero-reader/README.md -->
1889182cd30SLubos Kosco                        <replacement>
1899182cd30SLubos Kosco                            <token>[ \t]*/\* not supposed to occur according to specification of java\.io\.Reader \*/\s+if \(numRead == 0.*?\}[ \t]*\r?\n</token>
1909182cd30SLubos Kosco                            <value></value>
1919182cd30SLubos Kosco                        </replacement>
1929182cd30SLubos Kosco
1939182cd30SLubos Kosco                    </replacements>
194ff70ede8SLubos Kosco                    <regexFlags>
1959182cd30SLubos Kosco                        <regexFlag>DOTALL</regexFlag>
196ff70ede8SLubos Kosco                    </regexFlags>
197ff70ede8SLubos Kosco                </configuration>
1989182cd30SLubos Kosco            </plugin>
1992e3d7e6eSJorgen Austvik
2002e3d7e6eSJorgen Austvik            <plugin>
20145ec3841SLubos Kosco                <groupId>org.apache.maven.plugins</groupId>
2022e3d7e6eSJorgen Austvik                <artifactId>maven-antrun-plugin</artifactId>
2039f619df4SLubos Kosco                <version>1.8</version>
2042e3d7e6eSJorgen Austvik                <executions>
2052e3d7e6eSJorgen Austvik                    <execution>
20658f88ff1SChris Fraire                        <id>collect-lex-lexh</id>
20758f88ff1SChris Fraire                        <phase>initialize</phase>
20858f88ff1SChris Fraire                        <configuration>
20958f88ff1SChris Fraire                            <target>
210eeb7e5b3SAdam Hornáček                                <property name="src.dir" value="src/main/resources"/>
21158f88ff1SChris Fraire                                <property name="tgt.dir" value="${basedir}/target/jflex-sources"/>
21258f88ff1SChris Fraire                                <ant target="-collect-lex-lexh"/>
21358f88ff1SChris Fraire                            </target>
21458f88ff1SChris Fraire                        </configuration>
21558f88ff1SChris Fraire                        <goals>
21658f88ff1SChris Fraire                            <goal>run</goal>
21758f88ff1SChris Fraire                        </goals>
21858f88ff1SChris Fraire                    </execution>
21958f88ff1SChris Fraire                    <execution>
22058f88ff1SChris Fraire                        <id>update-build-info</id>
22118446c8aSKnut Anders Hatlen                        <phase>generate-resources</phase>
22218446c8aSKnut Anders Hatlen                        <configuration>
22318446c8aSKnut Anders Hatlen                            <target>
22445ec3841SLubos Kosco                                <property name="version" value="${project.version}"/>
22518446c8aSKnut Anders Hatlen                                <ant target="-update-build-info"/>
22618446c8aSKnut Anders Hatlen                            </target>
22718446c8aSKnut Anders Hatlen                        </configuration>
22818446c8aSKnut Anders Hatlen                        <goals>
22918446c8aSKnut Anders Hatlen                            <goal>run</goal>
23018446c8aSKnut Anders Hatlen                        </goals>
23118446c8aSKnut Anders Hatlen                    </execution>
23218446c8aSKnut Anders Hatlen                    <execution>
2332e3d7e6eSJorgen Austvik                        <id>build-config-files</id>
2342e3d7e6eSJorgen Austvik                        <phase>process-test-classes</phase>
2352e3d7e6eSJorgen Austvik                        <goals>
2362e3d7e6eSJorgen Austvik                            <goal>run</goal>
2372e3d7e6eSJorgen Austvik                        </goals>
2382e3d7e6eSJorgen Austvik                        <configuration>
23918446c8aSKnut Anders Hatlen                            <target unless="maven.test.skip">
24018446c8aSKnut Anders Hatlen                                <ant target="-post-compile-test"/>
24118446c8aSKnut Anders Hatlen                            </target>
2422e3d7e6eSJorgen Austvik                        </configuration>
2432e3d7e6eSJorgen Austvik                    </execution>
2442e3d7e6eSJorgen Austvik                </executions>
2452e3d7e6eSJorgen Austvik            </plugin>
2462e3d7e6eSJorgen Austvik
247aa4907e2SLubos Kosco            <plugin>
248aa4907e2SLubos Kosco                <groupId>org.apache.maven.plugins</groupId>
249aa4907e2SLubos Kosco                <artifactId>maven-surefire-plugin</artifactId>
250aa4907e2SLubos Kosco                <configuration>
251aa4907e2SLubos Kosco                    <excludes>
252aa4907e2SLubos Kosco                        <!-- Test helper class with name that confuses surefire -->
253aa4907e2SLubos Kosco                        <exclude>**/TestRepository.java</exclude>
254aa4907e2SLubos Kosco                    </excludes>
255aa4907e2SLubos Kosco                </configuration>
256aa4907e2SLubos Kosco            </plugin>
257aa4907e2SLubos Kosco
258bc6c8375SVladimir Kotal            <plugin>
259bc6c8375SVladimir Kotal                <groupId>org.codehaus.mojo</groupId>
260bc6c8375SVladimir Kotal                <artifactId>exec-maven-plugin</artifactId>
261bc6c8375SVladimir Kotal                <version>1.6.0</version>
262bc6c8375SVladimir Kotal                <executions>
263bc6c8375SVladimir Kotal                    <execution>
264bc6c8375SVladimir Kotal                        <phase>verify</phase>
265bc6c8375SVladimir Kotal                            <goals>
266bc6c8375SVladimir Kotal                                <goal>exec</goal>
267bc6c8375SVladimir Kotal                            </goals>
268bc6c8375SVladimir Kotal                    </execution>
269bc6c8375SVladimir Kotal                </executions>
270bc6c8375SVladimir Kotal                <configuration>
271bc6c8375SVladimir Kotal                    <executable>pep8</executable>
272bc6c8375SVladimir Kotal                    <arguments>
273bc6c8375SVladimir Kotal                        <argument>-v</argument>
274873a5de8SVladimir Kotal                        <argument>--exclude=filelock.py,test_command.py,test_commands.py</argument>
275bc6c8375SVladimir Kotal                        <argument>${project.basedir}/../tools/sync</argument>
276bc6c8375SVladimir Kotal                    </arguments>
277bc6c8375SVladimir Kotal                </configuration>
278bc6c8375SVladimir Kotal            </plugin>
279aa4907e2SLubos Kosco
28008a0c20eSJorgen Austvik        </plugins>
28108a0c20eSJorgen Austvik    </build>
28208a0c20eSJorgen Austvik
28308a0c20eSJorgen Austvik</project>
284