从多个位置扫描的Maven警告类型 [英] Maven scanned from multiple locations type of warnings

查看:445
本文介绍了从多个位置扫描的Maven警告类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Maven开发一个项目,该项目还涉及Jetty作为servlet容器.但是在构建时会出现类似从多个位置扫描"之类的警告,其中涉及.m2目录中的一个位置以及所创建的目标目录中的一个位置.我不确定它们是否是通过使用Jetty触发的.这些警告如何解决?

I'm trying to develop a project with Maven, which also involves Jetty as a servlet container. But in build time appear warnings like "scanned from multiple locations" which involves a location in the .m2 directory and a location in the target directory created. I'm not sure if they are triggered by using Jetty. How can these warnings be solved?

推荐答案

在POM中的标记附近更改设置useManifestOnlyJar to false:

Change the setting useManifestOnlyJar to false in the POM, around the tags:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.12.4</version>
        <configuration>
          <useManifestOnlyJar>false</useManifestOnlyJar>
          <useSystemClassLoader>false</useSystemClassLoader>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

这篇关于从多个位置扫描的Maven警告类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆