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

simon litwan simon.litwan at wyona.com
Mon Feb 25 16:33:04 CET 2008


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" />

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
>>
>>
>>
>>
>
>



More information about the Yanel-development mailing list