code: private Element getMavenPluginElement() {
          try {
              final Element pluginsRoot = document.getRootElement().element("build").element("plugins");
              for (final Element element : pluginsRoot.elements()) {
                  final String groupId = XMLUtils.getChildValue("groupId", element);
                  final String artifactId = XMLUtils.getChildValue("artifactId", element);
                  if (PLUGIN_GROUPID.equals(groupId) && PLUGIN_ARTIFACTID.equals(artifactId)) {
                      return element;
                  }
              }
          } catch (NullPointerException e) {
              return null;
          }
          return null;
      }
docs: get webapp maven plugin node from pom