3 | | 1. git clone git://github.com/Unidata/thredds.git thredds |
4 | | 2. cd thredds |
5 | | 3. git checkout 5.0.0 # to compile version 5, checkout any branch you want |
6 | | 4. ./gradlew assemble # gradle puts the war in ./tds/build/libs/ |
7 | | 5. cp ./tds/build/libs/tds-5.0.0-SNAPSHOT.war <TOMCAT_DIRECTORY>/webapps/thredds5.war |
8 | | 6. <TOMCAT_DIRECTORY>/bin/startup.sh |
| 3 | 1. git clone git://github.com/Unidata/thredds.git thredds |
| 4 | 2. cd thredds |
| 5 | 3. git checkout 5.0.0 # to compile version 5, checkout any branch you want |
| 6 | 4. ./gradlew assemble # gradle puts the war in ./tds/build/libs/ |
| 7 | 5. cp ./tds/build/libs/tds-5.0.0-SNAPSHOT.war <TOMCAT_DIRECTORY>/webapps/thredds.war # it is not recommended to change default context path (thredds) |
| 8 | 6. <TOMCAT_DIRECTORY>/bin/startup.sh |
12 | | Detailed info in https://github.com/Unidata/thredds/blob/5.0.0/docs/website/netcdf-java/tutorial/SourceCodeBuild.adoc |
| 12 | Detailed info in [1]. |
| 13 | |
| 14 | == Import thredds in eclipse == |
| 15 | |
| 16 | Once we have the git repo cloned: |
| 17 | |
| 18 | 1. Open eclipse |
| 19 | 2. Install the "Buildship gradle integration" plugin (in eclipse, Help -> Eclipse Marketplace and enter "gradle" in the search box) |
| 20 | 3. Restart eclipse |
| 21 | 4. Go to File -> Import... -> Existing Gradle project, select your thredds folder cloned from github and click next |
| 22 | 5. Select Gradle wrapper and click next |
| 23 | 6. Click finish. Now you should see a bunch of projects in your project explorer |
| 24 | |
| 25 | == Debugging thredds in eclipse == |
| 26 | |
| 27 | 1. Start tomcat from a terminal: <TOMCAT_DIRECTORY>/bin/catalina.sh jpda start |
| 28 | 2. Go to eclipse and select, in the top bar, Run -> Debug configurations... -> Remote Java Application and click New |
| 29 | 3. Choose a name for the configuration, e.g. thredds. |
| 30 | 4. Click Browse... and select the tds project from the project selection window |
| 31 | 5. Be sure that the host is localhost and the port is 8000 |
| 32 | 6. Click Apply |
| 33 | |
| 34 | If you add a breakpoint to some class and do some navigation in the browser, eclipse will stop the execution and will open the debug perspective. |
| 35 | |
| 36 | |
| 37 | [1] - https://github.com/Unidata/thredds/blob/5.0.0/docs/website/netcdf-java/tutorial/SourceCodeBuild.adoc |