| Contents |
|---|
Install Subclipse, the Maven Eclipse and the Tomcat Launcher plugins.
PLEASE NOTE: I experienced many issues installing all of these plugins on a fresh install of Ubuntu 12.04. I don't know if it was somehow my personal configuration or if there is some issue. I was eventually able to overcome by fully closing Eclipse, restarting, and trying everything again. Once I did this I experienced no issues installing the plugins mentioned above.
Once installed, select the "SVN Repository" Eclipse perspective and add
as a repository URL.
You should now be able to click on this repository and open the SVN tree:
Right click on the trunk node, select the "Find/Check out as..." menu option. In the following dialog box you can Check out the source code:
Now change back to the Java perspective.
In the package explorer view do a right mouse click on the pom.xml file and select the menu Run As → Maven build....
In the appearing dialog box select the Select... button in the Main tab and choose the package goal:
I needed to run this twice and increase the default java heap for eclipse to -Xmx1024m, because in the first run I get an OutOfMemoryError exception:
[INFO] Compiling 2 source files to C:\IDE\workspace\jamwiki_svn\javadiff\target\classes org.apache.maven.plugin.CompilationFailureException: Compilation failure Failure executing javac, but could not parse the error: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space at java.util.zip.ZipEntry.initFields(Native Method) at java.util.zip.ZipEntry.<init>(ZipEntry.java:96) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:329) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:299) at com.sun.tools.javac.util.DefaultFileManager$ZipArchive.<init>(DefaultFileManager.java:405) at com.sun.tools.javac.util.DefaultFileManager$SymbolArchive.<init>(DefaultFileManager.java:460) at com.sun.tools.javac.util.DefaultFileManager.openArchive(DefaultFileManager.java:544) ... ...
The Maven package build has now generated some additional files and directories.
Copy these generated jflex files:
from
C:\IDE\workspace\jamwiki_svn\jamwiki-core\target\generated-sources\jflex\org\jamwiki\parser\jflex
to
C:\IDE\workspace\jamwiki_svn\jamwiki-core\src\main\java\org\jamwiki\parser\jflex
Delete these files from the
C:\IDE\workspace\jamwiki_svn\jamwiki-war\target\jamwiki-war-0.6.6-SNAPSHOT\WEB-INF\lib
directory:
and delete this file
C:\IDE\workspace\jamwiki_svn\jamwiki-war\target\jamwiki-war-0.6.6-SNAPSHOT.war
Select the Eclipse Window → Preferences... menu. In the dialog select the node Java → Build Path → Classpath Variables and:
JAMWIKI_WEBAPP which points toC:/IDE/workspace/jamwiki_svn/jamwiki-war/target/jamwiki-war-0.6.6-SNAPSHOTTOMCAT_HOME which points to your Tomcat home directory. In my case it points to:
C:/server/tomcat-6.0.13After that, select the Tomcat node and define your Tomcat settings. Be sure that the directory C:\server\tomcat-6.0.13\conf\Catalina\localhost exists:
Edit the .project file, so that the project is a Java, Maven2 and Tomcat plugin related project:
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>jamwiki_svn</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.maven.ide.eclipse.maven2Builder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.maven.ide.eclipse.maven2Nature</nature> <nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature> </natures> </projectDescription>
Create a new source folder named mysrc.
Change the .classpath file in the following way:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="my-src"/> <classpathentry kind="src" path="addon-src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/info.bliki.wiki.svn"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/core-renderer.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/itext-paulo-155.jar"/> <classpathentry kind="lib" path="lib/junit.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-codec-1.3.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-logging.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-validator-1.3.1.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/jakarta-oro.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-fileupload-1.2.jar"/> <classpathentry kind="var" path="TOMCAT_HOME/lib/servlet-api.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-httpclient-3.1.jar"/> <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.10-bin.jar"/> <classpathentry kind="lib" path="/info.bliki.wiki.svn/lib/commons-lang-2.4.jar"/> <classpathentry kind="output" path="bin"/> </classpath>
Do a right mouse click on your project and select menu Properties. In the dialog box select the Tomcat node. In the dialog box define the Application-URI as jam066 and the sub-directory for the webapps root as /jamwiki-war/target/jamwiki-war-0.6.6-SNAPSHOT: 
In the Java perspective's toolbar, where are three buttons to
Press the Start Tomcat button and you should see the Tomcat logging in the Eclipse Console view. (If the Console view isn't open, you can open it in the menu Window → Show View → Console)
Now open a browser and run JAMWiki with the following URL:
JAMWiki should automatically switch to the installation setup page:
Create a directory for your JAMWiki cache, search, database and upload files:
c:\temp\jamwiki
and configure it in the setup page. I've used the following path settings in the setup process:
... file-dir-full-path=C\:\\IDE\\workspace\\jamwiki_svn\\jamwiki-war\\target\\jamwiki-war-0.6.6-SNAPSHOT\\upload file-dir-relative-path=/jam066/upload/ ... homeDir=C\:\\temp\\jamwiki
Stop Tomcat now and do a refresh (right mouse click in the Package Explorer view and select menu Refresh F5) of your JAMWiki Eclipse project.
The JAMWiki installation created a new properties file:
/jamwiki_svn/jamwiki-war/target/jamwiki-war-0.6.6-SNAPSHOT/WEB-INF/classes/jamwiki.properties
Copy this jamwiki.properties file directly under your mysrc folder.
In the jamwiki.properties file you can now directly edit the configuration and restart Tomcat afterwards. For example I configured my Bliki engine as the default Wikipedia syntax parser:
parser=org.jamwiki.parser.bliki.BlikiParser