XINS can also execute several tools that can improve the quality of your API.
To use it, execute xins <tool target>.
The target will ask you upon which API you want to execute the tool.
You can also pass the name of the API as a parameter name using
-Dapi.name=<api name>
or add an
api.name property to the
build.properties
file.
You need to have the required libraries in the
XINS_HOME\lib
directory, unless specified
otherwise.
xins help-tools
Description: Prints the list of the tool targets with its description and its required or optional build properties.
xins download-tools
Description: Downloads and installs the required libraries needed to execute the tools.
xins java2html
Description: Generates HTML pages which contain the source code of the API.
Required library: j2h.jar
Web site: http://www.java2html.de/
Result location: build\j2h\<api
name>\index.html
xins pmd
Description: Analyses the source code of the API. The default
rules set is
rulesset/basic.xml,rulesset/unusedcode.xml
. You can
override it by settting the pmd.rules
property.
Required library: pmd.jar and jaxen
Web site: http://pmd.sourceforge.net/
Result location: build\pmd\<api
name>\index.html
xins checkstyle
Description: Checks the source code for compliance to the Java coding convention. It also perform some analisys of the code.
Required library: checkstyle.jar commons-beanutils.jar antlr.jar
Web site: http://checkstyle.sourceforge.net/
Result location: build\checkstyle\<api
name>\index.html
xins coverage
Description: Reports on the coverage of the API code by the unit tests.
Required libraries: cobertura.jar, asm.jar
Web site: http://cobertura.sourceforge.net/
Result location: build\coverage\<api
name>\index.html
xins emma
Description: Reports on the coverage of the API code by the unit tests using the EMMA code coverage library.
Required libraries: emma.jar, emma_ant.jar
Web site: http://emma.sourceforge.net/
Result location: build\coverage\<api
name>\index.html
xins findbugs
Description: Analyses the code in order to indentify possible bugs. You will need to set the findbugs.home=<findbugs directory> build property.
Required library: Install findbugs.zip.
Web site: http://findbugs.sourceforge.net/
Result location: build\findbugs\<api
name>\index.html
xins lint4j
Description: Analyses the code in order to indentify possible bugs.
Required library: lint4j.jar
Web site: http://www.jutils.com/
Result location: build\lint4j\<api
name>\lint4j-report.txt
and
build\lint4j\<api
name>\lint4j-report.xml
xins jdepend
Description: Analyses the package dependency and generates design quality metrics.
Required library: jdepend.jar
in the ANT_HOME\lib
directory.
Web site: http://clarkware.com/software/JDepend.html
Result location: build\jdepend\<api
name>\index.html
xins cvschangelog
Description: Generates the change log report of the API.
Required library: None but cvs should be installed.
Result location:
build\cvschangelog\index.html
xins glean
Description: Generates a Glean report for the API. Glean is a
tool agregator that produce a feedback repost about the source code.
You will need to set the glean.home=<Glean
directory> build property. If not already provided, a
apis\<api name>\glean.properties
file is
created that you can customize to your wishes.
Required library: Install glean.zip.
Web site: http://jbrugge.com/glean/
Result location:
build\glean\index.html
xins jmeter
Description: Generates JMeter tests from the examples defined in the functions.
Required library: None.
Web site: http://jakarta.apache.org/jmeter/
Result location: build\jmeter\<api name>\<api
name>.jmx
xins run-jmeter
Description: Runs the JMeter tests. You will need to the set jmeter.home=<jmeter directory> property. You can set the jmeter.test property for the location of the tests without the extension. The default is the location of the generated tests.
Required library: Install JMeter.
Web site: http://jakarta.apache.org/jmeter/
Result location: build\jmeter\<api
name>\index.html
xins maven
Description: Generates the Maven
pom.xml
file for the specified API.
Required library: None.
Web site: http://maven.apache.org/
Result location: apis\<api
name>\pom.xml
xins smd
Description: Generates the SMD (Simple Method Description)
of the API. You can set the destination of the API with the
smd.endpoint property. The default is the first
address in the environment.xml
file with
?_convention=_xins-jsonrpc
.
Required library: None.
Result location: build\smd\<api
name>.smd
xins xsd-to-types
Description: Generates .typ files with the types defined in the given XML Schema files for the specified API.
Parameters: xsd.dir - Directory containing the XML Schema files (*.xsd)
Required library: None.
Result location: apis\<api
name>\*.typ
xins wsdl-to-api
Description: Generates an API specification based on a WSDL file or URL.
Parameters: wsd.location - The location of the WSDL (local file or URL)
Required library: None.
Result location: apis\<api
name>\api.xml
apis\<api
name>\*.fnc
apis\<api
name>\*.typ
apis\<api
name>\*.rcd
xins webstart
Description: Generates a Java WebStart file (also called JNLP file) to run the API.
Required library: None.
Result location: build\webstart\<api
name>.jnlp
Note you will need to sign the WAR file if you want to make the API available online.
xins appengine
Description: Generates a Google App Engine of the Web Service.
Required library: Google App Engine SDK.
Result location: build\webapps\<api
name>