Install Smack for Android to local Maven repository

Hi,

I made some small changes in Smack library and need to try it. What is the right step-by-step solution?

Smack directory is in the same directory as my Android app (myAndroidApp/Smack).

I run:

  1. ./…/gradlew assemble # assemble ok

  2. ./…/gradlew compileAndroid # compile ok

  3. ./…/gradlew install # to upload lib to local maven repository, version is setup to snapshot

The last step finished with following error:

Could not publish configuration 'archives'
   > Error installing artifact 'org.igniterealtime.smack:smack-android:jar': Error installing artifact: /.m2/repository/org/igniterealtime/smack/smack-android

Is it any known issue? My local maven repository should be setup correctly.

Thank you for your help!

This is more a gradle/maven artifact question then a Smack related one. You don’t need to have Smack in the same directory as your Android app. You need to configure the build system of your Android app so that it consumes the artifacts of your modified Smack.

What are the changes you made anyway? There should usually be no need to make code changes to Smack.

Thank you for quick reply. It is not problem to configure project to consume the artifacts, but the problem is with using gradle install to upload artifacts to local maven repository. Any ideas how to fix the problem?

About changes - I need change check for presence priority. Our older version of app use asmack and wrong priority 1000 (now with smack 4.1 crashing).

Thanks!

I found the issue. I have wrong path in .m2/settings.xml.

I’m using Mac OS.

Wrong:

${user.home}/.m2/repository

Correct:

${HOME}/.m2/repository