Maven: download all the artifacts of a group

I am using maven 3.0 with nexus as remote repository. I am wondering, is there a way to download all the artifacts with the same groupId using maven without knowing the name of all the artifacts? In other words, is it possible to download all the artifacts from remote repository automatically by only mentioning the group Id?

For example, I want to download all the artifacts in group com.example.here to my local repository:

<groupId>com.example.here</groupId>

artifacts:

<artifactId>a1</artifactId>
...
<artifactId>an</artifactId>

and the version that I want is the latest.

Answers


You can use lftp (should be included in many UNIX distributions) to mirror a part of a Maven repository. Since the repository uses sub-directories based on groupIDs, you can use that do fetch all artifacts belonging to a certain group. E.g.

$ lftp https://repository.jboss.org/nexus/content/groups/public/apache-xalan/ -e 'mirror .'

Will grab everything under the apache-xalan groupId.

This may not work with every Maven repository. Some may only allow access to the directory structure at a certain depth or not at all.


Its not possible to do this since a dependency in maven needs to be referred by groupId:artifactId:version:classifier (optional).

One way I can think of is to create an assembly project that has dependencies on all the projects you want to download and the version optionally set to LATEST. You can use maven assembly plugin to create an archive from the dependency sets.


Need Your Help

how to extract h264 raw video from mov using ffmpeg?

video ffmpeg

I can use MP4Box to extract the h264 track from a mov file:

Interoperability between two AES algorithms

javascript objective-c cocoa encryption aes

I'm new to cryptography and I'm building some test applications to try and understand the basics of it. I'm not trying to build the algorithms from scratch but I'm trying to make two different AES-...