<?xml version="1.0" encoding="UTF-8"?><!-- This is a project template configuration, it is used to tell the template program what to do when it creates a new template. Every project needs one of these configuration files and they need to reside in the project tempaltes root. All project templates need to reside in the /templates/ directory relative to the PTemplates programs root. If you need < or > as a value then you need to write them as < and >, at this time there is no code for referencing the actual strings > etc.. This is an example template configuration, you need to create one yourself with these conventions and place it into the template/${templateName}/ directory. These xml configuration files need to be named: template.xml for PTemplate to detect them. Make sure that if a field isn't used that the content of the tags is empty (no character) otherwise bad things will happen and the generator will assume that the tag is active. All tags must be included at least once.--><root> <!-- Type name, project template configuration will be refered to as a type. These config files can contain more than one type by adding more <type name="xxx"> tags, you must not define two or more types with the same name in the same file. --> <type name="NewWebProject"> <!-- Define a category which you think that this project belongs to. For example, web, j2ee, c++. --> <category>j2ee</category> <!-- Comment for when listing all projects etc. --> <description>new j2ee web project</description> <!-- Here will be listed all actions that will be taken when generating a new project from this template. --> <actions> <!-- <replace_all> action will replace all occurences or <string> OR <regex> pattern with the new string which is defined with <newstring>. When defining both a <string> an a <regex> then the <string> will take precedence. --> <replace_all> <!-- String to match when replacing --> <string>OldString</string> <!-- Or regex to match with when replacing in this action. The regex is line oriented. --> <regex>^[rR]egexString$</regex> <!-- The new string that will be put in place of the found replacing string. These <newstring> can contain ${ct_p/projectName} to indicate that when generating a new project, the desired project name that is specified will be put in place of this. --> <newstring>New String That is Put In Place</newstring> <!-- List of files to perform this action on, these paths are relative to the newly generated projects path. --> <files> <file>WEB-INF/web.xml</file> <file>WEB-INF/web/index.jsp</file> </files> </replace_all> <!-- second replace_all for demonstration --> <replace_all> <string>OldString</string> <regex>RegexString</regex> <newstring>New String That is Put In Place</newstring> <files> <file>WEB-INF/web.xml</file> <file>WEB-INF/web/index.jsp</file> </files> </replace_all> <!-- The copy all action will copy <sourcepath> file or directory into <targetpath> directory for copying in new libraries or other files that you may still be working on an have at some different location but whish to get them included into this tempate types configuration. --> <copy_all> <copy> <sourcepath>/opt/mylibs/someLirary.jar</sourcepath> <targetpath>lib/</targetpath> </copy> <copy> <sourcepath>/opt/mylibs/somePath/</sourcepath> <targetpath>lib/</targetpath> </copy> </copy_all> <!-- Second copy all for demonstration --> <copy_all> <copy> <sourcepath>/opt/mylibs/someLirary.jar</sourcepath> <targetpath>lib/</targetpath> </copy> <copy> <sourcepath>/opt/mylibs/somePath/</sourcepath> <targetpath>lib/</targetpath> </copy> </copy_all> </actions> </type> <type name="NewWebProject2"> <category>j2ee</category> <description>new j2ee web project</description> <actions> <!-- first replace_all --> <replace_all> <string>OldString</string> <regex>RegexString</regex> <newstring>New String That is Put In Place</newstring> <files> <file>WEB-INF/web.xml</file> <file>WEB-INF/web/index.jsp</file> </files> </replace_all> <!-- second replace_all --> <replace_all> <string>OldString</string> <regex>RegexString</regex> <newstring>New String That is Put In Place</newstring> <files> <file>WEB-INF/web.xml</file> <file>WEB-INF/web/index.jsp</file> </files> </replace_all> <!-- First copy_all --> <copy_all> <copy> <sourcepath>/opt/mylibs/someLirary.jar</sourcepath> <targetpath>lib/</targetpath> </copy> <copy> <sourcepath>/opt/mylibs/somePath/</sourcepath> <targetpath>lib/</targetpath> </copy> </copy_all> <!-- Second copy all --> <copy_all> <copy> <sourcepath>/opt/mylibs/someLirary.jar</sourcepath> <targetpath>lib/</targetpath> </copy> <copy> <sourcepath>/opt/mylibs/somePath/</sourcepath> <targetpath>lib/</targetpath> </copy> </copy_all> </actions> </type></root>