Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sun Learning Connection and Ant

Status
Not open for further replies.

hokrc

Programmer
Nov 17, 2006
1
0
0
US
I am working in Sun's Learning connections course:
Module 1: EJB Component Model | Lab 2: Testing the Application

It requires me to use Ant to compile and deploy the EJB.

I am using their supplied code and the build.xml does not work right. (Just for the record they say it is not their problem)

now I can compile the programs when I say javac *.java I get no compile errors but when I use the build.xml I get lots of errors. I have contact the learning connection and Junit but they say that this is not their problem.

Any help would be appriciated

build.xml code is as follows:

C:\Documents and Settings\Ken\develop\bankproject>asant compile
Buildfile: build.xml

prepare:

compile:
[javac] Compiling 3 source files to C:\Documents and Settings\Ken\develop\ba
nkproject\build
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgr.j
ava:7: cannot find symbol
[javac] symbol : class CustomerData
[javac] location: interface bank.BankMgr
[javac] public CustomerData getCustomerData (int id)
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgr.j
ava:8: cannot find symbol
[javac] symbol : class BankException
[javac] location: interface bank.BankMgr
[javac] throws BankException, RemoteException;
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:9: package junit.framework does not exist
[javac] import junit.framework.*;
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:11: cannot find symbol
[javac] symbol: class TestCase
[javac] public class BankMgrTest extends TestCase {
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:15: cannot find symbol
[javac] symbol : class Test
[javac] location: class bank.BankMgrTest
[javac] public static Test suite() {
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:16: cannot find symbol
[javac] symbol : class TestSuite
[javac] location: class bank.BankMgrTest
[javac] return new TestSuite(BankMgrTest.class);
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:20: package junit.textui does not exist
[javac] junit.textui.TestRunner.run(suite());
[javac] ^
[javac] C:\Documents and Settings\Ken\develop\bankproject\src\bank\BankMgrTe
st.java:38: cannot find symbol
[javac] symbol : class CustomerData
[javac] location: class bank.BankMgrTest
[javac] CustomerData data = bankMgr.getCustomerData(1);
[javac] ^
[javac] Note: C:\Documents and Settings\Ken\develop\bankproject\src\bank\Ban
kMgrTest.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 8 errors

BUILD FAILED
C:\Documents and Settings\Ken\develop\bankproject\build.xml:10: Compile failed;
see the compiler error output for details.

Total time: 5 seconds

C:\Documents and Settings\Ken\develop\bankproject>type build.xml
<project name="bankproject" default="compile" basedir=".">
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/build"/>

<target name="prepare">
<mkdir dir="${build.dir}"/>
</target>

<target name="compile" depends="prepare">
<javac destdir="${build.dir}">
<src path="${src.dir}"/>
</javac>
</target>

<target name="test" depends="compile">
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${build.dir}"/>
<pathelement path="${java.class.path}"/>
</classpath>
<test name="bank.BankMgrTest"/>
</junit>
</target>

<target name="clean">
<delete dir="${build.dir}" />
</target>
</project>

ANy and all help would be appricated thank you again

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top