File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven build error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven build error" Watch "Maven build error" New topic

Maven build error

Cloey Tan
Ranch Hand

Joined: Feb 03, 2009
Posts: 60
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: Warning: Could not find file C:\SI\wor
kspace\project\src\target\classes to copy.

Im getting an error due to project compilation, What could this possibly due to?

And besides, the script below, im assuming its trying to create a new tmp folder, and try to move files from classes and test-classes to it? But initially the target folder is supposed to be empty?
<!-- move the originals -->
<mkdir dir="${basedir}/target/tmp" />
<move file="${basedir}/target/classes" todir="${basedir}/target/tmp" /
<move file="${basedir}/target/test-classes" todir="${basedir}/target/tmp" />
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Maven build error? I don't see anything related to Maven in this

This looks like an Ant script failing.

Notice that in your build script, you are trying to move ${basedir}/target/classes (and ${basedir}/target/test-classes) as a "file" (which is non-existent). What exactly is the build script trying to do?

[My Blog] [JavaRanch Journal]
Cloey Tan
Ranch Hand

Joined: Feb 03, 2009
Posts: 60
It's from a sample project that i have. What i posted just now was extracted from this execution. It keeps me wondering because im assuming the target folder could be initially empty, and moving a file(in this cases, suppose to be a folder) from a non-existent path won't seem to work?
Note:This is from a module-pom.xml

I agree. Here's the link:
subject: Maven build error
It's not a secret anymore!