• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

B Eckel's build.xml and mine

 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm trying to build B Eckel's TIP using ant

if i manually compile and run this class, i get it ok; if i use my rudimentary build.xml (one folder a time) it also builds ok; when comes to using author's one i get this msg stating JUnit cant be found

i start by running this bat:

i've no classpath settings in env settings, but i've java_home (1.4.2) there also

here's my build.xml:


error msg from running Eckel's build.xml:

line 74:
<antcall target="MessengerDemo.run"/>

from this msg i understand ant cant find TestCase, but that sounds strange indeed, since either manually or with my xml junit it is present and working ok

the most amazing is that even after that error msg i still can run the file

Now here's how i'm working:


if needed i�ll post Eckels build.xml

TIA
[ March 23, 2005: Message edited by: miguel lisboa ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at Ant manual on system classpath, I thought I'd try telling ant to combine the system classpath with the classpath in the build.xml. Seems like this must have changed from a prior version of ant.

Try it out, it worked for me:
ant -Dbuild.sysclasspath=last



You can run ant -v to see what classpath it is using and other information that can help you figure out what has gone wrong:



When I added -v with -Dbuild.sysclasspath=last it looks like it's including "my" classpath and ant's classpath (including all the ant optional jars). May not be something you'd want to use in creating your own build, but may work to get the TIP build files to work.



[Edited to put in the ant 1.6.2 classpath and insert line breaks so the page isn't so wide]
[ March 23, 2005: Message edited by: Carol Enderlin ]
 
miguel lisboa
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what a help!
thanks a lot

i started with simplifying folder (ant -Dbuild.sysclasspath=last) and then tried to compile from code folder, but there was a duplicated class in state folder, so i renamed it:

and everyting compiled just fine:


right after i tried to do the same with TIJ, but after 45 sec of mixed feelings, i got a build failed;
i guess maybe because of some charset due to my latin language (with �,~, etc)


this ant stuff remains very confusing to me

anyway thanks again!
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm. I got the same result. I downloaded TIJ yesterday when I was looking for TIP and didn't realize what TIP or TIJ meant.



Not necessarily an ant problem. It was running a java program that threw an Exception. So, it failed.

I guess you could look at the code to see what it's trying to do.
[ March 24, 2005: Message edited by: Carol Enderlin ]
 
miguel lisboa
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
from TIJ:

//: c12:AvailableCharSets.java
// Displays Charsets and aliases


and that's what it does
my theory is since 2002 another charset appeared

as to the rest of the chapters i used my build
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You CAN use the TIJ build.xml. A well documented build file will tell you what targets can be used to do common tasks. This one is well-documented.

See below in code block, running ant -projecthelp shows that the main targets in the overall build are the default(run), build, and clean.

It can be little overwhelming to use the default of run with the overall build file since it runs all the examples and so many lines of output stream by. Running "ant build" is a little more manageable. Doing it I noticed a couple of errors such as "mail.jar.check: [echo] mail.jar is missing. See errors.txt". "ant clean" is always useful.

 
miguel lisboa
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you made me learn quite a few things - thanks a lot!

ant -help showed the menu and so i understood where you found:
ant -projecthelp
(i first searched for it inside buld.xml )

A well documented build file will tell you what targets can be used to do common tasks. This one is well-documented.

great point!

great too was having both TIP and TIP totally (and cleanly) compiled with ant build
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic