|
52 | 52 | # - OPENGROK_DERBY if set, then indexer tries to use derby as
|
53 | 53 | # historycache (see derby command of this
|
54 | 54 | # script)
|
| 55 | +# - OPENGROK_DERBY_URL Use specific URL to JavaDB, e.g. |
| 56 | +# "jdbc:derby://localhost:1528/cachedb;create=true" |
| 57 | +# (default port is 1527) |
55 | 58 | # - OPENGROK_TAG Enable parsing of revision tags into the History
|
56 | 59 | # view
|
57 | 60 | # - READ_XML_CONFIGURATION file with read only configuration
|
@@ -305,7 +308,10 @@ ${BZR:+-Dorg.opensolaris.opengrok.history.Bazaar=$BZR} \
|
305 | 308 | #
|
306 | 309 | if [ -n "${OPENGROK_DERBY}" ]
|
307 | 310 | then
|
308 |
| - DERBY_HISTORY_CACHE="-D" |
| 311 | + DERBY_OPTIONS="-D" |
| 312 | + if [ -n "${OPENGROK_DERBY_URL}" ]; then |
| 313 | + DERBY_OPTIONS="${DERBY_OPTIONS} -u ${OPENGROK_DERBY_URL}" |
| 314 | + fi |
309 | 315 | fi
|
310 | 316 |
|
311 | 317 | # OPTIONAL: Show revision tags in History view.
|
@@ -657,8 +663,23 @@ ValidateConfiguration()
|
657 | 663 |
|
658 | 664 | if [ -n "${OPENGROK_DERBY}" ]
|
659 | 665 | then
|
660 |
| - Warning "CHECK: derbyclient.jar needs to be in where the rest of " \ |
661 |
| - "opengrok used jars are and in unpacked source.war in WEB-INF/lib !" |
| 666 | + if [ `uname -s` == "SunOS" -a -d /opt/SUNWjavadb -a -d /usr/opengrok ]; |
| 667 | + then |
| 668 | + if [ -d "/var/tomcat6" -a \ |
| 669 | + ! -r "/var/tomcat6/webapps/source/WEB-INF/lib/derbyclient.jar" ]; |
| 670 | + then |
| 671 | + FatalError "JavaDB on but no derbyclient.jar under" \ |
| 672 | + "/var/tomcat6/webapps/source/WEB-INF/lib" |
| 673 | + fi |
| 674 | + if [ ! -r "/usr/opengrok/lib/derbyclient.jar" ]; then |
| 675 | + FatalError "JavaDB on but no derbyclient.jar under" \ |
| 676 | + "/usr/opengrok/lib" |
| 677 | + fi |
| 678 | + else |
| 679 | + Warning "CHECK: derbyclient.jar needs to be in where the rest of " \ |
| 680 | + "opengrok used jars are and in unpacked source.war in " \ |
| 681 | + "WEB-INF/lib !" |
| 682 | + fi |
662 | 683 | fi
|
663 | 684 | }
|
664 | 685 |
|
@@ -730,7 +751,7 @@ StdInvocation()
|
730 | 751 | ${JAVA_DEBUG} \
|
731 | 752 | -jar ${OPENGROK_JAR} \
|
732 | 753 | ${IGNORE_PATTERNS} ${ENABLE_PROJECTS} \
|
733 |
| - ${DERBY_HISTORY_CACHE} \ |
| 754 | + ${DERBY_OPTIONS} \ |
734 | 755 | ${HISTORY_TAGS} \
|
735 | 756 | ${SCAN_FOR_REPOSITORY} ${REMOTE_REPOSITORIES} \
|
736 | 757 | ${SCAN_DEPTH} \
|
|
0 commit comments