javatomcatantadempiere

How to create webui workspace of adempiere customization templae using eclipse webtool using tomcat


I want to run adempiere customization with webui from eclipse using webtool and tomcat server, so i can run and debug code more efficiently for webui customziation.

These thing i have tried in adempiere trunk by using following link :- http://www.adempiere.com/Creating_WebUI_Workspace_using_Eclipse_Webtool ,but for this i can not do in customization. As i build trunk project using utils_dev/build.xml after that it created webui.war which showing while adding project in server. As for customization given directory were not available i have copied that in customization and try to build it it's not working and showing a lot of files not found. As i think that's not correct way because many of files will not be there in customization.

         [javac] Note: Some input files use or override a deprecated API.
         [javac] Note: Recompile with -Xlint:deprecation for details.
         [javac] Note: Some input files use unchecked or unsafe operations.
         [javac] Note: Recompile with -Xlint:unchecked for details.

Secondly i have tried one another link :- https://github.com/adempiere/Customization-Template, in which it showing i have to customize ant build.xml files. As the project is available to me i referred the build.xml files also created build.xml files in client,base and zkwebui folder. But while executing that xml file it showing following error message. I think it's related issue with deprecation, but i am confused in this i will get proper output or not.Any one please suggest me how can i accomplish this things.

The given link http://www.adempiere.com/Creating_WebUI_Workspace_using_Eclipse_Webtool worked successfully for adempiere trunk project but that's not worked for customization. Can any one suggest me how can i accomplish same for customization

Second link i have followed :- https://github.com/adempiere/Customization-Template the same process i followed which i mentioned above.


Solution

  • Check the online book section on development environments. This may be a copy of what you were reading in the wiki. (Note, the wiki has moved to wiki.adempiere.net).

    To create customizations in ZK, you'll need to create a file zkcustomization.jar and add it to the install ADEMPIERE_HOME/lib directory (not the eclipse project) before you RUN_Setup/RUN_SilentSetup to build. Any class you add to this jar will override the equivalent class in the main project.

    From Eclipse, you can modify the main project directly and debug it normally but you will need to keep track of the classes you modified and add them to the jar file manually. This is a bit tedious.

    The template approach is useful when you have many customized classes and need to ensure you get the jar file correct. It allows you select or add the specific java files you require and modify them while keeping the core project untouched. It suffers from the lack of a "hot-swap" feature which is so useful in the SWING interface and also that the web deployment doesn't span projects. For this reason, when debugging the customized ZK interface, the template needs to copy all the compiled classes from the main project in order to deploy the web server. There are ANT configurations/scripts to help with this but they may need some tweaking as the main project is updated. Also, the template needs access to the correct libraries so you may have to update the build configuration as you add customizations. Once you can run the adempiere zk interface from the template, you can create the zkcustomization.jar file automatically. Then be sure to add it to your deployment package.

    Its a bit of a hassle getting the template configured but it works quite well once you have it set up.