@Mojo(name="war",
defaultPhase=PACKAGE,
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class WarMojoextends AbstractWarMojo
Classifier to add to the generated WAR. If given, the artifact will be an attachment instead. The classifier will
not be applied to the JAR file of the project - only to the WAR file.
Whether this is the main artifact being built. Set to false if you don't want to install or deploy
it to the local repository instead of the default one in an execution.
Determines if the current Maven project being built uses the Servlet 3.0 API (JSR 315)
or Jakarta Servlet API.
If it does then the web.xml file can be omitted.
This is done by checking if the interface javax.servlet.annotation.WebServlet
or jakarta.servlet.annotation.WebServlet is in the compile-time
dependencies (which includes provided dependencies) of the Maven project.
Returns:
true if the project being built depends on Servlet 3.0 API or Jakarta Servlet API,
false otherwise
Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException - if the compile elements can't be resolved
MalformedURLException - if the path to a dependency file can't be transformed to a URL