This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
If .zip is extracted, there is no source, the classes are precompiled into,
WEB-INF/classes/net/jforum. There is a Maven .pom file in /META-INF/maven/net.jforum/jforum/pom.xml.
Import into Eclipse - JForum2
Is a .war. In Eclipse,
File > import > Web > War File > Next ... Ignore import "WAR Import: Web libraries". These are all stock for JForum2, and should work as expected.
None of the Eclipse "File > Import" options will work. The handy looking "Install" imports seem to be for importing code from existing projects. Likewise, in the "General" section, the options "Archive File" and "File System".
However, the project can be imported using a stock Java approach by making a .war (which will work because the folders are configured to be a .war),
cd into the folder then make a .war,
jar -cvf jforum-x.x.x.war *
File > import > Web > War File > Next ...
Browse for the .war, name the project (optional), then "Finish"
Adding Maven If Maven control is desired (for adding additional functionality in an agreeable way), well, what you have depends on the version of JForum used. JForum2 has a .pom file, deep inside folders, META-INF/maven/net.jforum/jforum. JForum 2.1.9 has nothing.
The JForum2 .pom file is not, as far as I know, reusable. It is a relic from when the JForum2 structure was built. For example, all the filepaths are wrong, referring to non-existent source folders (this wouldn't be the case for a source download, which would rely on the .pom). And JForum2 can not be imported as a Maven project, because the support folder structure is required.
In either case, as far as I know, if the binary project would be helped by Maven, then another .pom is needed. Fortunately, Eclipse can fix this. In the left panel,
Right click on the project then,
Configure > Convert to Maven Project
Unless any modifications are needed immediately, agree to the stock setup. The result will be a .pom file, sited in the top level of the project.
To use this, Eclipse needs a run configuration,
Run > Run As > Maven Build
Goal = "package"
And tick "Skip tests".
Now, that run configuration can be applied and run, either immediately or by selecting from the menus under "Run > Run As".
This Maven build will only cover additions to JForum, not the original or a full build, but that should be enough.
Yes, I should have done. The reference is to JForum, as available at the time of writing, from the original site - 2.1.9. Other versions differ, and it's clear that JForum2 has adapted slightly different internal structure and publishing for the code resource.
robert crowther wrote:Yes, I should have done. The reference is to JForum, as available at the time of writing, from the original site - 2.1.9. Other versions differ, and it's clear that JForum2 has adapted slightly different internal structure and publishing for the code resource.
Ah ok. I've edited that into your post since it was confusing without.