开发者

How to override jetty's javax.mail version?

开发者 https://www.devze.com 2023-03-19 01:20 出处:网络
In my pom.xml I have this excerpt to override lift\'s default mailer: <dependency> <groupId>javax.mail</groupId>

In my pom.xml I have this excerpt to override lift's default mailer:

<dependency>
  <groupId>javax.mail</groupId>
  <artifactId>mail</artifactId>
  <version>1.4.4</version>
</dependency>
<dependency>开发者_如何学编程
    <groupId>net.liftweb</groupId>
    <artifactId>lift-util_2.9.0-1</artifactId>
    <version>${lift.version}</version>
    <exclusions>
        <!--Using mail 1.4.4 instead-->
        <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Works fine, the dependency tree shows no sign of javax.mail 1.4.1. But I'm still getting javax.mailer of version 1.4.1 in my m2 repository, when I start it with mvn jetty:run. I suppose, jetty uses 1.4.1. How do I override it? Complete pom.xml is here.


Ok, I've found the solution. Needed to add required version of javax mail to the <dependencyManagement> section:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4.4</version>
    </dependency>
  </dependencies>
</dependencyManagement>
0

精彩评论

暂无评论...
验证码 换一张
取 消