1
1
#
2
- # Copyright (c) 2006, 2016 , Oracle and/or its affiliates. All rights reserved.
2
+ # Copyright (c) 2006, 2017 , Oracle and/or its affiliates. All rights reserved.
3
3
#
4
4
5
5
@@ -13,11 +13,10 @@ OpenGrok - a wicked fast source browser
13
13
5. OpenGrok setup
14
14
6. Optional Command Line Interface Usage
15
15
7. Change web application properties or name
16
- 8. OpenGrok systray
17
- 9. Information for developers
18
- 10. Tuning OpenGrok for large code bases
19
- 11. Authors
20
- 12. Contact us
16
+ 8. Information for developers
17
+ 9. Tuning OpenGrok for large code bases
18
+ 10. Authors
19
+ 11. Contact us
21
20
22
21
23
22
1. Introduction
@@ -694,36 +693,11 @@ Deploy the modified .war file in tomcat:
694
693
695
694
* just copy the source.war file to TOMCAT_INSTALL/webapps directory.
696
695
697
- 8. OpenGrok systray
698
- -------------------
699
-
700
- The indexer can be setup with agent and systray GUI control application.
701
- This is optional step for those who wish to monitor and configure OpenGrok
702
- from their desktop using systray application.
703
-
704
- An example opengrok-agent.properties file is provided, which can be used when
705
- starting special OpenGrok Agent, where you can connect with a systray GUI
706
- application.
707
-
708
- To start the indexer with configuration run:
709
-
710
- $ java -cp ./opengrok.jar org.opensolaris.opengrok.management.OGAgent \
711
- --config opengrok-agent.properties
712
-
713
- Then from the remote machine one can run:
714
-
715
- $ java -cp ./opengrok.jar \
716
- org.opensolaris.opengrok.management.client.OpenGrokTrayApp
717
-
718
- assuming configuration permits remote connections (i.e. not listening on
719
- localhost, but rather on a physical network interface).
720
-
721
- This agent is work in progress, so it might not fully work.
722
696
723
- 9 . Information for developers
697
+ 8 . Information for developers
724
698
-----------------------------
725
699
726
- 9 .0 Building
700
+ 8 .0 Building
727
701
------------
728
702
729
703
Just run 'ant' from command line in the top-level directory or use build
@@ -733,13 +707,13 @@ Note: in case you are behind http proxy, use ANT_OPTS to download jflex, lucene
733
707
E.g. $ ANT_OPTS="-Dhttp.proxyHost=?.? -Dhttp.proxyPort=80" ant
734
708
735
709
736
- 9 .0.1 Package build
710
+ 8 .0.1 Package build
737
711
-------------------
738
712
739
713
Run 'ant package' to create package (specific for the operating system this is
740
714
being executed on) under the dist/ directory.
741
715
742
- 9 .1 Unit testing
716
+ 8 .1 Unit testing
743
717
----------------
744
718
745
719
Note: For full coverage report your system has to provide proper junit test
@@ -763,7 +737,7 @@ The tests are then run as follows:
763
737
To check if the test completed without error look for AssertionFailedError
764
738
occurences in the TESTS-TestSuites.xml file produced by the test run.
765
739
766
- 9 .2 Using Findbugs
740
+ 8 .2 Using Findbugs
767
741
------------------
768
742
769
743
If you want to run Findbugs (http://findbugs.sourceforge.net/) on OpenGrok,
@@ -798,7 +772,7 @@ under the lib directory):
798
772
There is also a findbugs-xml ant target that can be used to generate XML files
799
773
that can later be parsed, e.g. by Jenkins.
800
774
801
- 9 .3 Using Jacoco
775
+ 8 .3 Using Jacoco
802
776
--------------
803
777
804
778
If you want to check test coverage on OpenGrok, download jacoco from
@@ -813,7 +787,7 @@ Now you should get output data in jacoco.exec
813
787
814
788
Look at jacoco/index.html to see how complete your tests are.
815
789
816
- 9 .4 Using Checkstyle
790
+ 8 .4 Using Checkstyle
817
791
--------------------
818
792
819
793
To check that your code follows the standard coding conventions,
@@ -846,7 +820,7 @@ checkstyle under the lib directory):
846
820
847
821
$ ant checkstyle -Dcheckstyle.home=lib/checkstyle
848
822
849
- 9 .5 Using PMD and CPD
823
+ 8 .5 Using PMD and CPD
850
824
---------------------
851
825
852
826
To check the quality of the OpenGrok code you can also use PMD
@@ -883,7 +857,7 @@ Which will result in:
883
857
$ ls pmd
884
858
cpd_report.xml cpd_report.txt
885
859
886
- 9 .6 Using JDepend
860
+ 8 .6 Using JDepend
887
861
-----------------
888
862
889
863
To see dependencies in the source code, you can use JDepend from
@@ -906,7 +880,7 @@ Output is stored in the jdepend directory:
906
880
$ ls jdepend/
907
881
report.txt report.xml
908
882
909
- 9 .7 Using SonarQube
883
+ 8 .7 Using SonarQube
910
884
-------------------
911
885
912
886
Use a sonar runner with included sonar-project.properties properties,
@@ -919,7 +893,7 @@ e.g. using bash:
919
893
-Dsonar.host.url=http://${SERVERIP}:9000
920
894
-Dsonar.jdbc.url=jdbc:h2:tcp://${SERVERIP}:9092/sonar
921
895
922
- 9 .8 Using Travis CI
896
+ 8 .8 Using Travis CI
923
897
-------------------
924
898
925
899
Travis depends on updated and working maven build.
@@ -928,13 +902,13 @@ you should be able to connect your Github to Travis CI.
928
902
OpenGroks Travis is here: https://travis-ci.org/OpenGrok/OpenGrok
929
903
930
904
931
- 9 .9 Maven
905
+ 8 .9 Maven
932
906
------------------
933
907
The build can now be done through Maven (https://maven.apache.org/) which takes care of the dependency management
934
908
and setup (calls Ant for certain actions).
935
909
936
910
937
- 9 .9.1 Unit Testing
911
+ 8 .9.1 Unit Testing
938
912
-------------------------
939
913
You can test the code at the moment by running `./mvn test` which will execute *all* tests.
940
914
Conditionally, if you don't have every type of repository installed, you can set it to unit-test only those which are
@@ -946,10 +920,10 @@ You can also force a specific repository test from running through the following
946
920
947
921
> ./mvnw test -Djunit-force-all=false -Djunit-force-git=true
948
922
949
- 10 . Tuning OpenGrok for large code bases
923
+ 9 . Tuning OpenGrok for large code bases
950
924
---------------------------------------
951
925
952
- 10 .1 Almost atomic index flip using ZFS
926
+ 9 .1 Almost atomic index flip using ZFS
953
927
---------------------------------------
954
928
955
929
While indexing big source repos you might consider using ZFS filesystem to give
@@ -960,7 +934,7 @@ incrementally index in parallel to having the current sources and index in sync.
960
934
the ones that were updated by SCM/index and start tomcat again - outage is
961
935
minimal, sources+indexes are ALWAYS in sync, users see the truth)
962
936
963
- 10 .2 JVM tuning
937
+ 9 .2 JVM tuning
964
938
---------------
965
939
966
940
OpenGrok script by default uses 2G of heap and 16MB per thread for flush size of
@@ -1001,7 +975,7 @@ For tomcat you can easily get this done by creating conf/setenv.sh:
1001
975
1002
976
export JAVA_OPTS
1003
977
1004
- 10 .3 Tomcat/Apache tuning
978
+ 9 .3 Tomcat/Apache tuning
1005
979
-------------------------
1006
980
1007
981
For tomcat you might also hit a limit for http header size (we use it to send
@@ -1018,7 +992,7 @@ The same tuning to Apache can be done with the LimitRequestLine directive:
1018
992
LimitRequestLine 65536
1019
993
LimitRequestFieldSize 65536
1020
994
1021
- 10 .4 Open File hard and soft limits
995
+ 9 .4 Open File hard and soft limits
1022
996
-----------------------------------
1023
997
1024
998
The initial index creation process is resource intensive and often the error
@@ -1028,15 +1002,15 @@ avoid this increase the ulimit value to a higher number.
1028
1002
It is noted that the hard and soft limit for open files of 10240 works for mid
1029
1003
sized repositores and so the recommendation is to start with 10240.
1030
1004
1031
- 10 .5 Multi-project search speed tip
1005
+ 9 .5 Multi-project search speed tip
1032
1006
-----------------------------------
1033
1007
1034
1008
If multi-project search is performed frequently, it might be good to warm
1035
1009
up file system cache after each reindex. This can be done e.g. with
1036
1010
https://github.com/hoytech/vmtouch
1037
1011
1038
1012
1039
- 11 . Authors
1013
+ 10 . Authors
1040
1014
-----------
1041
1015
1042
1016
The project has been originally conceived in Sun Microsystems by Chandan B.N.
@@ -1049,7 +1023,7 @@ Knut Anders Hatlen, Oracle. http://blogs.oracle.com/kah/
1049
1023
Lubos Kosco, Oracle. http://blogs.oracle.com/taz/
1050
1024
Vladimir Kotal, Oracle. http://blogs.oracle.com/vlad/
1051
1025
1052
- 12 . Contact us
1026
+ 11 . Contact us
1053
1027
--------------
1054
1028
1055
1029
Feel free to participate in discussion on the mailing lists:
0 commit comments