Skip to content

Commit 29fe9da

Browse files
idodeclareVladimir Kotal
authored andcommitted
Add jetty-jspc. Fix opensearch.jsp exposed error.
- Use mergeFragment=false with jetty-jspc so pre-compiled JSP classes are not included in the WAR. Also: - use skipTests not maven.test.skip w.r.t. the short-circuiting the setting up of testdata.
1 parent ba15b5b commit 29fe9da

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

opengrok-indexer/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
400400
<goal>run</goal>
401401
</goals>
402402
<configuration>
403-
<target unless="maven.test.skip">
403+
<target unless="skipTests">
404404
<ant target="-post-compile-test"/>
405405
</target>
406406
</configuration>

opengrok-web/pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
CDDL HEADER START
5+
6+
The contents of this file are subject to the terms of the
7+
Common Development and Distribution License (the "License").
8+
You may not use this file except in compliance with the License.
9+
10+
See LICENSE.txt included in this distribution for the specific
11+
language governing permissions and limitations under the License.
12+
13+
When distributing Covered Code, include this CDDL HEADER in each
14+
file and include the License file at LICENSE.txt.
15+
If applicable, add the following below this CDDL HEADER, with the
16+
fields enclosed by brackets "[]" replaced with your own identifying
17+
information: Portions Copyright [yyyy] [name of copyright owner]
18+
19+
CDDL HEADER END
20+
21+
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
22+
Portions Copyright (c) 2018, Chris Fraire <[email protected]>.
23+
24+
-->
225
<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">
326
<modelVersion>4.0.0</modelVersion>
427

@@ -117,6 +140,23 @@
117140
<finalName>source</finalName>
118141

119142
<plugins>
143+
<plugin>
144+
<groupId>org.eclipse.jetty</groupId>
145+
<artifactId>jetty-jspc-maven-plugin</artifactId>
146+
<version>9.4.14.v20181114</version>
147+
<executions>
148+
<execution>
149+
<id>jspc</id>
150+
<goals>
151+
<goal>jspc</goal>
152+
</goals>
153+
<configuration>
154+
<mergeFragment>false</mergeFragment>
155+
<generatedClasses>${project.build.directory}/jspc</generatedClasses>
156+
</configuration>
157+
</execution>
158+
</executions>
159+
</plugin>
120160
<plugin>
121161
<groupId>org.apache.maven.plugins</groupId>
122162
<artifactId>maven-war-plugin</artifactId>

opengrok-web/src/main/webapp/opensearch.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ information: Portions Copyright [yyyy] [name of copyright owner]
1919
CDDL HEADER END
2020
2121
Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
22-
2322
Portions Copyright 2011 Jens Elkner.
23+
Portions Copyright (c) 2018, Chris Fraire <[email protected]>.
2424
2525
--%><%@page session="false" errorPage="error.jsp" import="
2626
java.util.Set,
2727

28+
org.opengrok.indexer.web.Prefix,
2829
org.opengrok.indexer.web.Util"
2930
%>
3031
<%

0 commit comments

Comments
 (0)