Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for updateOrCreateChildElement (0.1 sec)

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

         * @param content the content to set
         * @return the updated or created element
         *
         */
        public static Element updateOrCreateChildElement(Element parent, String childName, String content) {
            PomEditor editor = new PomEditor(parent.document());
            return editor.updateOrCreateChildElement(parent, childName, content);
        }
    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/test/java/org/apache/maven/cling/invoker/mvnup/goals/DomUtilsTest.java

                </project>
                """;
    
            Document doc = Document.of(pomXml);
            Element root = doc.root();
    
            // Test updating existing element
            Element updatedName = DomUtils.updateOrCreateChildElement(root, "name", "New Name");
            assertNotNull(updatedName, "Should return updated element");
    
            String xmlOutput = DomUtils.toXml(doc);
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 31.3K bytes
    - Viewed (0)
  3. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java

                    if (!correctRelativePathStr.equals(currentRelativePath)) {
                        // Update or create relativePath element using DomUtils convenience method
                        DomUtils.updateOrCreateChildElement(parentElement, RELATIVE_PATH, correctRelativePathStr);
                        context.detail("Fixed: " + "relativePath corrected from '" + currentRelativePath + "' to '"
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 22.2K bytes
    - Viewed (0)
Back to top