Project

General

Profile

difference between mobile-commons, mobile-core & mobile-pro

kumar vinukonda
Added over 4 years ago

Hi,

I am a newbie to Tigase Messenger code. I see that there are 3 folders in the code base. commons, core & pro. Are these different versions? or are all 3 required to build the App.

I couldnt find any documentation for the code base. Is there any?

Any assistance is appreciated.

thanks in advance.

Kumar


Replies (9)

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam over 4 years ago

mobile-commons: shared code what can be used by third-party application to connect with Messenger to send and receive messages.

mobile-core: code of Messenger

mobile-pro: final Messenger application. There was free version with ads. We thought that we may need separated tablet version etc.

Added by kumar vinukonda over 4 years ago

Thank you for the information.

Is there any "how to build" instructions that I can use?

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam over 4 years ago

No.

All dependencies you will find in .project files.

Added by kumar vinukonda over 4 years ago

I am getting the following error. Can you help me fixing this

[2014-10-09 22:33:44 - mobile-phone-pro] Dx

trouble processing javax/naming/AuthenticationException.class

Ill-advised or mistaken usage of a core class (java.* or javax.*)

when not building a core library.

This is often due to inadvertently including a core library file

in your application's project, when using an IDE (such as

Eclipse). If you are sure you're not intentionally defining a

core class, then this is the most likely explanation of what's

going on.

However, you might actually be trying to define a class in a core

namespace, the source of which you may have taken, for example,

from a non-Android virtual machine project. This will most

assuredly not work. At a minimum, it jeopardizes the

compatibility of your app with future versions of the platform.

It is also often of questionable legality.

If you really intend to build a core library -- which is only

appropriate as part of creating a full virtual machine

distribution, as opposed to compiling an application -- then use

the "--core-library" option to suppress this error message.

If you go ahead and use "--core-library" but are in fact

building an application, then be forewarned that your application

will still fail to build or run, at some point. Please be

prepared for angry customers who find, for example, that your

application ceases to function once they upgrade their operating

system. You will be to blame for this problem.

If you are legitimately using some code that happens to be in a

core package, then the easiest safe alternative you have is to

repackage that code. That is, move the classes in question into

your own package namespace. This means that they will never be in

conflict with core system classes. JarJar is a tool that may help

you in this endeavor. If you find that you cannot do this, then

that is an indication that the path you are on will ultimately

lead to pain, suffering, grief, and lamentation.

[2014-10-09 22:33:44 - mobile-phone-pro] Dx 1 error; aborting

[2014-10-09 22:33:44 - mobile-phone-pro] Conversion to Dalvik format failed with error 1

Added by kumar vinukonda over 4 years ago

Hi all,

I am struck at this point and not sure how to move forward. Can someone help me how to get around this issue.

thanks in advance.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

How do you try to build/use the code? Could you provide more details and context in addition to the error message?

Added by kumar vinukonda over 4 years ago

I have imported the below projects into eclipse.

jaxmpp-android

mobile-commons

mobile-core

mobile-phone-pro

I have added dependent project in the java buld path ( mobile-phone-pro had dependent project of mobile-core and like wise)

I have added jndi.jar, dnsjava.jar & tigase-xmltools.jar as external jars to jaxmpp-android project.

Building all projects resulted in no errors. but when I try to run I get the error...

"Dx trouble processing "javax/naming/AuthenticationException.class" as mentioned earlier.

Exploring further I tried to create eclipse project using "mvn eclipse:eclipse" command. But mobile-commons project was failing to build. error was "Could not find artifact com.google.android:android:jar:4.4.2 in tigase (http://maven.tigase.org)"

Added by kumar vinukonda over 4 years ago

I am trying to build the code using Maven. Following issue is encountered.

[INFO]

[INFO] --- android-maven-plugin:3.6.0:generate-sources (default-generate-sources) @ mobile-core ---

[WARNING] Error injecting: com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo

java.lang.NoClassDefFoundError: Lorg/sonatype/aether/RepositorySystem;

at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Class.java:2436)

at java.lang.Class.getDeclaredFields(Class.java:1806)

at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)

at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)

at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)

at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)

at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:565)

at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:551)

at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:865)

at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)

at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)

at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)

at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)

at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)

at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)

at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)

at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)

at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)

at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)

at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)

at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)

at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)

at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)

at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)

at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)

at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)

at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)

at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)

at com.google.inject.Scopes$1$1.get(Scopes.java:59)

at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)

at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)

at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)

at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)

at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:462)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:119)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystem

at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)

at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)

at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)

at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)

... 57 more

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] tigase-mobile ...................................... SUCCESS [ 0.805 s]

[INFO] mobile-commons ..................................... SUCCESS [ 57.617 s]

[INFO] mobile-core ........................................ FAILURE [ 9.414 s]

[INFO] mobile-phone-pro ................................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:16 min

[INFO] Finished at: 2014-10-18T18:25:09+05:30

[INFO] Final Memory: 32M/247M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project mobile-core: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources failed: A required class was missing while executing com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources: Lorg/sonatype/aether/RepositorySystem;

[ERROR] -----------------------------------------------------

[ERROR] realm = plugin>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/home/kumar/.m2/repository/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.6.0/android-maven-plugin-3.6.0.jar

[ERROR] urls[1] = file:/home/kumar/.m2/repository/com/android/tools/build/builder/0.4/builder-0.4.jar

[ERROR] urls[2] = file:/home/kumar/.m2/repository/com/android/tools/sdklib/22.0/sdklib-22.0.jar

[ERROR] urls[3] = file:/home/kumar/.m2/repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar

[ERROR] urls[4] = file:/home/kumar/.m2/repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar

[ERROR] urls[5] = file:/home/kumar/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar

[ERROR] urls[6] = file:/home/kumar/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar

[ERROR] urls[7] = file:/home/kumar/.m2/repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar

[ERROR] urls[8] = file:/home/kumar/.m2/repository/com/android/tools/layoutlib/layoutlib-api/22.0/layoutlib-api-22.0.jar

[ERROR] urls[9] = file:/home/kumar/.m2/repository/com/android/tools/dvlib/22.0/dvlib-22.0.jar

[ERROR] urls[10] = file:/home/kumar/.m2/repository/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar

[ERROR] urls[11] = file:/home/kumar/.m2/repository/com/android/tools/build/builder-test-api/0.4/builder-test-api-0.4.jar

[ERROR] urls[12] = file:/home/kumar/.m2/repository/com/android/tools/build/builder-model/0.4/builder-model-0.4.jar

[ERROR] urls[13] = file:/home/kumar/.m2/repository/com/android/tools/common/22.0/common-22.0.jar

[ERROR] urls[14] = file:/home/kumar/.m2/repository/com/google/guava/guava/13.0.1/guava-13.0.1.jar

[ERROR] urls[15] = file:/home/kumar/.m2/repository/com/android/tools/sdk-common/22.0/sdk-common-22.0.jar

[ERROR] urls[16] = file:/home/kumar/.m2/repository/com/android/tools/ddms/ddmlib/22.0/ddmlib-22.0.jar

[ERROR] urls[17] = file:/home/kumar/.m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar

[ERROR] urls[18] = file:/home/kumar/.m2/repository/com/android/tools/build/manifest-merger/22.0/manifest-merger-22.0.jar

[ERROR] urls[19] = file:/home/kumar/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar

[ERROR] urls[20] = file:/home/kumar/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar

[ERROR] urls[21] = file:/home/kumar/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar

[ERROR] urls[22] = file:/home/kumar/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar

[ERROR] urls[23] = file:/home/kumar/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar

[ERROR] urls[24] = file:/home/kumar/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

[ERROR] urls[25] = file:/home/kumar/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar

[ERROR] urls[26] = file:/home/kumar/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

[ERROR] urls[27] = file:/home/kumar/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar

[ERROR] urls[28] = file:/home/kumar/.m2/repository/emma/emma/2.1.5320/emma-2.1.5320.jar

[ERROR] urls[29] = file:/home/kumar/.m2/repository/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.jar

[ERROR] urls[30] = file:/home/kumar/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar

[ERROR] urls[31] = file:/home/kumar/.m2/repository/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.jar

[ERROR] urls[32] = file:/home/kumar/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar

[ERROR] urls[33] = file:/home/kumar/.m2/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar

[ERROR] urls[34] = file:/home/kumar/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar

[ERROR] urls[35] = file:/home/kumar/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar

[ERROR] urls[36] = file:/home/kumar/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar

[ERROR] urls[37] = file:/home/kumar/.m2/repository/org/sonatype/aether/aether-util/1.13.1/aether-util-1.13.1.jar

[ERROR] urls[38] = file:/home/kumar/.m2/repository/com/github/rtyley/android-screenshot-paparazzo/1.9/android-screenshot-paparazzo-1.9.jar

[ERROR] urls[39] = file:/home/kumar/.m2/repository/com/madgag/animated-gif-lib/1.0/animated-gif-lib-1.0.jar

[ERROR] urls[40] = file:/home/kumar/.m2/repository/com/github/rtyley/android-screenshot-celebrity/1.8/android-screenshot-celebrity-1.8.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import from realm ClassRealm[project>tigase:mobile-core:1.5-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

[ERROR]

[ERROR] -----------------------------------------------------: org.sonatype.aether.RepositorySystem

I am using latest version of maven...

mvn -version

Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T02:28:10+05:30)

Maven home: /home/kumar/software/apache-maven-3.2.3

Java version: 1.7.0_67, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-7-oracle/jre

Default locale: en_IN, platform encoding: UTF-8

OS name: "linux", version: "3.13.0-24-generic", arch: "i386", family: "unix"

I also installed the Maven Android Plugin and followed the instructions given in the link https://github.com/nhaarman/ListViewAnimations/wiki/Contributing-%28Maven%29

I have made slight modifications to the pom.xml files in mobile-commons as well as main project. Attaching the same.

Can someone tell me the procedure to build the code?

Appreciate your help. Thank you in advance.

pom.xml (2.28 KB) pom.xml
pom.xml (1.94 KB) pom.xml

Added by kumar vinukonda over 4 years ago

I was able to successfully build. Could resolve the issues. Issue got resolved when I took the latest of the Android maven plugin. 3.6 was giving issues. Upgraded to latest and it worked.

Thanks to all who have helped me resolving the issues.

    (1-9/9)