maven - How can I easily convert between the groupId form of a library and its associated path in the local repository? -
i using gradle install android aar package (although, conceivably work jar or other artifact). can install artifact ./gradlew install
. install local maven repository, default ~/.m2/repository
.
this works fine. now, need create new task can work actual files of repository. can of information need, have groupid
in form: com.somecompany.project
, , want in form: com/somecompany/project
(since how stored in local maven repository on file system).
i know can convert .
characters ${file.separator}
, but, given maven has operation internally, there quick method doing that's part of maven plugin? i'm hoping able like:
def groupdirstructure = maven.convertgrouptopath(project.group)
if want @ file should resolve dependency rather go searching on file system.
repositories { mavenlocal() } configurations { local } dependencies { local 'com.somecompany.project:module:1.0' } task copyartifacts(type: copy) { configurations.local "some/dir" }
Comments
Post a Comment