Using third-party resources types which are available as jar files
[WAS: Re: [Yanel-dev] Re: Using contributed resources
Michael Wechner
michael.wechner at wyona.com
Sat Sep 18 22:23:01 CEST 2010
Balz Schreier wrote:
> Hi,
>
> I guess I've found the solution for what I want to do.
> In order to use a contributed resource which is available from the
> yanel trunk, I have added this line to my realm's resources-xml:
>
> <resource-type package="org.wyona.yanel.impl.resources.redirect"
> compile="false"/>
>
you do this in order to register resource types which are available as
jar files (e.g. via Maven
http://maven2.wyona.org/wyona-org-yanel/yanel-resource-example-world-time/)
whereas in order to actually get/download it one needs to declare it as
a dependency somewhere, e.g.
src/realms/welcome-admin/src/build/dependencies.xml
which will then be downloaded and deployed at, e.g.
local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/lib/yanel-resource-example-world-time-1.0-dev-r44371.jar
and in order to make it available one needs to register it somewhere, e.g.
src/realms/from-scratch-realm-template/resource-types.xml
which will then register it within Yanel
local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/classes/resource-types.xml
and then one can finally us it, e.g.
src/realms/from-scratch-realm-template/res-configs/time.html.yanel-rc
or rather
http://127.0.0.1:8080/yanel/from-scratch-realm/time.html
Cheers
Michael
> Now it seems to work fine.
> Is this the correct way how to use contributed resources from another
> realm?
>
> Thanks,
> Cheers
> Balz
>
>
> On Sat, Sep 18, 2010 at 11:13 AM, Balz Schreier
> <balz.schreier at gmail.com <mailto:balz.schreier at gmail.com>> wrote:
>
> Hi,
>
> I would like to reuse the redirect resource
> (/yanel/src/contributions/resources/redirect).
>
> According to the documentation:
> http://127.0.0.1:8080/yanel/yanel-website/en/documentation/configuration/resource-types_xml.html
> ,
> I have configured this line in my realm's resource-types.xml:
>
> <resource-type package="org.wyona.yanel.impl.resources.redirect" src="@YANEL_SRC_DIR@/src/contributions/resources/redirect/" compile="true"/>
>
>
>
> Somehow, the variable @YANEL_SRC_DIR@ does not get replaced during the build of YANEL.
>
>
> If I replace it with a fully qualified value to the yanel source dir, the resource gets compiled (by yanel's build.sh) and the redirect works fine.
>
>
>
>
> Any idea, why it does not get replaced?
>
>
>
> Cheers
> Balz
>
>
More information about the Yanel-development
mailing list