Eclipse Web Project is not building with ANT? - java

Eclipse Web Project is not building with ANT.... I had Eclipse build my build.xml file but if I goto the comment line and run ANT it does not make a WAR file anywhere. can someone please tell me why?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="MemberInquiry">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="Apache Tomcat v6.0 [Apache Tomcat v6.0].libraryclasspath">
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-i18n-ja.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/catalina.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/commons-pool.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jasper-el.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jasper-jdt.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jboss-logging-jdk.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/mysql-connector-java-5.0.5.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/catalina-ant.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-coyote.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jsp-api.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jasper.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-i18n-fr.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/commons-dbcp.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-juli-adapters.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/el-api.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/catalina-ha.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-dbcp.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/log4j.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/annotations-api.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/mod-cluster.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/jboss-logging-spi.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/servlet-api.jar"/>
<pathelement location="../../jboss-ews-1.0/tomcat6/lib/tomcat-i18n-es.jar"/>
</path>
<path id="Web App Libraries.libraryclasspath">
<pathelement location="WebContent/WEB-INF/lib/activation-1.0.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/antlr-2.7.6.jar"/>
<pathelement location="WebContent/WEB-INF/lib/aopalliance-1.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/asm-1.5.3.jar"/>
<pathelement location="WebContent/WEB-INF/lib/asm-attrs-1.5.3.jar"/>
<pathelement location="WebContent/WEB-INF/lib/cas-client-core-3.2.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/cglib-2.1_3.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-codec-1.4.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-collections-2.1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-dbcp.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-digester-1.8.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-email-1.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-fileupload-1.1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-io-1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-lang-2.5.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-logging-1.1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-pool.jar"/>
<pathelement location="WebContent/WEB-INF/lib/dom4j-1.6.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/dumbster-1.6.jar"/>
<pathelement location="WebContent/WEB-INF/lib/ehcache-1.2.3.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-3.2.6.ga.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-annotations-3.3.1.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-commons-annotations-3.0.0.ga.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-entitymanager-3.3.2.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-search-3.0.0.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/hibernate-validator-4.0.2.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpclient-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpclient-cache-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpcore-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpmime-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/icu4j-2.6.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/javassist-3.4.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jaxb-api-2.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jaxb-impl-2.1.3.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jaxen-1.1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jdom-1.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jstl-1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/jta-1.1.jar"/>
<pathelement location="WebContent/WEB-INF/lib/log4j-1.2.14.jar"/>
<pathelement location="WebContent/WEB-INF/lib/lucene-core-2.3.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/lucene-highlighter-2.0.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/mail-1.4.jar"/>
<pathelement location="WebContent/WEB-INF/lib/mysql-connector-java-5.0.5.jar"/>
<pathelement location="WebContent/WEB-INF/lib/persistence-api-1.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/quartz-1.5.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/slf4j-api-1.5.6.jar"/>
<pathelement location="WebContent/WEB-INF/lib/slf4j-log4j12-1.5.6.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-aop-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-asm-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-beans-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-context-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-core-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-expression-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-jdbc-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-ldap-1.3.0.RELEASE-all.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-orm-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-acl-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-acl-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-aspects-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-aspects-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-cas-client-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-cas-client-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-config-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-config-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-core-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-core-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-ldap-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-ldap-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-openid-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-openid-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-taglibs-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-taglibs-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-web-3.0.5.RELEASE-sources.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-security-web-3.0.5.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-tx-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-web-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/spring-webmvc-3.0.1.RELEASE.jar"/>
<pathelement location="WebContent/WEB-INF/lib/stax-api-1.0-2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/validation-api-1.0.0.GA.jar"/>
<pathelement location="WebContent/WEB-INF/lib/xalan-2.6.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/xercesImpl-2.6.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/xml-apis-1.3.02.jar"/>
<pathelement location="WebContent/WEB-INF/lib/xmlParserAPIs-2.6.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/xom-1.0.jar"/>
<pathelement location="WebContent/WEB-INF/classes"/>
</path>
<path id="EAR Libraries.libraryclasspath"/>
<path id="MemberInquiry.classpath">
<pathelement location="build/classes"/>
<path refid="Apache Tomcat v6.0 [Apache Tomcat v6.0].libraryclasspath"/>
<path refid="Web App Libraries.libraryclasspath"/>
<path refid="EAR Libraries.libraryclasspath"/>
<pathelement location="WebContent/WEB-INF/lib/httpclient-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpclient-cache-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpcore-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/httpmime-4.1.2.jar"/>
<pathelement location="WebContent/WEB-INF/lib/commons-codec-1.4.jar"/>
<pathelement location="WebContent/WEB-INF/classes/log4j.xml"/>
</path>
<target name="init">
<mkdir dir="build/classes"/>
<copy includeemptydirs="false" todir="build/classes">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="build/classes"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="build/classes" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="MemberInquiry.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
</project>
This is the output to the screen:
[jsmith#wcmisdlin07 MemberInquiry]$ ant
Buildfile: build.xml
build-subprojects:
init:
[copy] Copying 1 file to /home/jsmith/uft-workspace/MemberInquiry/build/classes
build-project:
[echo] MemberInquiry: /home/jsmith/uft-workspace/MemberInquiry/build.xml
build:
BUILD SUCCESSFUL
Total time: 0 seconds
PLEASE LET ME KNOW WHAT TO TRY

That particular ant script does not build a war, all it does is compile the java. You must have taken some other action within eclipse to create a war file than simply running this ant script.

Related

Classpath element is not a jar

I am trying to write a ant build which calls a Java class
<target name="validate" depends="forge-jar">
<taskdef name="spec" classname="SpecBuild" classpathref="java.classpath" />
<spec a="${forge}" mail="${mail}" dd="${dd}" wdd="${wdd}"/>
</target>
<target name="forge-jar" >
<path id="project.class.path">
<pathelement location="classes/" />
<pathelement path="classes/ant/tasks/SpecBuild.class" />
</path>
<path id="java.classpath">
<path refid="project.class.path" />
</path>
<javac includeantruntime="false" srcdir="src" destdir="classes" classpathref="java.classpath">
<filename name="**/SpecBuild.java" />
</javac>
</target>
In the SpecBuild.java class if I use slf4j logger I am getting this warning :-
CLASSPATH element /Users/classes/ant/tasks/SpecBuild.class is not a JAR.
[taskdef] CLASSPATH element /Users/classes/ant/tasks/SpecBuild.class is not a JAR.
Can anyone please help me fix this
You can specify the 'classes' directory in the class path as below. Remove the 'SpecBuild.class' file from pathElement location. You can either use 'includes' property and mention the file name in it or just include the 'classes' directory as below (exclude the JUni test cases package, if you have).
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<pathelement location="classes"/>
<dirset dir="${build.dir}">
<include name="apps/**/classes"/>
<exclude name="apps/**/*Test*"/>`enter code here`
</dirset>
</classpath>
Good luck.

Add library jar files in Java Task?

The spark-de.jar used other jar files as libraries. Assume running spark-de.jar requires lib1.jar and lib2.jar, how to set them in the following Java task of Ant?
<target name="makeQuery">
<java classname="sparkDemo.SparkTest" failonerror="true">
<classpath>
<pathelement location="${basedir}/spark-de.jar"/>
</classpath>
</java>
</target>
This should do the trick:
<target name="makeQuery">
<java classname="sparkDemo.SparkTest" failonerror="true">
<classpath>
<pathelement location="${basedir}/spark-de.jar"/>
<pathelement location="${basedir}/lib1.jar"/>
<pathelement location="${basedir}/lib2.jar"/>
</classpath>
</java>
</target>

Prepend to ant classpath instead of append

Below is a sample ant file for the purpose of this question.
Target "test1" is called from "test" using antcall. Now, when I have some classes having same fully qualified class names, I want the classes from test1.jar to be loaded first but it looks like test1.jar is appended to the classpath and hence classes from test.jar are picked instead.
Is there any way to reset/clear the classpath for target test1 or prepend test1.jar to the classpath so that classes from it are loaded.
<project name="TestProj" basedir=".">
<target name="test">
<java inputstring="" fork="true" failonerror="true" dir=".">
<classpath>
<fileset dir="C:/bb/" includes="test.jar"/>
</classpath>
</java>
</presetdef>
<antcall target="test1"/>
</target>
<target name="test1">
<java inputstring="" fork="true" failonerror="true" dir=".">
<classpath>
<path location="c:/test1.jar"/>
</classpath>
<jvmarg line="-Xms64m -Xmx512m"/>
<jvmarg line="-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true"/>
</java>
</presetdef>
</target>
</project>
Try the following:
<path id="test.classpath">
<fileset dir="C:/bb/" includes="test.jar"/>
<path refid="compile.classpath"/>
</path>
<path id="test1.classpath">
<pathelement location="c:/test1.jar"/>
</path>
<project name="TestProj" basedir=".">
<target name="test">
<java inputstring="" fork="true" failonerror="true" dir=".">
<classpath>
<path refid="test.classpath"/>
</classpath>
</java>
</presetdef>
<antcall target="test1"/>
</target>
<target name="test1">
<java inputstring="" fork="true" failonerror="true" dir=".">
<classpath>
<path refid="test1.classpath"/>
</classpath>
<jvmarg line="-Xms64m -Xmx512m"/>
<jvmarg line="-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true"/>
</java>
</presetdef>
</target>

Eclipse don't recognize test folder as source folder when importing ant build file

I have an ant build file for a java project the project tree looks like this :
DataBaseFidling.
|-->src (contains production code source)
|-->tests (contains tests code source)
|-->bin (contains .class)
|-->reports(contains junit xml reports)
|-->build.xml
Whenever I import this project with eclipse using "Java Project From Existing Ant Build File", eclipse does not reconize the tests folder as a source folder.
What to do to fix this?
Here is the ant build file :
The DatabaseFidling Project.
<property name="src.dir" location="./src/" />
<property name="tests.dir" location="./tests/" />
<property name="bin.dir" location="./bin/" />
<property name="lib.dir" location="/home/chedy/workspace/lib"/>
<target name="clean">
<delete verbose="true">
<fileset dir="${bin.dir}"/>
</delete>
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${bin.dir}">
</javac>
<javac srcdir="${tests.dir}" destdir="${bin.dir}">
<classpath>
<pathelement location="${lib.dir}/junit4.jar"/>
<pathelement location="${lib.dir}/mockito-all-1.9.5.jar"/>
<pathelement location="${lib.dir}/SQLScriptRunner.jar"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile">
<junit printsummary="yes" fork="true" >
<formatter type="xml"/>
<classpath>
<pathelement path="${bin.dir}"/>
<pathelement location="${lib.dir}/junit4.jar"/>
<pathelement location="${lib.dir}/mockito-all-1.9.5.jar"/>
<pathelement location="${lib.dir}/SQLScriptRunner.jar"/>
<pathelement location="${lib.dir}/mysql-connector-java-5.1.23-bin.jar" />
</classpath>
<batchtest todir="./report">
<fileset dir="${bin.dir}">
<include name="**/**Test*.*"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="run" depends="compile">
<java classname="com.esprit.is.Main" fork="true">
<classpath>
<pathelement path="${bin.dir}"/>
<pathelement location="${lib.dir}/mysql-connector-java-5.1.23-bin.jar" />
</classpath>
</java>
</target>
</project>
You can manually add the test folder as a source folder. Right click the project, Build Path -> Configure Build Path -> Java Build Path. In the Source tab, click Link Source then browse to your folder.
The compile target had to contain one javac task which compiles both the src and test folders.

Eclipse Ant Build is not not compiling in Jenkins

I am trying to schedule the following ANT build in jenkins to execute a java class. When I run the build configuration in Eclipse it compiles and excutes my java class. When I schedule and execute the build.xml in Jenkins it executes the build but fails to compile my java class. It then marks the build as completed successfully. I am running ANT Version 1.8.4 and Java version 1.7.0_03 in both eclipse and jenkins. I am not sure why Jenkins is failing to compile the class?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="Sel_Framework_Grid">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id="TestNG.libraryclasspath">
<pathelement location="../../../.eclipse/com.springsource.sts_2.9.1.RELEASE_1574885722/plugins/org.testng.eclipse_6.7.0.20120802_0752/lib/testng.jar"/>
</path>
<path id="Sel_Framework_Grid.classpath">
<pathelement location="bin"/>
<pathelement location="lib/activation.jar"/>
<pathelement location="lib/apache-mime4j-0.6.jar"/>
<pathelement location="lib/axis.jar"/>
<pathelement location="lib/bsh-1.3.0.jar"/>
<pathelement location="lib/cglib-nodep-2.1_3.jar"/>
<pathelement location="lib/commons-codec-1.4.jar"/>
<pathelement location="lib/commons-collections-3.2.1.jar"/>
<pathelement location="lib/commons-discovery.jar"/>
<pathelement location="lib/commons-exec-1.1.jar"/>
<pathelement location="lib/commons-io-2.0.1.jar"/>
<pathelement location="lib/commons-jxpath-1.3.jar"/>
<pathelement location="lib/commons-lang-2.6.jar"/>
<pathelement location="lib/commons-logging-1.1.1.jar"/>
<pathelement location="lib/commons-logging.jar"/>
<pathelement location="lib/cssparser-0.9.5.jar"/>
<pathelement location="lib/cxf-2.5.2.jar"/>
<pathelement location="lib/geronimo-activation_1.1_spec-1.1.jar"/>
<pathelement location="lib/geronimo-annotation_1.0_spec-1.1.1.jar"/>
<pathelement location="lib/geronimo-javamail_1.4_spec-1.7.1.jar"/>
<pathelement location="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
<pathelement location="lib/guava-10.0.1.jar"/>
<pathelement location="lib/hamcrest-all-1.1.jar"/>
<pathelement location="lib/htmlunit-2.9.jar"/>
<pathelement location="lib/htmlunit-core-js-2.9.jar"/>
<pathelement location="lib/httpclient-4.1.2.jar"/>
<pathelement location="lib/httpcore-4.1.3.jar"/>
<pathelement location="lib/httpmime-4.1.2.jar"/>
<pathelement location="lib/jaxb-api-2.2.3.jar"/>
<pathelement location="lib/jaxb-impl-2.2.4-1.jar"/>
<pathelement location="lib/jaxb-xjc-2.2.4-1.jar"/>
<pathelement location="lib/jaxen-core.jar"/>
<pathelement location="lib/jaxen-jdom.jar"/>
<pathelement location="lib/jaxrpc.jar"/>
<pathelement location="lib/jcommander-1.13.jar"/>
<pathelement location="lib/jcspclasses.jar"/>
<pathelement location="lib/jdom.jar"/>
<pathelement location="lib/jna-3.3.0.jar"/>
<pathelement location="lib/json-20080701.jar"/>
<pathelement location="lib/junit-dep-4.10.jar"/>
<pathelement location="lib/jython.jar"/>
<pathelement location="lib/log4j-1.2.8.jar"/>
<pathelement location="lib/mail.jar"/>
<pathelement location="lib/neethi-3.0.1.jar"/>
<pathelement location="lib/nekohtml-1.9.15.jar"/>
<pathelement location="lib/operadriver-v0.8.1.jar"/>
<pathelement location="lib/phwclasses.jar"/>
<pathelement location="lib/protobuf-java-2.4.1.jar"/>
<pathelement location="lib/saaj.jar"/>
<pathelement location="lib/sac-1.3.jar"/>
<pathelement location="lib/saxpath.jar"/>
<pathelement location="lib/serializer-2.7.1.jar"/>
<pathelement location="lib/sqljdbc4.jar"/>
<pathelement location="lib/stax2-api-3.1.1.jar"/>
<pathelement location="lib/velocity-1.7.jar"/>
<pathelement location="lib/woodstox-core-asl-4.1.1.jar"/>
<pathelement location="lib/wsdl4j-1.6.2.jar"/>
<pathelement location="lib/wsdl4j.jar"/>
<pathelement location="lib/xalan-2.7.1.jar"/>
<pathelement location="lib/xercesImpl-2.9.1.jar"/>
<pathelement location="lib/xml-apis-1.3.04.jar"/>
<pathelement location="lib/xml-resolver-1.2.jar"/>
<pathelement location="lib/xmlschema-core-2.0.1.jar"/>
<pathelement location="lib/AspriseJavaPDF-free.jar"/>
<pathelement location="lib/im4java-1.3.1-1.5.jar"/>
<pathelement location="lib/im4java-1.3.1.jar"/>
<pathelement location="lib/antlr-runtime-3.4.jar"/>
<pathelement location="lib/jna-3.4.0.jar"/>
<pathelement location="lib/testng-6.5.1.jar"/>
<pathelement location="lib/testng-6.5.1.zip"/>
<pathelement location="lib/slf4j-api-1.6.4.jar"/>
<pathelement location="lib/slf4j-nop-1.6.4.jar"/>
<pathelement location="lib/dom4j-1.6.1.jar"/>
<pathelement location="lib/poi-3.8-20120326.jar"/>
<pathelement location="lib/netty-3.2.7.Final.jar"/>
<pathelement location="lib/webbit-0.4.8-SNAPSHOT.jar"/>
<pathelement location="lib/dbunit-2.4.8-compatibileWithPoi-3.5-XLSXSupport.jar"/>
<pathelement location="lib/poi-ooxml-3.8-20120326.jar"/>
<pathelement location="lib/poi-ooxml-schemas-3.8-20120326.jar"/>
<pathelement location="lib/xbean.jar"/>
<pathelement location="lib/Aspose.Words.jdk16.jar"/>
<pathelement location="lib/ojdbc14.jar"/>
<pathelement location="lib/selenium-java-2.24.1-srcs.jar"/>
<pathelement location="lib/selenium-java-2.24.1.jar"/>
<pathelement location="lib/vim25.jar"/>
<path refid="TestNG.libraryclasspath"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="Sel_Framework_Grid.classpath"/>
</javac>
</target>
<target name="BaseSet Test">
<java classname="BaseSet" failonerror="true" fork="yes">
<arg line="C:\temp\testng-customsuite.xml c:\Jenkinstest Firefox,IE,EN,Ready"/>
<classpath refid="Sel_Framework_Grid.classpath"/>
</java>
</target>
Jenkins Console Output
Started by user anonymous
Building in workspace C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid
[Sel_Framework_Grid] $ cmd.exe /C '"C:\AutomatedTesting\apache-ant-1.8.4-bin\apache-ant-1.8.4\bin\ant.bat -file buildA.xml -Dbuild.sysclasspath=false -buildfile C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildA.xml && exit %%ERRORLEVEL%%"'
Buildfile: C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildA.xml
build-subprojects:
init:
build-project:
[echo] Sel_Framework_Grid: C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildA.xml
build:
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
Eclipse Console Output
Buildfile: C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildf.xml
build-subprojects:
init:
build-project:
[echo] Sel_Framework_Grid: C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildf.xml
[javac] C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel_Framework_Grid\buildf.xml:
build:
BaseSet Test:
[java] [TestNG] Running:
[java] C:\temp\testng-customsuite.xml
It seems you are not specifying a set of targets to run from your Jenkins build. This means the default target "build" will be run:
<target depends="build-subprojects,build-project" name="build"/>
The target "BaseSet Test" is one running your java class. Appears to be missing. I'd suggest altering your Jenkins job to run the following targets instead
build, BaseSet Test

Categories