You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2021/07/23 14:56:37 UTC

[myfaces-tobago] branch TOBAGO-1999_Select2 updated: chore: Update jdom

This is an automated email from the ASF dual-hosted git repository.

weber pushed a commit to branch TOBAGO-1999_Select2
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/TOBAGO-1999_Select2 by this push:
     new be11194  chore: Update jdom
be11194 is described below

commit be11194fd3d67c9e494bd418b55f64f56767d48a
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Wed Jun 23 16:38:05 2021 +0200

    chore: Update jdom
---
 tobago-tool/tobago-tool-apt/pom.xml                |  29 +---
 .../tobago/apt/processor/FacesConfigGenerator.java | 182 ++++++++++-----------
 2 files changed, 94 insertions(+), 117 deletions(-)

diff --git a/tobago-tool/tobago-tool-apt/pom.xml b/tobago-tool/tobago-tool-apt/pom.xml
index 2827ed7..50c6cb8 100644
--- a/tobago-tool/tobago-tool-apt/pom.xml
+++ b/tobago-tool/tobago-tool-apt/pom.xml
@@ -94,32 +94,9 @@
       <version>3.0</version>
     </dependency>
     <dependency>
-      <groupId>jdom</groupId>
-      <artifactId>jdom</artifactId>
-      <version>1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>jaxen</groupId>
-      <artifactId>jaxen</artifactId>
-      <version>1.1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>dom4j</groupId>
-          <artifactId>dom4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xmlParserAPIs</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xercesImpl</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xom</groupId>
-          <artifactId>xom</artifactId>
-        </exclusion>
-      </exclusions>
+      <groupId>org.jdom</groupId>
+      <artifactId>jdom2</artifactId>
+      <version>2.0.6</version>
     </dependency>
   </dependencies>
 
diff --git a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/FacesConfigGenerator.java b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/FacesConfigGenerator.java
index 13e0a1d..033da60 100644
--- a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/FacesConfigGenerator.java
+++ b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/FacesConfigGenerator.java
@@ -28,14 +28,14 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.Validator;
 import org.apache.myfaces.tobago.apt.generate.ComponentInfo;
 import org.codehaus.plexus.util.FileUtils;
-import org.jdom.Attribute;
-import org.jdom.Comment;
-import org.jdom.Document;
-import org.jdom.Namespace;
-import org.jdom.filter.ContentFilter;
-import org.jdom.input.SAXBuilder;
-import org.jdom.output.Format;
-import org.jdom.output.XMLOutputter;
+import org.jdom2.Attribute;
+import org.jdom2.Comment;
+import org.jdom2.Document;
+import org.jdom2.Namespace;
+import org.jdom2.filter.ContentFilter;
+import org.jdom2.input.SAXBuilder;
+import org.jdom2.output.Format;
+import org.jdom2.output.XMLOutputter;
 
 import javax.annotation.processing.SupportedAnnotationTypes;
 import javax.annotation.processing.SupportedOptions;
@@ -156,7 +156,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
 
       // rewrite DOM as a string to find differences, since text outside the root element is not tracked
 
-      final org.jdom.Element rootElement = document.getRootElement();
+      final org.jdom2.Element rootElement = document.getRootElement();
 
       rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
       final Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
@@ -167,12 +167,12 @@ public class FacesConfigGenerator extends AbstractGenerator {
 
       final Namespace namespace = rootElement.getNamespace();
       applyNamespace(rootElement, namespace);
-      final List<org.jdom.Element> components = rootElement.getChildren(COMPONENT, namespace);
+      final List<org.jdom2.Element> components = rootElement.getChildren(COMPONENT, namespace);
 
-      final List<org.jdom.Element> newComponents = new ArrayList<org.jdom.Element>();
-      final List<org.jdom.Element> newRenderer = new ArrayList<org.jdom.Element>();
-      final List<org.jdom.Element> newConverters = new ArrayList<org.jdom.Element>();
-      final List<org.jdom.Element> newValidators = new ArrayList<org.jdom.Element>();
+      final List<org.jdom2.Element> newComponents = new ArrayList<org.jdom2.Element>();
+      final List<org.jdom2.Element> newRenderer = new ArrayList<org.jdom2.Element>();
+      final List<org.jdom2.Element> newConverters = new ArrayList<org.jdom2.Element>();
+      final List<org.jdom2.Element> newValidators = new ArrayList<org.jdom2.Element>();
 
       for (final TypeElement element : getTypes()) {
         if (element.getAnnotation(UIComponentTag.class) != null) {
@@ -184,9 +184,9 @@ public class FacesConfigGenerator extends AbstractGenerator {
         }
       }
 
-      final List<org.jdom.Element> elementsToAdd = new ArrayList<org.jdom.Element>();
+      final List<org.jdom2.Element> elementsToAdd = new ArrayList<org.jdom2.Element>();
       // sort out duplicates
-      for (final org.jdom.Element newElement : newComponents) {
+      for (final org.jdom2.Element newElement : newComponents) {
         final boolean found = containsElement(components, newElement);
         if (!found) {
           elementsToAdd.add(newElement);
@@ -198,11 +198,11 @@ public class FacesConfigGenerator extends AbstractGenerator {
         rootElement.addContent(lastIndex, elementsToAdd);
       }
       if (!newRenderer.isEmpty()) {
-        final org.jdom.Element renderKit = new org.jdom.Element(RENDER_KIT, namespace);
-        final org.jdom.Element renderKitId = new org.jdom.Element(RENDER_KIT_ID, namespace);
+        final org.jdom2.Element renderKit = new org.jdom2.Element(RENDER_KIT, namespace);
+        final org.jdom2.Element renderKitId = new org.jdom2.Element(RENDER_KIT_ID, namespace);
         renderKitId.setText("tobago");
         renderKit.addContent(renderKitId);
-        final org.jdom.Element renderKitClass = new org.jdom.Element(RENDER_KIT_CLASS, namespace);
+        final org.jdom2.Element renderKitClass = new org.jdom2.Element(RENDER_KIT_CLASS, namespace);
         renderKitClass.setText("org.apache.myfaces.tobago.renderkit.TobagoRenderKit");
         renderKit.addContent(renderKitClass);
         renderKit.addContent(newRenderer);
@@ -233,59 +233,59 @@ public class FacesConfigGenerator extends AbstractGenerator {
     }
   }
 
-  private void applyNamespace(final org.jdom.Element parent, final Namespace namespace) {
-    for (final org.jdom.Element element : (List<org.jdom.Element>) parent.getChildren()) {
+  private void applyNamespace(final org.jdom2.Element parent, final Namespace namespace) {
+    for (final org.jdom2.Element element : (List<org.jdom2.Element>) parent.getChildren()) {
       element.setNamespace(namespace);
       applyNamespace(element, namespace);
     }
   }
 
   private void addConverter(
-      final TypeElement typeElement, final List<org.jdom.Element> newConverters, final Namespace namespace) {
+      final TypeElement typeElement, final List<org.jdom2.Element> newConverters, final Namespace namespace) {
     final Converter converterAnn = typeElement.getAnnotation(Converter.class);
-    final org.jdom.Element converter = new org.jdom.Element(CONVERTER, namespace);
+    final org.jdom2.Element converter = new org.jdom2.Element(CONVERTER, namespace);
     if (converterAnn.id().length() > 0) {
-      final org.jdom.Element converterId = new org.jdom.Element(CONVERTER_ID, namespace);
+      final org.jdom2.Element converterId = new org.jdom2.Element(CONVERTER_ID, namespace);
       converterId.setText(converterAnn.id());
       converter.addContent(converterId);
     } else if (converterAnn.forClass().length() > 0) {
-      final org.jdom.Element converterForClass = new org.jdom.Element(CONVERTER_FOR_CLASS, namespace);
+      final org.jdom2.Element converterForClass = new org.jdom2.Element(CONVERTER_FOR_CLASS, namespace);
       converterForClass.setText(converterAnn.forClass());
       converter.addContent(converterForClass);
     }
 
-    final org.jdom.Element converterClass = new org.jdom.Element(CONVERTER_CLASS, namespace);
+    final org.jdom2.Element converterClass = new org.jdom2.Element(CONVERTER_CLASS, namespace);
     converterClass.setText(typeElement.getQualifiedName().toString());
     converter.addContent(converterClass);
     newConverters.add(converter);
   }
 
   private void addValidator(
-      final TypeElement typeElement, final List<org.jdom.Element> newValidators, final Namespace namespace) {
+      final TypeElement typeElement, final List<org.jdom2.Element> newValidators, final Namespace namespace) {
     final Validator validatorAnn = typeElement.getAnnotation(Validator.class);
-    final org.jdom.Element validator = new org.jdom.Element(VALIDATOR, namespace);
+    final org.jdom2.Element validator = new org.jdom2.Element(VALIDATOR, namespace);
     if (validatorAnn.id().length() > 0) {
-      final org.jdom.Element validatorId = new org.jdom.Element(VALIDATOR_ID, namespace);
+      final org.jdom2.Element validatorId = new org.jdom2.Element(VALIDATOR_ID, namespace);
       validatorId.setText(validatorAnn.id());
       validator.addContent(validatorId);
     } else if (validatorAnn.forClass().length() > 0) {
-      final org.jdom.Element validatorForClass = new org.jdom.Element(VALIDATOR_FOR_CLASS, namespace);
+      final org.jdom2.Element validatorForClass = new org.jdom2.Element(VALIDATOR_FOR_CLASS, namespace);
       validatorForClass.setText(validatorAnn.forClass());
       validator.addContent(validatorForClass);
     }
 
-    final org.jdom.Element validatorClass = new org.jdom.Element(VALIDATOR_CLASS, namespace);
+    final org.jdom2.Element validatorClass = new org.jdom2.Element(VALIDATOR_CLASS, namespace);
     validatorClass.setText(typeElement.getQualifiedName().toString());
     validator.addContent(validatorClass);
     newValidators.add(validator);
   }
 
-  private boolean containsElement(final List<org.jdom.Element> components, final org.jdom.Element newElement) {
+  private boolean containsElement(final List<org.jdom2.Element> components, final org.jdom2.Element newElement) {
     return getEqualElement(components, newElement) != null;
   }
 
-  private org.jdom.Element getEqualElement(final List<org.jdom.Element> components, final org.jdom.Element newElement) {
-    for (final org.jdom.Element element : components) {
+  private org.jdom2.Element getEqualElement(final List<org.jdom2.Element> components, final org.jdom2.Element newElement) {
+    for (final org.jdom2.Element element : components) {
       if (equals(element, newElement)) {
         return element;
       }
@@ -293,7 +293,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
     return null;
   }
 
-  private int getIndexAfter(final org.jdom.Element rootElement, final String... tagNames) {
+  private int getIndexAfter(final org.jdom2.Element rootElement, final String... tagNames) {
     for (final String tagName : tagNames) {
       final int index = getIndexAfter(rootElement, tagName);
       if (index != 0) {
@@ -303,15 +303,15 @@ public class FacesConfigGenerator extends AbstractGenerator {
     return 0;
   }
 
-  private int getIndexAfter(final org.jdom.Element rootElement, final String tagName) {
-    final List<org.jdom.Element> components = rootElement.getChildren(tagName, rootElement.getNamespace());
+  private int getIndexAfter(final org.jdom2.Element rootElement, final String tagName) {
+    final List<org.jdom2.Element> components = rootElement.getChildren(tagName, rootElement.getNamespace());
     if (!components.isEmpty()) {
       return rootElement.indexOf(components.get(components.size() - 1)) + 1;
     }
     return 0;
   }
 
-  public boolean equals(final org.jdom.Element element1, final org.jdom.Element element2) {
+  public boolean equals(final org.jdom2.Element element1, final org.jdom2.Element element2) {
     final Namespace namespace = element1.getNamespace();
     if (element1.getName().equals(element2.getName()) && element1.getNamespace().equals(element2.getNamespace())) {
       if (element1.getChildText(COMPONENT_CLASS, namespace).equals(element2.getChildText(COMPONENT_CLASS, namespace))) {
@@ -323,17 +323,17 @@ public class FacesConfigGenerator extends AbstractGenerator {
     return false;
   }
 
-  protected org.jdom.Element createComponentElement(
+  protected org.jdom2.Element createComponentElement(
       final ComponentInfo componentInfo, final UIComponentTag componentTag, final Namespace namespace)
       throws IOException, NoSuchFieldException, IllegalAccessException {
-    final org.jdom.Element element = new org.jdom.Element(COMPONENT, namespace);
-    final org.jdom.Element elementDisplayName = new org.jdom.Element(DISPLAY_NAME, namespace);
+    final org.jdom2.Element element = new org.jdom2.Element(COMPONENT, namespace);
+    final org.jdom2.Element elementDisplayName = new org.jdom2.Element(DISPLAY_NAME, namespace);
     elementDisplayName.setText(componentInfo.getComponentClassName());
     element.addContent(elementDisplayName);
-    final org.jdom.Element elementType = new org.jdom.Element(COMPONENT_TYPE, namespace);
+    final org.jdom2.Element elementType = new org.jdom2.Element(COMPONENT_TYPE, namespace);
     elementType.setText(componentInfo.getComponentType());
     element.addContent(elementType);
-    final org.jdom.Element elementClass = new org.jdom.Element(COMPONENT_CLASS, namespace);
+    final org.jdom2.Element elementClass = new org.jdom2.Element(COMPONENT_CLASS, namespace);
     elementClass.setText(componentTag.uiComponent());
     element.addContent(elementClass);
 
@@ -341,26 +341,26 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
   protected void addRendererElement(
-      final ComponentInfo componentInfo, final UIComponentTag componentTag, final List<org.jdom.Element> renderer,
+      final ComponentInfo componentInfo, final UIComponentTag componentTag, final List<org.jdom2.Element> renderer,
       final Namespace namespace)
       throws IOException, NoSuchFieldException, IllegalAccessException {
     final String rendererType = componentTag.rendererType();
     if (rendererType != null && rendererType.length() > 0) {
-      final org.jdom.Element element = new org.jdom.Element(RENDERER, namespace);
+      final org.jdom2.Element element = new org.jdom2.Element(RENDERER, namespace);
       String displayName = componentTag.displayName();
       if (displayName.equals("")) {
         displayName = componentInfo.getComponentClassName();
       }
-      final org.jdom.Element elementDisplayName = new org.jdom.Element(DISPLAY_NAME, namespace);
+      final org.jdom2.Element elementDisplayName = new org.jdom2.Element(DISPLAY_NAME, namespace);
       elementDisplayName.setText(displayName);
       element.addContent(elementDisplayName);
-      final org.jdom.Element elementComponentFamily = new org.jdom.Element(COMPONENT_FAMILY, namespace);
+      final org.jdom2.Element elementComponentFamily = new org.jdom2.Element(COMPONENT_FAMILY, namespace);
       elementComponentFamily.addContent(componentInfo.getComponentFamily());
       element.addContent(elementComponentFamily);
-      final org.jdom.Element elementType = new org.jdom.Element(RENDERER_TYPE, namespace);
+      final org.jdom2.Element elementType = new org.jdom2.Element(RENDERER_TYPE, namespace);
       elementType.setText(rendererType);
       element.addContent(elementType);
-      final org.jdom.Element elementClass = new org.jdom.Element(RENDERER_CLASS, namespace);
+      final org.jdom2.Element elementClass = new org.jdom2.Element(RENDERER_CLASS, namespace);
       final String className = "org.apache.myfaces.tobago.renderkit." + rendererType + "Renderer";
       elementClass.setText(className);
       element.addContent(elementClass);
@@ -369,11 +369,11 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
 
-  private org.jdom.Element createElementExtension(
+  private org.jdom2.Element createElementExtension(
       final TypeElement typeElement, final UIComponentTag uiComponentTag,
       final Namespace namespace) {
-    final org.jdom.Element elementExtension = new org.jdom.Element(COMPONENT_EXTENSION, namespace);
-    final org.jdom.Element elementAllowedChildComponents = new org.jdom.Element(ALLOWED_CHILD_COMPONENTS, namespace);
+    final org.jdom2.Element elementExtension = new org.jdom2.Element(COMPONENT_EXTENSION, namespace);
+    final org.jdom2.Element elementAllowedChildComponents = new org.jdom2.Element(ALLOWED_CHILD_COMPONENTS, namespace);
     final String[] allowedChildComponents = uiComponentTag.allowedChildComponenents();
     String allowedComponentTypes = "";
     for (final String componentType : allowedChildComponents) {
@@ -381,16 +381,16 @@ public class FacesConfigGenerator extends AbstractGenerator {
     }
     elementAllowedChildComponents.setText(allowedComponentTypes);
     elementExtension.addContent(elementAllowedChildComponents);
-    final org.jdom.Element elementCategory = new org.jdom.Element(CATEGORY, namespace);
+    final org.jdom2.Element elementCategory = new org.jdom2.Element(CATEGORY, namespace);
     elementCategory.setText(uiComponentTag.category().toString());
     elementExtension.addContent(elementCategory);
     final Deprecated deprecated = typeElement.getAnnotation(Deprecated.class);
     if (deprecated != null) {
-      final org.jdom.Element elementDeprecated = new org.jdom.Element(DEPRECATED, namespace);
+      final org.jdom2.Element elementDeprecated = new org.jdom2.Element(DEPRECATED, namespace);
       elementDeprecated.setText("Warning: This component is deprecated!");
       elementExtension.addContent(elementDeprecated);
     }
-    final org.jdom.Element elementHidden = new org.jdom.Element(HIDDEN, namespace);
+    final org.jdom2.Element elementHidden = new org.jdom2.Element(HIDDEN, namespace);
     elementHidden.setText(Boolean.toString(uiComponentTag.isHidden()));
     elementExtension.addContent(elementHidden);
 
@@ -398,8 +398,8 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
   protected void addAttribute(
-      final ExecutableElement executableElement, final List<org.jdom.Element> attributes,
-      final List<org.jdom.Element> properties,
+      final ExecutableElement executableElement, final List<org.jdom2.Element> attributes,
+      final List<org.jdom2.Element> properties,
       final Namespace namespace) {
     final UIComponentTagAttribute componentAttribute = executableElement.getAnnotation(UIComponentTagAttribute.class);
     if (componentAttribute != null) {
@@ -407,9 +407,9 @@ public class FacesConfigGenerator extends AbstractGenerator {
       if (simpleName.startsWith("set")) {
         final String name = simpleName.substring(3, 4).toLowerCase(Locale.ENGLISH) + simpleName.substring(4);
         if (IGNORED_PROPERTIES.contains(name)) {
-          final org.jdom.Element attribute = new org.jdom.Element(ATTRIBUTE, namespace);
-          final org.jdom.Element attributeName = new org.jdom.Element(ATTRIBUTE_NAME, namespace);
-          final org.jdom.Element attributeClass = new org.jdom.Element(ATTRIBUTE_CLASS, namespace);
+          final org.jdom2.Element attribute = new org.jdom2.Element(ATTRIBUTE, namespace);
+          final org.jdom2.Element attributeName = new org.jdom2.Element(ATTRIBUTE_NAME, namespace);
+          final org.jdom2.Element attributeClass = new org.jdom2.Element(ATTRIBUTE_CLASS, namespace);
 
           attributeName.setText(name);
           addClass(componentAttribute, attributeClass);
@@ -419,7 +419,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
           attribute.addContent(attributeName);
           attribute.addContent(attributeClass);
           if (componentAttribute.defaultValue().length() > 0) {
-            final org.jdom.Element defaultValue = new org.jdom.Element(DEFAULT_VALUE, namespace);
+            final org.jdom2.Element defaultValue = new org.jdom2.Element(DEFAULT_VALUE, namespace);
             defaultValue.setText(componentAttribute.defaultValue());
             attribute.addContent(defaultValue);
           }
@@ -429,9 +429,9 @@ public class FacesConfigGenerator extends AbstractGenerator {
 
           attributes.add(attribute);
         } else {
-          final org.jdom.Element property = new org.jdom.Element(PROPERTY, namespace);
-          final org.jdom.Element propertyName = new org.jdom.Element(PROPERTY_NAME, namespace);
-          final org.jdom.Element propertyClass = new org.jdom.Element(PROPERTY_CLASS, namespace);
+          final org.jdom2.Element property = new org.jdom2.Element(PROPERTY, namespace);
+          final org.jdom2.Element propertyName = new org.jdom2.Element(PROPERTY_NAME, namespace);
+          final org.jdom2.Element propertyClass = new org.jdom2.Element(PROPERTY_CLASS, namespace);
 
           propertyName.setText(name);
           addClass(componentAttribute, propertyClass);
@@ -441,7 +441,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
           property.addContent(propertyName);
           property.addContent(propertyClass);
           if (componentAttribute.defaultValue().length() > 0) {
-            final org.jdom.Element defaultValue = new org.jdom.Element(DEFAULT_VALUE, namespace);
+            final org.jdom2.Element defaultValue = new org.jdom2.Element(DEFAULT_VALUE, namespace);
             defaultValue.setText(componentAttribute.defaultValue());
             property.addContent(defaultValue);
           }
@@ -456,7 +456,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
     }
   }
 
-  private void addClass(final UIComponentTagAttribute componentAttribute, final org.jdom.Element attributeClass) {
+  private void addClass(final UIComponentTagAttribute componentAttribute, final org.jdom2.Element attributeClass) {
     if (componentAttribute.type().length > 1) {
       attributeClass.setText(Object.class.getName());
     } else if (componentAttribute.type().length == 1) {
@@ -473,7 +473,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
   private void addDescription(
-      final ExecutableElement element, final org.jdom.Element attribute, final Namespace namespace) {
+      final ExecutableElement element, final org.jdom2.Element attribute, final Namespace namespace) {
     String comment = processingEnv.getElementUtils().getDocComment(element);
     if (comment != null) {
       final int index = comment.indexOf('@');
@@ -482,25 +482,25 @@ public class FacesConfigGenerator extends AbstractGenerator {
       }
       comment = comment.trim();
       if (comment.length() > 0) {
-        final org.jdom.Element description = new org.jdom.Element(DESCRIPTION, namespace);
+        final org.jdom2.Element description = new org.jdom2.Element(DESCRIPTION, namespace);
         description.setText(comment);
         attribute.addContent(description);
       }
     }
   }
 
-  private org.jdom.Element createPropertyOrAttributeExtension(
+  private org.jdom2.Element createPropertyOrAttributeExtension(
       final String extensionType, final ExecutableElement executableElement,
       final UIComponentTagAttribute uiComponentTagAttribute,
       final Namespace namespace)
       throws IllegalArgumentException {
-    final org.jdom.Element extensionElement = new org.jdom.Element(extensionType, namespace);
-    final org.jdom.Element valueExpression = new org.jdom.Element(VALUE_EXPRESSION, namespace);
+    final org.jdom2.Element extensionElement = new org.jdom2.Element(extensionType, namespace);
+    final org.jdom2.Element valueExpression = new org.jdom2.Element(VALUE_EXPRESSION, namespace);
     valueExpression.setText(uiComponentTagAttribute.expression().toMetaDataString());
     extensionElement.addContent(valueExpression);
     final String[] allowedValues = uiComponentTagAttribute.allowedValues();
     if (allowedValues.length > 0) {
-      final org.jdom.Element propertyValues = new org.jdom.Element(PROPERTY_VALUES, namespace);
+      final org.jdom2.Element propertyValues = new org.jdom2.Element(PROPERTY_VALUES, namespace);
       String values = "";
       for (final String value : allowedValues) {
         values += value + " ";
@@ -510,19 +510,19 @@ public class FacesConfigGenerator extends AbstractGenerator {
     }
     final Deprecated deprecated = executableElement.getAnnotation(Deprecated.class);
     if (deprecated != null) {
-      final org.jdom.Element elementDeprecated = new org.jdom.Element(DEPRECATED, namespace);
+      final org.jdom2.Element elementDeprecated = new org.jdom2.Element(DEPRECATED, namespace);
       elementDeprecated.setText("Warning: This property is deprecated!");
       extensionElement.addContent(elementDeprecated);
     }
-    final org.jdom.Element hidden = new org.jdom.Element(HIDDEN, namespace);
+    final org.jdom2.Element hidden = new org.jdom2.Element(HIDDEN, namespace);
     hidden.setText(Boolean.toString(uiComponentTagAttribute.isHidden()));
     extensionElement.addContent(hidden);
-    final org.jdom.Element readOnly = new org.jdom.Element(READONLY, namespace);
+    final org.jdom2.Element readOnly = new org.jdom2.Element(READONLY, namespace);
     readOnly.setText(Boolean.toString(uiComponentTagAttribute.isReadOnly()));
     extensionElement.addContent(readOnly);
     final TagAttribute tagAttribute = executableElement.getAnnotation(TagAttribute.class);
     if (tagAttribute != null) {
-      final org.jdom.Element required = new org.jdom.Element(REQUIRED, namespace);
+      final org.jdom2.Element required = new org.jdom2.Element(REQUIRED, namespace);
       required.setText(Boolean.toString(tagAttribute.required()));
       extensionElement.addContent(required);
     }
@@ -531,7 +531,7 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
   protected void addAttributes(
-      final TypeElement typeElement, final List<org.jdom.Element> attributes, final List<org.jdom.Element> properties,
+      final TypeElement typeElement, final List<org.jdom2.Element> attributes, final List<org.jdom2.Element> properties,
       final Namespace namespace) {
 
     for (final javax.lang.model.element.Element element : processingEnv.getElementUtils().getAllMembers(typeElement)) {
@@ -545,21 +545,21 @@ public class FacesConfigGenerator extends AbstractGenerator {
     }
   }
 
-  private void addFacets(final UIComponentTag componentTag, final Namespace namespace, final org.jdom.Element element) {
+  private void addFacets(final UIComponentTag componentTag, final Namespace namespace, final org.jdom2.Element element) {
     final Facet[] facets = componentTag.facets();
     for (final Facet facet : facets) {
-      final org.jdom.Element facetElement = new org.jdom.Element(FACET, namespace);
+      final org.jdom2.Element facetElement = new org.jdom2.Element(FACET, namespace);
       final String description = facet.description();
       if (description != null && description.length() > 0) {
-        final org.jdom.Element facetDescription = new org.jdom.Element(DESCRIPTION, namespace);
+        final org.jdom2.Element facetDescription = new org.jdom2.Element(DESCRIPTION, namespace);
         facetDescription.setText(description);
         facetElement.addContent(facetDescription);
       }
-      final org.jdom.Element facetName = new org.jdom.Element(FACET_NAME, namespace);
+      final org.jdom2.Element facetName = new org.jdom2.Element(FACET_NAME, namespace);
       facetName.setText(facet.name());
       facetElement.addContent(facetName);
-      final org.jdom.Element facetExtension = new org.jdom.Element(FACET_EXTENSION, namespace);
-      final org.jdom.Element elementAllowedChildComponents = new org.jdom.Element(ALLOWED_CHILD_COMPONENTS, namespace);
+      final org.jdom2.Element facetExtension = new org.jdom2.Element(FACET_EXTENSION, namespace);
+      final org.jdom2.Element elementAllowedChildComponents = new org.jdom2.Element(ALLOWED_CHILD_COMPONENTS, namespace);
       final String[] allowedChildComponents = facet.allowedChildComponenents();
       String allowedComponentTypes = "";
       for (final String componentType : allowedChildComponents) {
@@ -573,22 +573,22 @@ public class FacesConfigGenerator extends AbstractGenerator {
   }
 
   protected void addElement(
-      final TypeElement typeElement, final List<org.jdom.Element> components, final List<org.jdom.Element> renderer,
+      final TypeElement typeElement, final List<org.jdom2.Element> components, final List<org.jdom2.Element> renderer,
       final Namespace namespace) throws Exception {
     final UIComponentTag componentTag = typeElement.getAnnotation(UIComponentTag.class);
     if (componentTag != null) {
       final ComponentInfo componentInfo = new ComponentInfo(typeElement, componentTag);
       if (!componentTag.isComponentAlreadyDefined()) {
-        final org.jdom.Element element = createComponentElement(componentInfo, componentTag, namespace);
+        final org.jdom2.Element element = createComponentElement(componentInfo, componentTag, namespace);
         if (element != null) {
           if (!containsElement(components, element)) {
             addFacets(componentTag, namespace, element);
-            final List<org.jdom.Element> attributes = new ArrayList<org.jdom.Element>();
-            final List<org.jdom.Element> properties = new ArrayList<org.jdom.Element>();
+            final List<org.jdom2.Element> attributes = new ArrayList<org.jdom2.Element>();
+            final List<org.jdom2.Element> properties = new ArrayList<org.jdom2.Element>();
             addAttributes(typeElement, attributes, properties, namespace);
             if (!attributes.isEmpty()) {
-              Collections.sort(attributes, new Comparator<org.jdom.Element>() {
-                public int compare(final org.jdom.Element d1, final org.jdom.Element d2) {
+              Collections.sort(attributes, new Comparator<org.jdom2.Element>() {
+                public int compare(final org.jdom2.Element d1, final org.jdom2.Element d2) {
                   return d1.getChildText(ATTRIBUTE_NAME, namespace).compareTo(
                       d2.getChildText(ATTRIBUTE_NAME, namespace));
                 }
@@ -596,8 +596,8 @@ public class FacesConfigGenerator extends AbstractGenerator {
               element.addContent(attributes);
             }
             if (!properties.isEmpty()) {
-              Collections.sort(properties, new Comparator<org.jdom.Element>() {
-                public int compare(final org.jdom.Element d1, final org.jdom.Element d2) {
+              Collections.sort(properties, new Comparator<org.jdom2.Element>() {
+                public int compare(final org.jdom2.Element d1, final org.jdom2.Element d2) {
                   return d1.getChildText(PROPERTY_NAME, namespace).compareTo(
                       d2.getChildText(PROPERTY_NAME, namespace));
                 }