Dear Wiki user, You have subscribed to a wiki page or wiki category on "Nutch Wiki" for change notification.
The "RunNutchInEclipse" page has been changed by SebastianNagel: https://wiki.apache.org/nutch/RunNutchInEclipse?action=diff&rev1=50&rev2=51 Comment: add section how to make Eclipse display Javadocs of dependent libs, including IvyDE OutlinkExtractor : getOutlinks() : line 84 }}} - === Remote Debugging in Eclipse (NOT VERIFIED) === + === Remote Debugging in Eclipse === 1. create a new Debug Configuration as [[http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-remotejava_launch_config.htm|Remote Java Application]] and remember the port (here: 37649) 1. launch nutch from command-line but add options to use the [[http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/architecture.html#jdwp|Java Debugger JDWP Agent Library]], e.g. from bash: {{{ @@ -173, +173 @@ </property> }}} + + == Display Javadoc for Dependent Libraries == + + Eclipse is able to show Javadocs immediately, not only for Nutch classes but also for dependent libraries. While Eclipse takes the Javadocs of Nutch classes directly from the source files, this is not the case for dependent [[http://ant.apache.org/ivy/|Ivy]] managed libraries. There are two ways to tell Eclipse where to find the Javadocs of dependent libs: (1) adding the Javadoc URL to a jar file, or (2) use the IvyDE Eclipse plugin. Note that both ways will modify the file {{{.classpath}}}. Because the {{{ant eclipse}}} target will overwrite the {{{.classpath}}} file, you should make a backup before and merge the changes made via Eclipse back afterwards. + + === Connect a Library to the Javadoc URL === + + The simplest way to connect a jar library with its Javadocs is to add the Javadoc URL manually in the classpath editor, see screenshot. + + {{attachment:nutch_eclipse_javadoc_loc.png}} + + === IvyDE === + + The Nutch build system delegates the managment of library dependencies to [[http://ant.apache.org/ivy/|Apache Ivy]]. There is an Eclipse plugin [[http://ant.apache.org/ivy/ivyde/|IvyDE]] to integrate Ivy's dependency managment. It is well-documented, including a description [[http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/create.html|how to add the managed libraries to the Eclipse project]]. The main Ivy file is {{{ivy/ivy.xml}}} but note that every plugin has its own {{{ivy.xml}}}. If working on a specific plugin, it is a good idea to add also its {{{ivy.xml}}}. It is possible to use IvyDE in addition to the libraries placed by {{{ant eclipse}}} in {{{.classpath}}}. + + The repository hosting a library often also provides packages containing javadoc and sources. E.g., the JUnit repository + [[https://repo1.maven.org/maven2/junit/junit/4.11/]] provides the following files: + {{{ + junit-4.11-javadoc.jar 14-Nov-2012 19:21 379344 + junit-4.11-sources.jar 14-Nov-2012 19:21 151329 + junit-4.11.jar 14-Nov-2012 19:21 245039 + junit-4.11.pom 14-Nov-2012 19:21 2344 + }}} + IvyDE is then able to fetch also javadoc and source packages (if provided) and show them in Eclipse. Again, there is an excellent description, how this can be enabled in the [[http://ant.apache.org/ivy/ivyde/history/latest-milestone/preferences.html#mapping|Source/Javadoc Mapping]] section of the Ivy preferences. Note that the Ivy cache (usually {{{~/.ivy/cache/}}}) must be cleaned before [[http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/resolve.html|Ivy Resolve]] is called from Eclipse. + + == Troubleshooting == === eclipse: Cannot create project content in workspace ===