How to know groupid and artifactid of any external jars in maven android project
The .jar
s do not have an artifact id. You give them one while mvn install
ing.
For example let's take picasso.jar
of your case:
mvn install:install-file
-Dfile=<path-to-your-picasso.jar>
-DgroupId='com.square'
-DartifactId='picasso'
-Dversion=<version-given-by-you-(better using original picasso.jar version)>
-Dpackaging=<packaging>
-DgeneratePom=true
Then while using in your project, you need to add the dependency with this information.
I've created a script that helps you build the pom.xml dependencies tag if you have a folder full of jars.
To discover this information the script does the following:
- It first looks inside the jar for META-INF/maven/
- then it tries to search for the jar by SHA1 checksum on search.maven.org
- then finally it puts a comment in pom.xml with information about the jar manifest to help you in locating the dependency yourself. Of course you may not find the jar anywhere and then you'll have to host it in your own private maven repository.
You can get it here: https://github.com/sjbotha/make-pom/