Skip to content

Commit c1a21bc

Browse files
ahornaceVladimir Kotal
authored andcommitted
REST API support (#2184)
fixes #1801
1 parent f8591e9 commit c1a21bc

File tree

68 files changed

+3218
-5135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3218
-5135
lines changed

OpenGrok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ DefaultInstanceConfiguration()
376376
WEBAPP_CONFIG_ADDRESS=""
377377
fi
378378
else
379-
WEBAPP_CONFIG_ADDRESS="localhost:2424"
379+
WEBAPP_CONFIG_ADDRESS="http://localhost:8080/source"
380380
fi
381381

382382
if [ -n "${WEBAPP_CONFIG_ADDRESS}" ]; then

distribution/assembly.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
<outputDirectory>bin</outputDirectory>
6363
<includes>
6464
<include>ConfigMerge</include>
65-
<include>Messages</include>
6665
<include>Groups</include>
6766
</includes>
6867
</fileSet>

doc/EXAMPLE.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@ edit WEB-INF/web.xml and add the following section (next to all the other
149149
<param-value>/opengrok/configuration.xml</param-value>
150150
</context-param>
151151

152-
<context-param>
153-
<param-name>ConfigAddress</param-name>
154-
<param-value>localhost:2424</param-value>
155-
</context-param>
156-
157-
The last entry will let the web application listen on port 2424 for
158-
configuration updates. There is currently _no_ authentication implemented here,
159-
so you should not add an ip address reachable from an untrusted source.
160-
If you run the index generation on another server than the web server, you must
161-
add one of the external interfaces of the web server (but it should _NOT_ be
162-
reachable from external hosts).
163-
164152
You may also want to modify the file index_body.html before you re-create
165153
the jar-file with the following commands:
166154

opengrok-indexer/pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
3737
<version>1.1-rc30</version>
3838
</parent>
3939

40+
<properties>
41+
<jersey.version>2.27</jersey.version>
42+
</properties>
43+
4044
<build>
4145
<sourceDirectory>../src</sourceDirectory>
4246
<testSourceDirectory>../test</testSourceDirectory>
@@ -530,11 +534,43 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
530534
<groupId>org.apache.ant</groupId>
531535
<artifactId>ant</artifactId>
532536
</dependency>
537+
<dependency>
538+
<groupId>org.glassfish.jersey.containers</groupId>
539+
<artifactId>jersey-container-servlet</artifactId>
540+
<version>${jersey.version}</version>
541+
</dependency>
542+
<dependency>
543+
<groupId>org.glassfish.jersey.inject</groupId>
544+
<artifactId>jersey-hk2</artifactId>
545+
<version>${jersey.version}</version>
546+
</dependency>
547+
<dependency>
548+
<groupId>org.glassfish.jersey.media</groupId>
549+
<artifactId>jersey-media-json-jackson</artifactId>
550+
<version>${jersey.version}</version>
551+
</dependency>
552+
<dependency>
553+
<groupId>org.glassfish.jersey.ext</groupId>
554+
<artifactId>jersey-bean-validation</artifactId>
555+
<version>${jersey.version}</version>
556+
</dependency>
533557
<dependency>
534558
<groupId>junit</groupId>
535559
<artifactId>junit</artifactId>
536560
<scope>test</scope>
537561
</dependency>
562+
<dependency>
563+
<groupId>org.awaitility</groupId>
564+
<artifactId>awaitility</artifactId>
565+
<version>3.1.0</version>
566+
<scope>test</scope>
567+
</dependency>
568+
<dependency>
569+
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
570+
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
571+
<version>${jersey.version}</version>
572+
<scope>test</scope>
573+
</dependency>
538574

539575
</dependencies>
540576

src/org/opensolaris/opengrok/configuration/Configuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public Map<String, String> getCmds() {
505505
}
506506

507507
/**
508-
* @see RuntimeEnvironment#getMessagesInTheSystem()
508+
* @see org.opensolaris.opengrok.web.messages.MessagesContainer
509509
*
510510
* @return int the current message limit
511511
*/
@@ -514,7 +514,7 @@ public int getMessageLimit() {
514514
}
515515

516516
/**
517-
* @see RuntimeEnvironment#getMessagesInTheSystem()
517+
* @see org.opensolaris.opengrok.web.messages.MessagesContainer
518518
*
519519
* @param messageLimit the limit
520520
* @throws IllegalArgumentException when the limit is negative

0 commit comments

Comments
 (0)