Search code examples
javaspring-bootmavenmaven-3

Maven Packaging


I have a spring boot app version 2.7.0 and java version 17.

I have made a shared dependency and push to local maven dependency jfrog.

Then I have included this dependency to my app

<dependency>
    <groupId>com.microservice</groupId>
    <artifactId>utils-starter</artifactId>
    <version>1.0.0</version>
</dependency>

Whenver I run mvn clean package I get

Package does not exits

It seems mvn does not see the package but IntelliJ Idea does.

But when I run with Intellij Idea, it runs well but mvn package fails

Can someone help?


Solution

  • Found problem.

    The package (utils-starter) I created had this plugin

    <plugin>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
    

    So removing it solved the problem