jira-importer commented on issue #259: URL: https://github.com/apache/maven-war-plugin/issues/259#issuecomment-2967856549
**[Guillaume Boué](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=gboue)** commented It would be possible to check for the presence of [`javax.servlet.annotation.WebServlet`](http://docs.oracle.com/javaee/7/api/javax/servlet/annotation/WebServlet.html). This annotation was introduced in the Servlet 3.0 API and replaces the `<servlet>` declaration in the `web.xml`. So if that class isn't in the compile classpath of the `MavenProject` being built, a `web.xml` should be present. How about the possible solution? Call `mavenProject.getCompileClasspathElements()`, create a new `URLClassLoader` for the paths of that list and use this classloader to determine if that class can be loaded. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org