4

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?

Mihai8
  • 3,113
  • 1
  • 21
  • 31
  • similar comment https://stackoverflow.com/questions/50052838/getting-a-whole-lot-of-scanned-from-multiple-locations-warnings-in-simple-jers – user3071643 Jul 19 '18 at 20:16

2 Answers2

1

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>
1

If you want ignore the WARN log, you can append below code in start.ini file:

--exec
-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF