[Yanel-dev] resource-type.xml and package

Michael Wechner michael.wechner at wyona.com
Mon Feb 25 16:53:24 CET 2008


simon litwan wrote:

> Michael Wechner schrieb:
>
>> Michael Wechner wrote:
>>
>>> simon litwan wrote:
>>>
>>>> hi all
>>>>
>>>> can someone tell me how this works?
>>>
>>>
>>>
>>>
>>> the resource.xml needs to be copied into the package (see the 
>>> build.xml of the redirect resource for instance)
>>
>>
>>
>> the problem is figuring out the directory based on the resource class
>>
>> Index: 
>> src/build/targets/create-new-resource-type/from-scratch-resource-template/build.xml 
>>
>> ===================================================================
>> --- 
>> src/build/targets/create-new-resource-type/from-scratch-resource-template/build.xml 
>> (Revision 32401)
>> +++ 
>> src/build/targets/create-new-resource-type/from-scratch-resource-template/build.xml 
>> (Arbeitskopie)
>> @@ -29,6 +29,10 @@
>>       classpathref="classpath"
>>       debug="true"
>>     />
>> +    <!-- TODO: Figure out the directory where the resource class is 
>> located in -->
>> +<!--
>> +    <copy file="${resource.home.dir}/resource.xml" 
>> todir="${resource.classes.dir}/TODO"/>
>> +-->
>>     <mkdir dir="${resource.lib.dir}"/>
>>
>> basically one needs to "analyze" the class name.
>>
>> Any idea how this could be done with ant?
>
> ant-contrib is your friend. something like this:
> <propertyregex property="new.resource.java.class.fs.path"
>              input="${new.resource.java.class.package}"
>              regexp="[.]"
>              replace="/"
>              global="true"
>              casesensitive="false" />


cool :-) Do you want to provide a patch ;-)

Thanks

Michi

>
> simon
>
>>
>> Thanks
>>
>> Michi
>>
>>>
>>>> is there some documentation?
>>>
>>>
>>>
>>>
>>> http://yanel.wyona.org/en/documentation/resources/using-a-resource-type.html 
>>>
>>>
>>> is this clarifying?
>>>
>>> Cheers
>>>
>>> Michi
>>>
>>>>
>>>> <resource-type package="org.wyona.yanel.impl.resources.redirect" 
>>>> src="/SOME_ABSOLUTE_PATH/contributions/resources/redirect/" 
>>>> compile="true"/>
>>>>
>>>> cheers
>>>> simon
>>>> _______________________________________________
>>>> Yanel-development mailing list
>>>> Yanel-development at wyona.com
>>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development



-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list