[please note that I posted this question in StackOverflow too 
- 
http://stackoverflow.com/questions/23089023/maven-clean-fails-on-linux-vagrant-shared-drive]

Using vagrant, I git clone'd my java app to c:/shared. In my Vagrantfile, I 
specified that my host's c:/shared will be mapped to /home/vagrant/myapp on 
my Virtual Machine.

When I run mvn clean compile from within the VM, I ran into this error:

core/myapp/target/classes/com/myapp/...
        at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.io.IOException: Failed to delete 
core/myapp/target/classes/com/myapp/...
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:191)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)

However, the Maven build succeeds on my Windows (host) machine.

Running ls gives an odd output as the privileges show up as question 
marks(?):

[vagrant-centos65 parent]$ ls -lrot target/...
ls: cannot access ...
?????????? ? ? ?            ? $Class$$doMethod$1$1$$anonfun$apply$2.class

I'm running as user kevin, where as /home/vagrant/myapp is owned by vagrant. 
However, most, if not all, of myapp's directories have wide open (766 or 777) 
rights.

In the past, I've successfully compiled on the guest VM in a directory 
shared between host and guest.

I'm using:

vagrant - 1.3.5
Maven - 3.2.1
VirtualBox - 4.3.8

Also, I observed that this particular folder (C:) is not being indexed per 
this post <http://stackoverflow.com/a/3910746/409976>.

Why would the build succeed on the host, but not the guest?

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to