Skip to content

Commit 799e328

Browse files
committed
make sure to include version information in the paths
fixes #4426
1 parent aad3e10 commit 799e328

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

opengrok-web/src/main/java/org/opengrok/web/Scripts.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright (c) 2017, 2020, Chris Fraire <[email protected]>.
2323
* Portions Copyright (c) 2022, Krystof Tulinger <[email protected]>.
2424
*/
@@ -103,16 +103,19 @@ public String toHtml() {
103103

104104
private static final WebJarAssetLocator assetLocator = new WebJarAssetLocator();
105105

106-
/**
106+
/*
107107
* Aliases for the page scripts. The path in the FileScript is relatively to
108108
* the request's context path.
109109
*
110110
* @see HttpServletRequest#getContextPath()
111111
*/
112112
static {
113-
putFromWebJar("jquery", "jquery.min.js", 10);
113+
// Due to the behavior of the webjar scanner, it is necessary for the paths to contain a version.
114+
// Otherwise, with multiple versions of the webapp deployed within the same application server,
115+
// an exception will be thrown and the deployment will fail.
116+
putFromWebJar("jquery", "3.6.4/jquery.min.js", 10);
114117
putjs("jquery-ui", "js/jquery-ui-1.12.1-custom", 11);
115-
putFromWebJar("jquery-tablesorter", "jquery.tablesorter.min.js", 12);
118+
putFromWebJar("jquery-tablesorter", "2.31.3/dist/js/jquery.tablesorter.min.js", 12);
116119
putjs("tablesorter-parsers", "js/tablesorter-parsers-0.0.3", 13, true);
117120
putjs("searchable-option-list", "js/searchable-option-list-2.0.15", 14, true);
118121
putjs("utils", "js/utils-0.0.46", 15, true);

0 commit comments

Comments
 (0)