• 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

i am looking for Ant scripts help

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.,

I wrote some small ANT scripts.

while compile for .jar file using java file.i got some error ....please any one help with solution

C:\ant>ant -f test-compile.xml
Buildfile: test-compile.xml

clean:
[delete] Deleting directory C:\ant\build

compile:
[mkdir] Created dir: C:\ant\build\classes
[javac] Compiling 1 source file to C:\ant\build\classes
[javac] error: error reading C:\ant\lib\maven-artifact-ant-2.0.4-dep.jar; er
ror in opening zip file
[javac] 1 error

BUILD FAILED
C:\ant\test-compile.xml:21: Compile failed; see the compiler error output for de
tails.

Total time: 0 seconds


below i mention my scripts

<!-- Compile the java code from ${src} into ${build} -->

<javac srcdir="${src}" destdir="${build}"/>


here only i got error...please help ....
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jumar
Welcome to JavaRanch!

Let's start with the what the error message says. Can you unjar/unzip "C:\ant\lib\maven-artifact-ant-2.0.4-dep.jar"?
 
kumar hai
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI...I just tried with sample java file....

i will send my scripts. & i already send my error details.

while compiling java file i am getting that error...

error:

compile:
[mkdir] Created dir: C:\ant\build\classes
[javac] Compiling 1 source file to C:\ant\build\classes
[javac] error: error reading C:\ant\lib\maven-artifact-ant-2.0.4-dep.jar; er
ror in opening zip file
[javac] 1 error

----------------------------------------


i don't know about that error...


i am using ANT - version & java

Apache Ant version 1.7.1 compiled on June 27 2008

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

-------------------------------


Please let me know if anything...



 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've added code tags to your post. I don't see an answer to my question though - did you try unzipping the file in the error message? You could use WinZip or the jar command to do so.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
looks to me that maven-artifact-ant-2.0.4-dep.jar file is corrupt.
 
kumar hai
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks for you reply....my issue resolved ....


Thanks
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi kumar,

I have facing the same problem which you have encounter. can you please kindly tell me how do you overcome this issue. I have struggling for past 2days to discover the reason for this error. Please help me. Thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you elaborate on your problem? The original one was a corrupt jar file and the user solved that.
 
gow tham
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi boyarsky, yep I have replaced that jar file. it works now. thank you so much for your response....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic