Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i am looking for Ant scripts help

 
kumar hai
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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 ....
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi,

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


Thanks
 
gow tham
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
hi boyarsky, yep I have replaced that jar file. it works now. thank you so much for your response....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic