aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes i am looking for Ant scripts help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "i am looking for Ant scripts help" Watch "i am looking for Ant scripts help" New topic
Author

i am looking for Ant scripts help

kumar hai
Greenhorn

Joined: Oct 12, 2009
Posts: 26
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

Joined: May 26, 2003
Posts: 30758
    
156

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"?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
kumar hai
Greenhorn

Joined: Oct 12, 2009
Posts: 26
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

Joined: May 26, 2003
Posts: 30758
    
156

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

Joined: May 19, 2005
Posts: 263
looks to me that maven-artifact-ant-2.0.4-dep.jar file is corrupt.
kumar hai
Greenhorn

Joined: Oct 12, 2009
Posts: 26
Hi,

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


Thanks
gow tham
Greenhorn

Joined: Sep 29, 2013
Posts: 29
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

Joined: May 26, 2003
Posts: 30758
    
156

Can you elaborate on your problem? The original one was a corrupt jar file and the user solved that.
gow tham
Greenhorn

Joined: Sep 29, 2013
Posts: 29
hi boyarsky, yep I have replaced that jar file. it works now. thank you so much for your response....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i am looking for Ant scripts help