claudius108 / kuberam-expath-plugin

4 stars 4 forks source link

Allow multiple java modules in exist.xml #7

Closed dizzzz closed 6 years ago

dizzzz commented 6 years ago

See https://github.com/eXist-db/exist-apps-archetype/issues/4

according to 'the spec' the following is allowed in exist.xml but is not (yet) supported by the plugin:

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://exist-db.org/ns/expath-pkg">
    <jar>exist-mongrel-@VERSION@.jar</jar>
    <jar>mongodb-driver-3.4.2.jar</jar>
    <jar>mongodb-driver-core-3.4.2.jar</jar>
    <jar>bson-3.4.2.jar</jar>
    <java>
        <namespace>http://expath.org/ns/mongo</namespace>
        <class>org.exist.mongodb.xquery.MongodbModule</class>
    </java>
    <java>
        <namespace>http://expath.org/ns/mongo/gridfs</namespace>
        <class>org.exist.mongodb.xquery.GridfsModule</class>
    </java>
</package>
claudius108 commented 6 years ago

@Fixed in version 0.5.3, which I am now trying to release.

The syntax is as follows:

<package>
        ...
    <components>
        <resource>
            <public-uri>http://expath.org/ns/mongo</public-uri>
            <file>org.exist.mongodb.xquery.MongodbModule</file>
        </resource>
        <resource>
            <public-uri>http://expath.org/ns/mongo/gridfs</public-uri>
            <file>org.exist.mongodb.xquery.GridfsModule</file>
        </resource>
    </components>
</package>
dizzzz commented 6 years ago

looks good and usable to me!

<package> 
    ... 
    <components>
        <resource>
            <public-uri>http://expath.org/ns/mongo</public-uri>
            <file>org.exist.mongodb.xquery.MongodbModule</file>
        </resource>
        <resource>
            <public-uri>http://expath.org/ns/mongo/gridfs</public-uri>
            <file>org.exist.mongodb.xquery.GridfsModule</file>
        </resource>
    </components>
</package>
claudius108 commented 6 years ago

Hm, how?

dizzzz commented 6 years ago

I meant: I see the way of defining multiple sets (uri-file) .... Maybe it is better to call it a bit different like

        <resource>
            <module-namespace>http://expath.org/ns/mongo</public-uri>
            <java-class>org.exist.mongodb.xquery.MongodbModule</file>
        </resource>

?

claudius108 commented 6 years ago

No, how did you wrote indented XML?

The above syntax I mentioned is EXPath Package-like. I will change the other syntaxes, too, in the future, to be EXPath Package-like.

dizzzz commented 6 years ago

ahhhhh, ok. allow_multiple_java_modules_in_exist_xml_ _issue__7_ _claudius108_kuberam-expath-plugin

works for: java, xml,xquery,....

claudius108 commented 6 years ago

Great, thanks.

So, I just released version 0.5.4, which should fix this.

dizzzz commented 6 years ago

fyi..... below the the text box is a manual I see right now: https://guides.github.com/features/mastering-markdown/

claudius108 commented 6 years ago

Thanks a lot.