[Yanel-dev] resource type build

Michael Wechner michael.wechner at wyona.com
Thu Jul 2 14:57:04 CEST 2009


Guillaume Déflache schrieb:
> Prabodh Upreti schrieb:
>> Hello Guillaume
>
> Hi all! ;)
>
>
>> I would like to setup my build so that I can just build the resource 
>> instead of the full build. According to the documentation I should be 
>> able to run:
>
> Which documentation are you refering to? (Just asking so we can fix it 
> :)...)

I guess you mean

http://www.yanel.org/en/documentation/best-practices/rapid-development-of-components.html
>
>
>> ./build.sh -f src/contributions/resources/forgotpw/build.xml
>>  
>> This says compiled fine eventhough there are errors in the the code. 
>> When I run the full build I am able to see errors.
>
> That's probably because this does not do anything ATM, see 
> http://lists.wyona.org/pipermail/yanel-development/2009-May/003549.html 
> (and 
> http://lists.wyona.org/pipermail/yanel-development/2009-April/003544.html 
> for the beginning of the discussion). Please feel free to chime in 
> there and give your opinion.
>
> Basically for now you have to use:
> ./build.sh -f src/contributions/resources/forgotpw/build.xml compile

some resources do not need this, because these are not using the generic 
build process and hence have a default target, which
can be for example "compile"

Also in most cases you need to copy the built library by hand to

local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/lib/

and restart your tomcat if not configured otherwise.

I think we should add this info also to the documentation ;-)
>
>
>> How do I setup an easy build process for the new resource?
>
> See above, and if I get some free time I'll have a look at 
> auto-deployment of resource-type, which is the only thing missing to 
> make a no-fuss "refresh" default target for resource-types.
>
>
>> Also, I am getting following error:
>>  
>> java.lang.Exception: Unknown resource type: 
>> <{http://www.wyona.org/yanel/resource/1.0}forgotpw/>
>>  org.wyona.yanel.core.ResourceTypeRegistry.getResourceTypeDefinition(ResourceTypeRegistry.java:217) 
>>
>>  org.wyona.yanel.core.ResourceManager.getResource(ResourceManager.java:85) 
>>
>>  org.wyona.yanel.core.ResourceManager.getResource(ResourceManager.java:120) 
>>
>>  org.wyona.yanel.servlet.YanelServlet.getResource(YanelServlet.java:862)
>> I understand resource is not being dectected here.  I can see the 
>
> Correct.
>
>
>> resource listed under https://localhost:8443/yanel/ which tells me 
>> that it is configured correctly.  As per Michael's earlier threads, I 
>> also went and added the resource under
>>  
>> /yanel/trunk/src/realms/from-scratch-realm-template/resource-types.xml 
>> <http://svn.wyona.com/repos/public/yanel/trunk/src/realms/from-scratch-realm-template/resource-types.xml> 
>>

I think it's better to make this a resource available to all realms by 
adding to

YANEL_HOME/src/resources

and

YANEL_HOME/conf/resource-types.xml

(similar to the 404 resource type)
>>  
>> Where else should I check?  Thank you.
>
> I think your RT is correctly referenced in the configuration files but 
> somehow did not got loaded Java-wise. Please check that a 
> yanel-resource-forgotpw-0.0.1-dev-rXXX.jar or something is present in 
> WEB-INF/lib or else the logs in build/logs/log4j-cnode1.log for errors.

agreed. Just to be sure you may want to build clean and build again, 
whereas the above should actually help to figure it out

HTH

Michael
>
> Cheers,
>    Guillaume



More information about the Yanel-development mailing list