Background
Since JForum3 is a major upgrade, a bugfix (and minor upgrade) of JForum has been posted in a Google-based svn repository,
https://code.google.com/p/jforum2/
The downloads, for several releases, have only been been binary distributions, that is to say, JForum code has been compiled to a .jar,
appBase > WEB-INF > jforum.x.x.x.jar
though users are free to build around the webApp structure.
I've found I could get a long way with this binary download. But for a couple of items, I would have been more than happy with binary and, in other circumstances, it would be all I needed. But what if I want to go for source? What do I have to do?
The svn download of trunk displays a structure I do not recognise in in the binary. It has a .war inside a .war. Also, it has a .pom file, so builds using
Maven.
I'll leave others to explain, if they wish, why the nested structure, and what might be done with Maven...?
There is a double issue here, because the aim of this post is to import JForum into Eclipse. Maybe something can be done with the source code's Maven controls? But the best way I've found to get a binary JForum into Eclipse is to generate a .war then wholesale import. That will not work with this source code. Here's what I did...
Steps
Download both a binary and a source version of a chosen svn tag
binary
Use the published site download.
src
check tags,
svn list
http://jforum2.googlecode.com/svn/
download
svn co
http://jforum2.googlecode.com/svn/tags/v2.3.4
War up the binary, import into Eclipse
Navigate into the binary, then,
jar -cvf jforum-x.x.x.war *
(the name can be anything)
In Eclipse
File > import > Web > War File > Next ...
Browse for the war created earlier, and name the project, then "Finish"
Modify the new Eclipse project to work from source code
Remove this .jar from the library,
appBase > WEB-INF > jforum.x.x.x.jar
Now go into the downloaded source code, and copy the folder "net" (and all code contents) from inside source,
Downloads/jforum2.3.4.src/src/main/java/net
Using a filebrowser I pasted this into,
eclipse_workspace/someEclipseProjectName/src
Then refreshed in the Eclipse File Explorer. If you trust Eclipse's copy and paste, paste the folder straight in.
Follow the usual Eclipse/JForum manual setup
Maybe check /src is set as the build folder.
Do project > build, or set to automatic.
[Right click] Server > Add/Remove
Publish the new project.
It won't work yet. Run through the steps in,
https://code.google.com/p/jforum2/wiki/ManualInstallation
to set up a database, pre-populate the database, and set at least some basic config (now is an opportune time to change the big hash property).
Proof of accurate configuration,
http://localhost:8080/someEclipseProjectName
or
http://localhost:8080/someEclipseProjectName/forums/list.page
Notes
my version, 2.3.4, threw an exception. It was a one line fix. In,
src/net/jforum/context/RequestContext.java
Replace,
//Enumeration<Object> getParameterNames();
Enumeration<
String> getParameterNames();
I don't want to publish this until others look at it.