1

I have a multi module project with the following setup: Module A has a Helper module as a dependency in its pom.xml

    <dependency>
        <groupId>org.example</groupId>
        <artifactId>Helper</artifactId>
        <version>1.0-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>

Helper module has a dependency as well:

    <dependency>
        <groupId>org.example</groupId>
        <artifactId>Another helper</artifactId>
        <version>1.0-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>

How can I generate an executable Jar of module A using Spring Boot maven plugin

Hakob
  • 11
  • 1
  • Just a note: [`compile` is the default](https://maven.apache.org/pom.html#Dependencies). You don't have to declare it explicitely. – Gerold Broser Jan 10 '21 at 21:40

1 Answers1

0

If you are using IntelliJ (which is what I think you are using), then your pom.xml should be contained inside your module, and then you can build it as usual.

In IntelliJ you have two possible options to generate an executable .jar with maven, already shown in this question

tgdavies
  • 10,307
  • 4
  • 35
  • 40
DeVeenix
  • 1
  • 4
  • Consider also summarising the main points from the hyperlink you post, as there are chances the link may go dead in the future. – Ayush Jan 10 '21 at 05:16