Program-Me-Rev
Program-Me-Rev

Reputation: 6624

How to distribute a multi-module maven project

I would like to create a modular app that takes the following folder structure:

Sample directory structure:

main dir/---mainApp.jar
        /---plugins ---/module1.jar
                       /module2.jar
                       /etc.jar
                       /etc_etc.jar

However, using maven, each module takes its own directory structure from the project root:

mvnmodularapp/mainApp/
             /pom
mvnmodularapp/module1/
             /src
             /target/module1-1.0-SNAPSHOT.jar
mvnmodularapp/module12
             /src
             /target/module2-1.0-SNAPSHOT.jar

Is there a way that I can structure it in such a way that a user will only have to download the a mainApp.jar and then later on have the option of downloading more modules into a plugins folder adjacent to mainApp.jar?

Upvotes: 0

Views: 116

Answers (1)

Adriaan Koster
Adriaan Koster

Reputation: 16209

You can use the maven-assembly-plugin to determine a custom build artifact.

Upvotes: 1

Related Questions