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

Maven build error

 
Cloey Tan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Cloey Tan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic