Skip to content

IVY-1658: merge ivy-module namespaces#111

Open
eric-milles wants to merge 1 commit intoapache:masterfrom
eric-milles:IVY-1658
Open

IVY-1658: merge ivy-module namespaces#111
eric-milles wants to merge 1 commit intoapache:masterfrom
eric-milles:IVY-1658

Conversation

@eric-milles
Copy link
Member

@eric-milles eric-milles marked this pull request as draft September 3, 2025 18:01
@eric-milles eric-milles marked this pull request as ready for review September 3, 2025 18:10
Copy link
Member

@bodewig bodewig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar enough with Ivy's code so I want request changes.

@eric-milles
Copy link
Member Author

So where are we with this one? This PR is about as minimal as a change can be made. The loop you mention was replaced by a new structure, so there is no way to avoid a diff on the old non-ivy-module loop. If any part of the issue or change is unclear, I can add to the issue ticket or tests to help improve clarity.

@bodewig
Copy link
Member

bodewig commented Feb 16, 2026

The conversation about not handling XML namespaces properly is not resolved at all IMHO.

@bodewig
Copy link
Member

bodewig commented Feb 16, 2026

    @Test
    public void testDeliver1658B() throws Exception {
        String ivyFile
            = "<ivy-module version='2.0'\n"
            + " xmlns:m='http://ant.apache.org/ivy/maven'\n"
            + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n"
            + " xsi:noNamespaceSchemaLocation='http://ant.apache.org/ivy/schemas/ivy.xsd'>\n"
            + "  <info module='xxx' organisation='zzz'/>\n"
            + "  <dependencies>\n"
            + "    <dependency name='groovy' org='org.codehaus.groovy' rev='3.0.25' transitive='false'>\n"
            + "      <artifact name='groovy' m:classifier='indy'/>\n"
            + "    </dependency>\n"
            + "  </dependencies>\n"
            + "</ivy-module>\n";

        ivyFile
            = "<ivy-module version='2.0'\n"
            + " xmlns:m='http://exmaple.org/some-m'\n"
            + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n"
            + " xsi:noNamespaceSchemaLocation='http://ant.apache.org/ivy/schemas/ivy.xsd'>\n"
            + "  <info module='yyy' organisation='zzz' revision='1.0'>\n"
            + "    <extends module='xxx' organisation='zzz' extendType='dependencies'\n"
            + "     location='" + writeFile(ivyFile).getName() + "' revision='latest'/>\n"
            + "  </info>\n"
            + "  <dependencies>\n"
            + "  </dependencies>\n"
            + "</ivy-module>\n";

        resolve(writeFile(ivyFile));

        ivyDeliver.doExecute();

        ivyFile = readFile(deliverDir.getAbsolutePath() + "/ivys/ivy-1.0.xml");

        assertTrue(ivyFile.contains(" version=\"2.0\""));
        assertTrue(ivyFile.contains(" xmlns:m=\"http://ant.apache.org/ivy/maven\""));
        assertTrue(ivyFile.contains(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""));
        assertTrue(ivyFile.contains(" xsi:noNamespaceSchemaLocation=\"http://ant.apache.org/ivy/schemas/ivy.xsd\""));
    }

this fails (because m already means something different).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants