• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Assignment submission file structure verification / ant build.xml

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Based on Jean's Tool, below an extended version of an assigment submission file structure verification utility.

Works on a folder that is to be jar'ed up for submission, or to be on the safe side, the un-jar'ed root folder of the submission jar file.

Simply edit the array of files/folders to be tested as required files (or non-existence, e.g. unit tests).

Handy to run as an ant java task after the submission dir is created, or the submission jar is jar'ed up, then un-jar'ed to a temporary directory for verification.


[ November 07, 2007: Message edited by: Chris Be ]
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that's nice! I'll use it.

My 2 cents... I would (and did) however rather use an ANT script that does the packaging like you need it, or raise an error:
- clean
- unit test (text or ui mode) + reports
- Compile
- javadoc
- version control
- packaging (only if no error occured before)
- checkstyle/PMD/cobertura reports
- ...

After using the script for a while during development, your level of confidence is just through the roof.

ANT is just not an option anymore.

since I've mentioned it... I'll post an old ant script I've used before.. I haven't use it for ages... My current SCJD is simpler, but this one has more options (so you can pick what you like)...



Among the last line caused me problems...
Had erros pasting it here.. fix the almost-last-line by removing the 2 obvious "--" :
: taskn--ame="JUnit" failoner--ror="true">


Property that goes with it...

[ November 07, 2007: Message edited by: Alex Turcot ]
 
Ranch Hand
Posts: 114
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good work guys �
Chris , your Junit test cases were fine , with a little customization and I could dig out a few missing things from my assignment
 
Chris Be
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here my two cents worth of ant build (note failoneror must be changed to failonerror due to problems in posting):


[ January 07, 2008: Message edited by: Chris Be ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Chris Be!

But there was an error in the "submission" target.
Instead of:

<pathelement location="${testClassesDir}/" />

the correct is:

<pathelement location="${classesDir}/" />
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Raphael A.", please check your private messages for an important administrative matter.
 
Chris Be
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raphael A.:
Thanks, Chris Be!

But there was an error in the "submission" target.
Instead of:

<pathelement location="${testClassesDir}/" />

the correct is:

<pathelement location="${classesDir}/" />



I don't think you are right on this one, the submission test utility is in the test classes directory, not the classes dir containing classes for submission only.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic