Domanda

Here is a dependency in pom.xml from Project B

<dependencies>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.12.2</version>
        <scope>provided</scope>
    </dependency>
       ...
     </dependencies>

I want to include Project B as a dependency of Project A. However I want to have lombok as a dependency of Project A with same scope (ie I want lombok to be on the compilation classpath of Project A only).

How can I do that ?

È stato utile?

Soluzione

Provided dependencies are not transitive. So you need to define that dependency in Project A as well.

Check the scope and dependency here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top