Page 1 of 1
Updated Build notes?
PostPosted:Wed Apr 27, 2011 3:42 pm
by sgastevep
Hi,
Maybe this is something to ignore, or maybe not. I am trying to build on Mac OS X and I know that the process is more tailored to Linux, so this may be moot.
However, things seem to have changed a bit with the Eclipse Helios stuff as compared to the Eclipse Galileo notes in the Wiki. So much so that I am getting kind of lost in trying to piece together the build toolchain and process.
I was able to get the jBPM stuff working, including the Eclipse plugin, so at least there is hope.

However, beyond the basic workflow, to get any that use custom code that calls the OpenKM API to do things like move, rename, add notes, etc., I think will require the whole build environment, won't they?
Has anyone the time to update the Developer guide to current software, or is it perhaps better to try to find the older distributions to use them? I am interested in seeing how I could help give back to the project, but of course getting the build environment set up and running is the first essential step.
Many Thanks,
Steve
Re: Updated Build notes?
PostPosted:Wed Apr 27, 2011 4:54 pm
by sgastevep
Okay, maybe if I started reading it right I would have realized my existing Eclipse stuff was not the EE which is why I had no Server option. I will keep working on the existing notes, they may be fine after all. LoL
[UPDATE: Everything looked so promising, right up until the checkout of the source. It started well enough, seemed to pull it down from the SVN repository, then hangs when updating the maven dependencies. Restarted numerous times, still the same. Oh well, maybe after a reboot.

I did a manual update of maven dependencies (no project) and it completes, but obviously something in the svn checkout is not happy with my system.}
Re: Updated Build notes?
PostPosted:Wed Apr 27, 2011 8:46 pm
by jllort
after svn checkout, all maven libraries will starting downloading, the process can need 2-3 hours ( it's only first time ). About galileo or helios might not be great diferences about it, really some of our developers use helios and others galileo eclipse version.
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 3:42 am
by sgastevep
Thank you. Although I am not intimately familiar with all the bits and bobs being used, I think I did find out that it seems to be some oddity on Mac OS X Snow Leopard with Apple removing the com.apple.cocoa Java bridge, and it looks like one of the many things that maven brings in is depending on that. Doing a manual 'mvn -X -e -U package' command showed the error along the way, so I don't think Eclipse would work either, although I could be wrong.
I have set up a Linux Virtual Machine and am installing all the parts there right now.
Thanks for your answer.
-Steve
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 3:19 pm
by sgastevep
Also, the Maven checkout was hanging in Linux too. Different problem perhaps. It seemed to be stalling during a download request, and when I manually tried to do the download in a browser for that .jar file I saw this:
Code: Select allNote: This Maven repository is deprecated. The JBoss.org Maven repository is now managed by Nexus located at https://repository.jboss.org/nexus/. You should update your Maven builds to use the new repository url since it will contain all current project releases.
If you want to use JBoss artifacts in your project builds, you should use the repository found at http://repository.jboss.org/nexus/content/groups/public-jboss/.
Editing the pom.xml file in the checked-out openkm download to swap out repository.jboss.org/maven2 with the above referenced location and then doing an import of an existing Maven project seems to have moved it along nicely. Maybe this was a transient network error here, but if the repository has been deprecated and the new location has the content it might be worth updating the location in the code base.
Interesting in that I could do a 'mvn package' on Linux without making this change and it would build the war file. However, Eclipse would hang during import. Making this change allowed Eclipse to import it properly both on Linux and Mac OS X, but on the Mac I still get "Missing artifact com.apple:cocoa:jar:1.0:system" as a dependency from this hierarchy:
Code: Select allDEBUG] com.openkm:openkm:war:5.0.5-SNAPSHOT
[DEBUG] org.semanticdesktop.aperture:aperture-runtime-default:jar:1.3.0:compile
[DEBUG] org.semanticdesktop.aperture:aperture-default-crawler:jar:1.3.0:compile
[DEBUG] org.semanticdesktop.aperture:aperture-websites-iphoto:jar:1.3.0:compile
[DEBUG] org.semanticdesktop.nepomuk:aperture-tools-applewrapper:jar:1.0.0:compile
[DEBUG] com.apple:cocoa:jar:1.0:system
But, at least I have a working build environment. Now to actually look at the code.
Update: If I change the version of org.semanticdesktop.aperture from 1.3.0 to 1.4.0 it builds on the Mac too. Yay! I tried v1.5.0 but they did some refactoring in the pdf extractor that caused other build errors so I used 1.4.0. I have not yet tested the resulting WAR file to see if it works as it is supposed to, but it passed the tests and at least this is a step forward for building on Mac OS X.
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 3:41 pm
by pavila
The maven pom.xml in the 5.1 branch was updated, but not in 5.0 I think it should compile.
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 5:34 pm
by sgastevep
I am getting very close - JBoss starts, but I cannot get into the repository.
I see this in the startup, which signaled a problem to me:
Code: Select all12:24:05,010 WARN [DirectRepositoryModule] ### Actual repository version (5) differs from application repository version (0) ###
12:24:05,010 WARN [DirectRepositoryModule] ### You should upgrade the repository ###
I get the login screen, and then get a 403 error after login:
Code: Select allHTTP Status 404 - /OpenKM/com.openkm.frontend.Main/index.jsp
type Status report
message /OpenKM/com.openkm.frontend.Main/index.jsp
description The requested resource (/OpenKM/com.openkm.frontend.Main/index.jsp) is not available.
JBossWeb/2.0.1.GA
I can manually hit "localhost:8080/OpenKM/admin" and get the admin console, and strangely it shows this for the version:
Code: Select allOpenKM - Knowledge Management
Version: 0.0 (build: 0)
Must be something is not being set right when being built or something?
Update: Generated META-INF/MANIFEST.MF only contains:
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 6:25 pm
by pavila
To avoid the warning, stop JBoss, delete the "repository" directory and start JBoss again. It will create a new empty repository with the right node definitions.
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 6:56 pm
by sgastevep
That removed the warning about repository version, but first run of JBoss had errors indexing repository, stopped and started again and it started OK but I still get a 404 error after logging in. Very strange, as I get no errors during build. I am sorry to be having so many problems, but hopefully once I get up and running I can contribute back to make up for them.
Is the MANIFEST.MF supposed to be generated with appropriate information, or is that hand constructed or done only in your official distributions? If I include the MANIFEST.MF from the official distributed WAR file, then my build works as it should.
Re: Updated Build notes?
PostPosted:Thu Apr 28, 2011 9:00 pm
by jllort
There's nothing hidden about MANIFEST.MF etc... the file is hand made and it's not needed to make any change on it, is right as is.
Re: Updated Build notes?
PostPosted:Tue Jan 10, 2012 5:10 pm
by richard.noble
Did you find a solution to this, as I am battling with the same problem?
Re: Updated Build notes?
PostPosted:Wed Jan 11, 2012 9:26 am
by pavila
Compile OpenKM from source is as simple as:
$ svn co
https://openkm.svn.sourceforge.net/svnr ... 5.1/openkm
$ cd openkm
$ mvn install
Once compiled, the war is located at "target/OpenKM.war".