I would like to fetch a maven package with all dependencies. To perform this, I use this command:
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \
--settings settings.xml \
-Dmaven.repo.local=/path/to/m2-repository \
-Dartifact=my.pkg.name:vers
My settings.xml file :
<settings>
<profiles>
<profile>
<id>global</id>
<repositories>
<repository>
<id>google</id>
<name>Google Maven</name>
<url>https://maven.google.com</url>
</repository>
<repository>
<id>jcenter</id>
<name>Jcenter</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>global</activeProfile>
</activeProfiles>
</settings>
It's works fine if there are no aar packages in the dependency tree, otherwise, for each aar packages, I have the error like :
The following artifacts could not be resolved: <pkg-prefix>:<pkg-name>:jar:<pkg-version>
There is a plug-in to manage aar and other android archive formats (com.simpligility.maven.plugins:android-maven-plugin) but I don't know how I will have to use it to perform the same thing that with maven-dependency-plugin with the get method