Skip to content

Ant script fails during XSLT task when called from Eclipse #254

@kwin

Description

@kwin

When executing Ant from within Eclipse with target -antunit-fake-pom it fails with

-antunit-fake-pom:
     [xslt] Processing /Users/konradwindszus/git/policeman-tools/forbidden-apis/src/test/antunit/dummy.xml to /Users/konradwindszus/git/policeman-tools/forbidden-apis/build/test-maven/fake-pom.xml
     [xslt] Loading stylesheet pom-generator.xsl
     [xslt] : Error! Use of the extension function 'http://exslt.org/strings:split' is not allowed when the secure processing feature is set to true.
     [xslt] Failed to process /Users/konradwindszus/git/policeman-tools/forbidden-apis/src/test/antunit/dummy.xml

BUILD FAILED
/Users/konradwindszus/git/policeman-tools/forbidden-apis/build.xml:600: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension function 'http://exslt.org/strings:split' is not allowed when the secure processing feature is set to true.

Eclipse requires to explicitly parametrize the underlying factory with

<factory>
     <feature name="http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions" value="true"/>
</factory>

to make it work.
Further information in https://bugs.eclipse.org/bugs/show_bug.cgi?id=520437.

The workaround which kicks in during Ant CLI build does not work when called from Eclipse: https://bz.apache.org/bugzilla/show_bug.cgi?id=61389

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions