How to compile UMS with Java 7 SDK on OSX ?

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
User avatar
Optimus_prime
Posts: 678
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: How to compile UMS with Java 7 SDK on OSX ?

Post by Optimus_prime »

I'm now able to compile with SDK7 without any issue... except for medialib that I need to copy by hand.
The result is in "ums-2.5.2-distribution.tar.gz".. it is NOT a victory, it's the usual process !
So, when you extract the content somewhere, and you double-click on UMS.jar.... UMS is succefully running in Java 7 without any issue: this will use your locak Java environnement when you setup JAVA7 sdk.
It looks as your running the Linux version that maven compiles as well as compiling the .app bundle for os-x. That maybe the workaround we need for the interim until we sort out the other stuff.
I propose 2 steps:
-1- design an .APP that will only run a script that call UMS.jar... this means that the users need to have JAVA7 SDK (or JRE...) setup on their Mac. pros: this will generate a very litte (in size) package and it's really easy to compile/automate.
Ok that would be easier for us and also limits the size of the package. Good for a workaround
-2- include a light JRE7 in the package with all needed libraries, perhaps with ANT (and Maven tips) it will be possible ?
Now this is were i'm heading. We can't use, in the pom.xml, the app bundler (osxappbundle-maven-plugin)that is currently in there. It has limitations when it comes to bundling java 7 (app with builtin jre)with the app. We need to use appbundler from here. We will need to rewrite the pom.xml to satisfy us building automaticly with maven. Here is some light reading to assist us in rewriting it, well i hope it will. Good luck, and remember whilst i don't own a mac why should you guys miss out on UMS (i'm using a OSX 10.8.2 build on a VMware workstation within windows 7)
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
SubJunk
Lead Developer
Posts: 3706
Joined: Sun May 27, 2012 4:12 pm

Re: How to compile UMS with Java 7 SDK on OSX ?

Post by SubJunk »

Is it any easier with my latest commits? I changed part of the code that was instructing the compiler to build for JDK 6 instead of JDK 7 on OS X so maybe it makes a difference
User avatar
Optimus_prime
Posts: 678
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: How to compile UMS with Java 7 SDK on OSX ?

Post by Optimus_prime »

Sorry Subjnuk, it's made no difference. I think i have made that change myself, i've changed so much trying to get this to work i've forgotton what i've done.
I also get libjvm.dylib plugin Crashing when i attempt to run ums.jar
Sebos have you seen that and if you have how did you get past it.

EDIT: Turns out it's related to running Apple in a VM. I might not be able to help out with testing it
Sebos could you get the latest from git and try to see if subjunks chnages helps.
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
glebb
Posts: 8
Joined: Wed Jun 06, 2012 3:54 am

Re: How to compile UMS with Java 7 SDK on OSX ?

Post by glebb »

Tried the HEAD from git with java 6 and wasn't able to compile, didn't really check what was wrong because it was before I read this forum. Then compiled with java 7, and as reported, it compiles fine but is unable to bundle to .dmg. Starting from command line it seems to work ok though.
sebos
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX ?

Post by sebos »

Yes. glebb, you're right...
but, please provide us the command line you use and will include it in the .APP (instead of JavaApplicationStub.env) ? good idea isnt'it ?

In parallel, to answer to Optimus and Subjunk:

So, I do a git pull and compile again (there is some minor issue to complete de package but everything is fine look at the log). Always an issue with MediaInfoLib but not a big deal.
Again, I use the UMS distribution for the running. and I provide you the debug file (not really debug but will show you the basis), and again, everything is fine for me.

So, if I look at the package(.APP), subjunk, everything is correctly related to JDK7, which is a good new. Only the launcher is not correct...As said with Optimus, we need to use JavaApplication Bundler instead of JavaApplicationStub.
I'm not a java dev... but I will try to see.
Regarding the "pom.xml", we need to modify it and replace the plugin maven for JavaApplicationBundler in the build step for Mac by something (as currently, there is no plugin for Mac that can bundle Java 7, unless I miss something).

I do a little Maven investigation: mvn versions:display-dependency-updates just to see in case there are any updates to do on the Maven plugin and there are some (but as mentionned bu SubJunk, some of then must not be done)...
This does not solve our problems but.. anyway, I'm sure you know this plugin subjunk.
So, I update a lot of plugins (dependancy versions) in the pom.

So, regarding the quick and dirty solution, I modify the JavaApplicationStub.env (it's a shell script) by something that runs java + ClassPath…

Here is the log of the update I have done on the pom to use all latest plugin available except jna and netty that generate too much constraints (the alarm for common-collections is a false alarm).

/Users/sebos/Downloads/UniversalMediaServer >mvn versions:display-dependency-updates
[INFO] Scanning for projects...
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Universal Media Server 2.5.2
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] --- versions-maven-plugin:2.0:display-dependency-updates (default-cli) @ ums ---
[INFO] The following dependencies in Dependencies are using the newest version:
[INFO] ch.qos.logback:logback-classic ................................ 1.0.10
[INFO] ch.qos.logback:logback-core ................................... 1.0.10
[INFO] com.github.junrar:junrar ......................................... 0.7
[INFO] com.google.code.gson:gson ...................................... 2.2.2
[INFO] com.googlecode:xmlwise ........................................... 1.2
[INFO] com.googlecode.juniversalchardet:juniversalchardet ............. 1.0.3
[INFO] com.h2database:h2 ............................................ 1.3.170
[INFO] com.jgoodies:common ............................................ 1.2.1
[INFO] com.jgoodies:forms ............................................. 1.4.2
[INFO] com.jgoodies:looks ............................................. 2.4.2
[INFO] commons-codec:commons-codec ...................................... 1.7
[INFO] commons-configuration:commons-configuration ...................... 1.9
[INFO] commons-httpclient:commons-httpclient ............................ 3.1
[INFO] commons-io:commons-io ............................................ 2.4
[INFO] commons-lang:commons-lang ........................................ 2.6
[INFO] junit:junit ..................................................... 4.11
[INFO] jwbroek.cuelib:cuelib ............................... 1.2.1-2008-06-13
[INFO] maven:maven-nsis-plugin .......................................... 2.1
[INFO] mediautil:mediautil .............................................. 1.0
[INFO] net.coobird:thumbnailator ...................................... 0.4.3
[INFO] net.java.dev.jai-imageio:jai-imageio-core-standalone ...
[INFO] 1.2-pre-dr-b04-2011-07-04
[INFO] net.java.dev.rome:rome ......................................... 1.0.0
[INFO] org:jaudiotagger ............................................... 2.0.3
[INFO] org.apache.sanselan:sanselan .......................... 0.97-incubator
[INFO] org.beanshell:bsh-core ......................................... 2.0b4
[INFO] org.easytesting:fest-assert ...................................... 1.4
[INFO] org.hamcrest:hamcrest-integration ................................ 1.3
[INFO] org.slf4j:jcl-over-slf4j ....................................... 1.7.3
[INFO] org.slf4j:slf4j-api ............................................ 1.7.3
[INFO] sevenzip:jbinding ....................................... 4.65-1.04-RC
[INFO] sevenzip-allplatforms:jbinding-allplatforms ............. 4.65-1.04-RC
[INFO]
[INFO] The following dependencies in Dependencies have newer versions:
[INFO] commons-collections:commons-collections ............ 3.2.1 -> 20040616
[INFO] net.java.dev.jna:jna .................................. 3.4.0 -> 3.5.1
[INFO] org.jboss.netty:netty ..................... 3.2.7.Final -> 3.2.9.Final
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.949s
[INFO] Finished at: Sun Mar 17 12:22:24 CET 2013
[INFO] Final Memory: 13M/139M
[INFO] ------------------------------------------------------------------------
/Users/sebos/Downloads/UniversalMediaServer >
Attachments
pom.xml.zip
(10.86 KiB) Downloaded 504 times
Maven Log.rtf.zip
(2.76 KiB) Downloaded 491 times
ums_dbg.zip
(2.93 KiB) Downloaded 496 times
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
Post Reply