Last Published : April 23 2010

Scomp-Ant Script


This Ant build script is an alternative of scomp, and saves much troubles of compilation errors and all. This can be used to convert a set of schema files(xsds) to a jar file which will contain the generated JavaBean corresponding to the xsd.

Pre-Requesites


1. Make sure that XMLBEANS_HOME points to XMLBeans directory.
eg:/home/ageorge/xmlbeans-1.0.4
2. Make sure that you have javac on your path.
3. Make sure JAVA_HOME is set to a JDK location
4. Make sure you install ant1.6.5 or higher

Things the ant script does


The ant script gets input from file scomp.properties Just specify the properties that you require. You can configure 3 things 1.package.class specifies to which package the generated bean belongs to. eg:package.class=com.mobchannel 2.dest.jarfile specifies the name of the destination jar filedest.jarfile=mobchannelconf 3.schema.dir specifies from where it should get the xsds. All xsds in that dir will be converted into a jar file. eg: schema.dir=.

How to Run


1.cd to the directory where you installed this eg: cd scomp-anttask 3. Make sure the scomp.properties file has the required parameters. 2. execute ant by typing ant on command prompt. eg:ant 3. A directory with name build is created, and the jar will be there. (Additionally if you want to see the source uncomment the line in build.xml and comment the line below)

Sample Configuration


Download Here

About the Author


The author is a server side architect and a strong proponent of SOA Systems. For any queries: contact arun dot george dot 1981 at gmail.com