Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for _removeElement (1.86 sec)

  1. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/DomUtils.java

        /**
         * Removes an element from its parent.
         *
         * @param element the element to remove
         *
         */
        public static void removeElement(Element element) {
            Editor editor = new Editor(element.document());
            editor.removeElement(element);
        }
    
        /**
         * Convenience method to add GAV (groupId, artifactId, version) elements to a parent.
         *
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  2. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategy.java

            Element subprojectsElement = root.child(SUBPROJECTS).orElse(null);
            if (subprojectsElement != null) {
                if (isSubprojectsListRedundant(subprojectsElement, pomPath)) {
                    DomUtils.removeElement(subprojectsElement);
                    context.detail("Removed: redundant subprojects list (matches direct children)");
                    hasChanges = true;
                }
            }
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 27.6K bytes
    - Viewed (0)
  3. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java

                        }
                    })
                    .toList();
    
            // Remove duplicates while preserving formatting
            duplicates.forEach(DomUtils::removeElement);
    
            return !duplicates.isEmpty();
        }
    
        private String createDependencyKey(Element dependency) {
            String groupId = dependency.childText(MavenPomElements.Elements.GROUP_ID);
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 22.2K bytes
    - Viewed (0)
  4. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/DomUtilsTest.java

            Document doc = Document.of(pomXml);
            Element root = doc.root();
            Element nameElement = DomUtils.findChildElement(root, "name");
    
            // Test removing existing element
            DomUtils.removeElement(nameElement);
    
            String xmlOutput = DomUtils.toXml(doc);
            assertFalse(xmlOutput.contains("<name>Test Project</name>"), "Should not contain removed name element");
            assertTrue(
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 31.3K bytes
    - Viewed (0)
Back to top