Forums Register Login

Building with ant

+Pie Number of slices to send: Send
Hello everybody!

I was wondering if it makes sence to build the application using an ant-script? If yes, does anyone have any good guidelines for it? I have used it before, but never wrote it myself.

Regards
Dannie
+Pie Number of slices to send: Send


I assume I am allowed post this as it is not a required part of the submission process. Here is the build file I have been working on. It compiles the java files in the code directory into the classes directory. It then runs javadoc and builds a runme.jar executable. Finally it jars all the directories and files (except the classes directory which is not needed because of runme.jar) into a submission jar called srXXXXXX.jar

Feel free to use and modify all,
Mark
+Pie Number of slices to send: Send
Just found this. Yes it's OK, but don't forget guys - Disclaimer: don't blame Mark or JR if this script does not do things the way that your assignment requires. Modify and use at your own risk.
+Pie Number of slices to send: Send
It's so small

But mine does more, like running unit tests.
+Pie Number of slices to send: Send
 

Originally posted by Jeroen T Wenting:
It's so small

But mine does more, like running unit tests.



Yeah I had junit tests in for a while until I was happy with the code (like I will ever be happy with it) :roll: . I Left them out of the sumbission build tho.

Agree with Barry verify that it does put everything in the submission jar correctly according to your spec and I agree even more strongly with the not blaming me bit too .

Bear in mind that all the userguide.txt, choices.txt should be in the correct folders (docs), version.txt and original bd file in the same directory as the build.xml which will be the jar root.

Mark.

[ December 11, 2006: Message edited by: Mark Smyth ]
[ December 11, 2006: Message edited by: Mark Smyth ]
+Pie Number of slices to send: Send
Hello!
What about running 'rmic'?
Didn't your requirement state that:

You must provide all classes pre-installed so that no dynamic class downloading occurs.


That means that I can't rely on the new RMI feature "dynamic generation of stubs", or have I misunderstood?
I can add the ant task myself I'm just wondering if I need to do the 'rmic' compilation.
Regards, Calle
PS This is my first post here, and I want to thank everybody that answers questions it is really helpful!! I've found lots of good information by searching the forum.
+Pie Number of slices to send: Send
yup, that's something else he forgot in his antfile.
+Pie Number of slices to send: Send
 

Originally posted by Jeroen T Wenting:
yup, that's something else he forgot in his antfile.



Damn you Java 5!! There is a good chance I would have submitted the project without that stub .

Phew!! Cheers Guys
+Pie Number of slices to send: Send
Been thinking some more about this. Is it dynamically generating the stub on the fly really the same as dynamically downloading it though? After all the classes are already in the clients jar file so it does have access to all the class files it needs to generate the stubs from locally.

Shouldn't we take advantage a cool new feature of the Java 5 runtime environment?

Mark.
+Pie Number of slices to send: Send
the server may be able to generate the stub on the fly, but you still need to download it to the client if you choose that...
+Pie Number of slices to send: Send
Now I know why I scored 0 for the 'network server' section of my SCJD submission. I forgot to provide the stub.

I totally agree with Mark now: 'Damn you java 5'.

But at least I know now what the problem is. I feel relieved. Would have been really stupid if I would have failed because of that. Guess I'm a lucky bastard after all.
+Pie Number of slices to send: Send
 

Originally posted by Luc Feys:
Now I know why I scored 0 for the 'network server' section of my SCJD submission. I forgot to provide the stub.

I totally agree with Mark now: 'Damn you java 5'.

But at least I know now what the problem is. I feel relieved. Would have been really stupid if I would have failed because of that. Guess I'm a lucky bastard after all.



Guess I have my answer now!

Cheers all, I had a lucky escape here.
+Pie Number of slices to send: Send
 

Originally posted by Jeroen T Wenting:
It's so small

But mine does more, like running unit tests.




I bet you can even type "ant make", Jeroen.
+Pie Number of slices to send: Send
I can type it, but it won't do much. There's no make target
+Pie Number of slices to send: Send
Hy gyus. I'm strugglying through developer exam as well. As I got a lot of good ideas from here, I provide something from me. Here we go..

Missing rmi targets:

<target name="rmic" description="Run rmic to compile stubs and skeletons" depends="compile">
<rmic classname="suncertify.urlybird.rmi.URLYBIRDImpl" classpath="${classes.dir}" base="${classes.dir}" />
</target>

OK - this is not needed, but I like to do everything from ANT.

<target name="rmiregistry" description="Start up rmiregistry">
<echo message="Start up the rmi registry" />
<exec executable="rmiregistry">
<arg value="-J-classpath"/>
<arg value="-Jrunme.jar"/>
</exec>
</target>
[ January 08, 2007: Message edited by: Jan Heideken ]
+Pie Number of slices to send: Send
It seems that jdk 5 makes a trap. For this reason, I decide to get rid of all new features of 5.0 and first run under jdk4.x and later jdk 5.0.
+Pie Number of slices to send: Send
I cannot get this to work with javadoc. How do I set that up in ant with eclipse?
+Pie Number of slices to send: Send
Hi

Try Window->Show -> Ant and you get the ant view add here your ant file and you can see a list wit all your tasks. Just click on a task the magic is happen.

Regards M.
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1631 times.
Similar Threads
Installer for Ant Build & Deployment Scripts
start app in a new console window
Redeploy application
Is scripting an improper usage of XML?
the best build tool for VC++ applications ???
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:15:53.