Running PMS from eclipse fails, it cannot find the JNA class

Discuss issues related to PS3 Media Server development (only for programmers)

Running PMS from eclipse fails, it cannot find the JNA class

Postby thepadawan42 » Sat Jul 20, 2013 9:33 pm

Hi everyone,

I cannot launch PMS from within eclipse, the "run-from-eclipse" profile fails for me during the testing stage because it cannot find the JNA classes. To make it work I had to modify the pom.xml file to add for such a profile the JNA dependency:
Code: Select all
<dependencies>
  <dependency>
    <groupId>net.java.dev.jna</groupId>
    <artifactId>jna</artifactId>
    <version>${jna-version-posix}</version>
  </dependency>
</dependencies>



Does this happen to anyone else? The pom.xml file itself states '<!-- XXX note: the JNA dependency is declared at the profile level -->' so I'd assume that I am not the only one. I could pull-request the change to the pom.xml file but I see strange that this has not been reported. Information about my setup:
  • Arch Linux x86_64
  • Eclipse version 4.3 (Kepler)
  • Eclipse workspace and PMS sources in different locations
thepadawan42
 
Posts: 2
Joined: Sat Jul 20, 2013 8:53 pm

Re: Running PMS from eclipse fails, it cannot find the JNA c

Postby Raptor399 » Sun Jul 21, 2013 12:22 pm

Interesting observation!

I'm on Mac OSX with just about the same setup as you and I can run PMS from Eclipse without that addition, strangely enough?

The dependency is defined for the "linux" and "osx" profile. There is a difference between those two: the "linux" profile is active by default, whereas the "osx" profile is activated by family. It looks like specifying the "run-from-eclipse" profile in Eclipse disables the default activation, but doesn't stop the "osx" profile from being activated.

I have committed a fix, let me know if that works for you.

Thanks for reporting!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Running PMS from eclipse fails, it cannot find the JNA c

Postby thepadawan42 » Sun Jul 21, 2013 8:34 pm

I updated the pom.xml and with your new commit it works without problems.
Thank you!
thepadawan42
 
Posts: 2
Joined: Sat Jul 20, 2013 8:53 pm

Re: Running PMS from eclipse fails, it cannot find the JNA c

Postby Raptor399 » Mon Jul 22, 2013 10:38 pm

Awesome! You're welcome.
Thanks for reporting back.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 6 guests