Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Can't build Paho Java project
Can't build Paho Java project [message #1176773] Fri, 08 November 2013 14:47 Go to next message
Valerio Ferrantelli is currently offline Valerio FerrantelliFriend
Messages: 3
Registered: November 2013
Junior Member
Hi,

I'm very interested in the MQTT protocol and Paho seems to be the reference implementation.

I'm getting the source code on Eclipse (I need the source, not precompilated library) with the following git url:
git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.java.git

but both master and develop can't be compiled.
I receive several errors like for example
-ClientComms cannot be resolved to a variable


I'm trying with a Mac and Fedora machines, using Java 7 libraries.
Any suggestion on how can I build the sources? Maybe is it a Java Runtime issue?

Thanks
Valerio
Re: Can't build Paho Java project [message #1176906 is a reply to message #1176773] Fri, 08 November 2013 16:38 Go to previous messageGo to next message
Valerio Ferrantelli is currently offline Valerio FerrantelliFriend
Messages: 3
Registered: November 2013
Junior Member
Hi,

I've downloaded the 0.2.1 version from
http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.java.git/

and this seem to works (I mean no compilation errors).

My question for the developers and/or users is: is this version stable enough? Is this compliant with the v3.1 of the mqtt specifications?

Anyway my original question (how to use the v0.4) still remain Wink

Thanks,
Valerio
Re: Can't build Paho Java project [message #1176913 is a reply to message #1176773] Fri, 08 November 2013 16:44 Go to previous messageGo to next message
Andy Piper is currently offline Andy PiperFriend
Messages: 17
Registered: November 2011
Location: Kingston upon Thames, UK
Junior Member

I was able to:

git clone git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.java.git
cd org.eclipse.paho.mqtt.java.git
mvn package


NB you may prefer to run
mvn package -Dmaven.test.skip=true


(on a Mac running Mavericks with Java 7)

That was master / 0.4.0 - I'm just building develop now.


Developer Advocate | Eclipse Paho project | mqtt.org | andypiper.me
Re: Can't build Paho Java project [message #1176920 is a reply to message #1176913] Fri, 08 November 2013 16:46 Go to previous messageGo to next message
Andy Piper is currently offline Andy PiperFriend
Messages: 17
Registered: November 2011
Location: Kingston upon Thames, UK
Junior Member

... now built the develop branch with the same set of commands, works.

Regarding your questions about 0.2.1 - yes it is MQTT 3.1-compliant and it is stable. You don't get the asynchronous API that was added after 0.3.x though, and the version from the git repo is generally in better shape overall.


Developer Advocate | Eclipse Paho project | mqtt.org | andypiper.me
Re: Can't build Paho Java project [message #1176973 is a reply to message #1176920] Fri, 08 November 2013 17:35 Go to previous messageGo to next message
Valerio Ferrantelli is currently offline Valerio FerrantelliFriend
Messages: 3
Registered: November 2013
Junior Member
Hi Andy,
thanks for your reply!

I've used your commands and I confirm that source code is downloaded and built.

But now, how can I open it into Eclipse, read, modify and rebuild it?
If I perform the following steps:
- open eclipse (kepler, java7 installed, fedora linux)
- import -> existing proj into workspace
- selecting the org.eclipse.paho.mqtt.java folder (the folder downloaded and built with your commands)
- 3 projs are found (mqttv3, mqttv3/internal/traceformat, mqttv3app)
- finish

---> 2022 errors found, for example:
Assert cannot be resolved
AfterClass cannot be resolved
BeforeClass cannot be resolved
ClientComms cannot be resolved


Thanks for your support, it is very important and useful for me.

BR
Valerio


Re: Can't build Paho Java project [message #1177068 is a reply to message #1176973] Fri, 08 November 2013 18:56 Go to previous messageGo to next message
Andy Piper is currently offline Andy PiperFriend
Messages: 17
Registered: November 2011
Location: Kingston upon Thames, UK
Junior Member

Right, that looks like a library path issue on the Eclipse projects. I have raised a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=421363

There are a few projects so it is worth understanding what they are:

org.eclipse.paho.client.mqttv3 is the client library (which uses the internal traceformat project)
org.eclipse.paho.sample.mqttv3app is the basic set of samples (which use the client library)
org.eclipse.paho.sample.utility is a GUI utility which also uses the client library, but I do not think it ever has been set up as an Eclipse workspace project.

org.eclipse.paho.client.mqttv3 *should* just build (I haven't checked for myself lately). If it doesn't, try adding the traceformat project to the library path for it in project settings.
The others probably need the library project mqttv3 added to their paths.

BTW, most of the developers hang out on the mailing list https://dev.eclipse.org/mailman/listinfo/paho-dev and you'll find that much more active than these web-based forums.

Please do contribute any comments and detail on the bugzilla ticket with your setup and progress so we can try to get this fixed quickly for you.


Developer Advocate | Eclipse Paho project | mqtt.org | andypiper.me
Re: Can't build Paho Java project [message #1276414 is a reply to message #1177068] Mon, 24 March 2014 14:38 Go to previous messageGo to next message
sway s is currently offline sway sFriend
Messages: 1
Registered: March 2014
Junior Member
Hello,

I am also facing a similar problem. I am able to build the package with the comand
mvn package -Dmaven.test.skip=true

But while importing the project into eclipse, I encountered similar errors as Valerio. May I know how this problem was solved/

Thanks.
Re: Can't build Paho Java project [message #1309052 is a reply to message #1276414] Tue, 22 April 2014 12:40 Go to previous message
Savio Sciancalepore is currently offline Savio SciancaleporeFriend
Messages: 1
Registered: April 2014
Junior Member
Hi all, I'm having the same problem. Is there anyone who would suggest me a solution? Thanks in advance Rolling Eyes
Previous Topic:Paho Java Client under JBoss
Next Topic:Lua MQTT Client Library
Goto Forum:
  


Current Time: Tue Apr 16 07:55:51 GMT 2024

Powered by FUDForum. Page generated in 0.46171 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top