0

For example

Undertow(Spring boot - using Undertow container)

Jetty(Spring boot - using Jetty container)

        <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jetty</artifactId>
    </dependency>

I wanted to restrict a programmer to use undertow or jetty dependency in their code.

Sanket Gupta
  • 75
  • 1
  • 9
  • 1
    You could use the `enforcer-plugin`, for instance to ban some dependencies, see here: https://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html – Tome Jul 18 '15 at 07:40
  • What od you mean by "restrict to use"? Disallow using equivalent alternatives? Enforce that the dependency's class is used at least once in the project? Require that is't specified explicitly in pom.xml? – kryger Jul 18 '15 at 09:17
  • Thanks Tome.. enforcer-plugin works for me. – Sanket Gupta Jul 29 '15 at 16:08

0 Answers0