= Developer's Virtual Appliance = == Contents == This appliance contains Eclipse 3.3 running in Ubuntu 7.10, with projects for docx4all, docx4j, and plutext-server. It contains an Alfresco SVN development environment (develop in Eclipse; ant build in a terminal). The GUI is Xfce, which is a great fit, but you could install Gnome or KDE if you preferred. == Uses == You can use the appliance to: 1. do development for plutext-server, and/or Alfresco 2. or simply run plutext-server (or just Alfresco) 3. run docx4all from Eclipse 4. serve docx4all via Java Web Start - visit http://localhost:8080/docx4all/ from Firefox in the appliance 5. develop applications using docx4j (and see how it is used in docx4all and plutext-server) == Download == Get it from [https://sourceforge.net/project/showfiles.php?group_id=218648 sourceforge]. The appliance is a 620 MB download, which uncompresses to 1.9 GB. == Getting started == Prerequisites: you need to be running VMware. I've used VMware Server on both Linux and Vista hosts, but you could also use Player or Workstation. [https://sourceforge.net/project/showfiles.php?group_id=218648 Download the appliance], uncompress it, then run it in VMware. Choose "create" new UUID. The username/password is dev/dev; you should probably change this. Right click on the desktop to get a menu. Firefox is under Network; Terminal is under Accessories; Eclipse is under Development. You need to agree to Sun's license terms for their JDK. The first time you open a terminal window, you will be asked for your password, and then asked to accept the license. ''Network'' - the appliance is configured with a static address you will probably want to change. See https://help.ubuntu.com/7.10/server/C/network-configuration.html [[br]] Be sure the address in /etc/hosts matches! If you choose to use dhcp, you might find you need to restart vmware's dhcp service. In Vista - do this by programs > Vmware > VMware Server > right click on Manage Virtual Networks to run as administrator .. DHCP tab .. restart button. A similar procedure works on OSX. For a laptop, host only is best (use port mapping to see the appliance from your laptop). Can't ping your Windows host? That'll be Windows' firewall. ''Screen resolution'' - [wiki:VirtualApplianceScreenResolution see here]. ''Time zone'' - unless you are in Melbourne, sudo dpkg-reconfigure tzdata ''Access via VNC'' - see [wiki:VirtualApplianceVNC] == eclipse == Eclipse is on the Xfce menu under 'development', or in a terminal, type /usr/lib/eclipse/eclipse. === docx4all === You can run docx4all via JNLP: [[br]] 1. start tomcat (in a terminal, /usr/share/tomcat5.5/bin/startup.sh) [[br]] 2. in Firefox, visit http://localhost:8080/docx4all/ Or you can run it from Eclipse: [[br]] 1. Start Eclipse (see above). [[br]] 2. Click on the the docx4all project, then press run and it should work. [[br]] 3. You can create a new document, or open a pre-existing one (navigate to workspace/docx4all/sample-docs) But you probably want support for styles and everything else (font handling, view source) we added after building the appliance. To get it:[[br]] 1. do svn update in the docx4all project (in Eclipse, right click on docx4all, then choose Team > Update) [[br]] 2. Build Path > Configure Build Path > Java Build Path > Source tab; Remove the existing entries, and: [[br]] Add src/main/java [[br]] Add src/main/resources [[br]] 3. in Eclipse, in docx4all project's build path, remove all the jars on the Libraries tab, since Maven now handles these. Also, remove the AppFramework and docx4j projects, since they are also packaged as Maven dependencies. [[br]] 4. now it should run happily [[br]] 5. to verify, navigate to workspace/docx4all/sample-docs then open docx4all-fonts-bolditalic.docx. You might want to [wiki:VirtualApplianceFonts install some fonts]. To update the JNLP, from a terminal in the docx4all project: [[br]] dev@plutext-dev:~/workspace/docx4all$ ant webstart [[br]] dev@plutext-dev:~/workspace/docx4all$ rm /usr/share/tomcat5.5/webapps/docx4all -rf [[br]] dev@plutext-dev:~/workspace/docx4all$ cp docx4all.war /usr/share/tomcat5.5/webapps/ [[br]] restart tomcat if necessary. == m2eclipse == Recommend you update m2eclipse to the 0.9.x series. Get the Maven2 plugin for Eclipse from the update site at http://m2eclipse.sonatype.org/update-dev/ === docx4j === To update the docx4j project: 1. in Eclipse, right click on the project, then choose Team > Update) [[br]] 2. remove all jars from docx4j's build path (right click on docx4j > Build Path > Configure Build Path > Libraries tab), since Maven now handles these [[br]] === Alfresco === As shipped, the appliance contains Alfresco 2.9 source code with several patches. To run it: 1. open a terminal and cd ~/workspace/Alfresco/HEAD/root 2. svn update (Alfresco will not build or run until svn update completes, since to keep the appliance small, there are some 400 MB worth of files we left out. If svn complains that some directory already exists, just delete that directory, and run svn update again) 3. ant (As at 6 May 2008, ant incremental-tomcat-exploded fails) 4. /usr/share/tomcat5.5/bin/startup.sh ; tail -f /usr/share/tomcat5.5/logs/catalina.out In Firefox, visit http://localhost:8080/alfresco/ [[br]] The login is admin/admin. Eclipse: Following updates to Alfresco after this virtual machine was published, you might want to import WebScript-Framework as an Eclipse project, using File > Import > General > Existing Projects Into Workspace > Next, then Browse and select Alfresco/HEAD/root/projects/webscript-framework OpenOffice: this isn't installed. If you want Alfresco OpenOffice integration: 1. download OpenOffice (I used 2.3.1) 2. sudo apt-get install rpm (If you get the DEB download, you won't need to do this) 3. uncompress the download, and run the OpenOffice installer 4. tell Alfresco about it: dev@plutext-dev:~/workspace/Alfresco/HEAD/root$ cp projects/installer/install_extension/openoffice-startup-context.xml.install /usr/share/tomcat5.5/webapps/alfresco/WEB-INF/classes/alfresco/extension/openoffice-startup-context.xml edit that file, so the relevant line now reads: === Alfresco (with plutext-server) === To install plutext-server into alfresco. dev@plutext-dev:~$ cd ~/workspace/plutext-server/ [[br]] dev@plutext-dev:~$ svn update [[br]] Patch Alfresco/HEAD/root/build.xml and projects.xml using the 2 corresponding patches from plutext-server/src/alfresco/patches. You can do this in Eclipse, or, if you are using Linux, from a command line. I haven't automated it via ant, since patch on Windows is screwy :( Also patch web.xml, using alf-web-client-patches.txt. See further [/trac/plutext-server/wiki/PatchingAlfresco Integration details]. dev@plutext-dev:~/workspace/plutext-server$ ant deploy-plutext-in-alfresco .. then start Tomcat. Note: Currently, you really need the Word 2007 addin to do anything much with this. (Though you can point any WebDAV client at /alfresco/plutextwebdavserver/ to PUT a docx file; the Alfresco web client will then show it unzipped) == Support == This is free software, and there is no entitlement to support unless you have paid someone for it. To share tips with other users, please visit http://dev.plutext.org/forums/ If your problem is Alfresco related, you could try http://forums.alfresco.com/index.php == Acknowledgements == This environment is made possible by the following: Ubuntu's JeOS (7.10) Xfce 4 Sun Java 6 Tomcat 5.5 Eclipse 3.3 Alfresco 2.9 from SVN MySQL 5.0.45 Subversion Ant 1.7, !SvnAnt, ant-jnlp Maven 2, m2eclipse stuff from dev.plutext.org and many valuable jars too numerous to mention... == Gotchas == Alfresco ant clean from command line will cause Eclipse to complain until you do Project > Clean > Clean All. ''Time''. The appliance is configured to sync with the host, via the .vmx config file option tools.syncTime. It is important that the host's time is set correctly, since authentication for web services relies on this. java.rmi.server.!ExportException: internal error: ObjID already in use Make sure your IP address matches in /etc/network/interfaces and /etc/hosts See further http://forums.alfresco.com/viewtopic.php?t=4718 == Further info == See [wiki:MakingVMwareAppliance] See [wiki:VMwareApplianceNextRelease]