Compiling asmack

So annoyed to found that not even a single link works, just did a fresh clone and then use this:

./build.bash -b master

which should be ok, but it gets destroyed at applying some patches. precisely at “21-remove-unused-smack.sh”. says no such file “LiteDebugger.java”

Even https://github.com/flowdalic/asmack don’t give any ‘readme’ for compiling.

Did tried https://github.com/QuickBlox/asmack/ also but same result

my environment is ubuntu 14.04

Use ‘-b 4.0’ . aSmack is based on Smack 4.0.

ok first, much thanx for the reply.

second, did a fresh process and these came in the logs:

Branch 4.0 set up to track remote branch 4.0 from origin.

Switched to a new branch ‘4.0’

Fetching from http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/management/common/src/main/ to qpid at revision HEAD

svn: E175002: Unable to connect to a repository at URL ‘http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/management/common/src/main

svn: E175002: OPTIONS request on ‘/repos/asf/qpid/trunk/qpid/java/management/common/src/main’ failed: 408 Request Timeout

Now its obvious that its a request timeout. What should i do here now? I mean, i run again the same command “./build.bash -b 4.0” but now it says:

Fetching 4.0 branch/commit from git://github.com/Flowdalic/smack.git to smack via git

Already on ‘4.0’

Your branch is up-to-date with ‘origin/4.0’.

Fetching from http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/management/common/src/main/ to qpid at revision HEAD

mkdir: cannot create directory ‘qpid’: File exists

So?

P.S: Why did you removed the build instructions from github? I was checking the commits and found your commit !!

ignore asmack, I would recommend you switch to 4.1.0 beta2 “smack-android” I tested with BOSH it is working fine (a minor code change required in BOSH Connection java)

noooooooo, @Zigma; u have to explain a bit. m not that pro.

e.g u wanted me to use ./build.bash -b 4.1.0 right?

then what do you mean by “I tested with BOSH”??? whats the minor change?

Hi,

I mean to say the smack released as a latest beta version “beta2”

you can find the released jar files at web site The Central Repository Search Engine

you can download sources.jar files also

so that you don’t need to compile it.

All you need is to know the dependency libraries corresponding to those jar files.

as you told that you are not a pro I am giving the following dependencies list of JAR files.

jbosh-0.8.0.jar

jstun-0.7.3.jar

jxmpp-core-0.4.1.jar

jxmpp-util-cache-0.4.1.jar

jzlib-1.1.3.jar

minidns-0.1.5.jar

org.xbill.dns_2.1.6.jar

smack-android-4.1.0-beta2.jar

smack-android-extensions-4.1.0-beta2.jar

smack-bosh-4.1.0-beta2.jar

smack-compression-jzlib-4.1.0-beta2.jar

smack-core-4.1.0-beta2.jar

smack-extensions-4.1.0-beta2.jar

smack-im-4.1.0-beta2.jar

smack-resolver-dnsjava-4.1.0-beta2.jar

smack-resolver-minidns-4.1.0-beta2.jar

smack-sasl-provided-4.1.0-beta2.jar

smack-tcp-4.1.0-beta2.jar

xpp3-1.1.4c.jar

xSocket-2.8.15.jar

xSocket-multiplexed-2.1.7.jar

all the above files can be downloaded from the same maven website

If you know how to create pom.xml the you use mvn to do that job for you

Regarding BOSH


BOSH is a protocol which uses pure HTTP/HTTPS for doing XMPP.

I told that I am using BOSH protocol, because it comes handy in situation where TCP/IP bit unstable

Regarding the minor change


There was a “break;” statement missing in XMPPBoshConnection.java

If you are going for BOSH based XMPP then you need to introduce that and compile only that part again otherwise ignore it

Hope it helps

1 Like
  1. I don’t recommend using dnsjava on Android

  2. You can also just fetch the latest 4.1.0-beta3-SNAPSHOT which includes the fix for the missing ‘break’ statement in XMPPBOSHConnection