Marcel Höll Marcel Höll - 1 year ago 107
Java Question

Failed to copy artifact or file with maven packaging a web application

I have a problem packaging a web application based on vaadin. I have two projects in my workspace called project A and project B. Project A is referencing B and the dependencies are resolven within the workspace and degub mode correctly, by adding the project to the classpath.

Now if I try to maven package, I always get the error

Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project A: Failed to copy file for artifact [com.dscsag.dscxps:ProjectB:jar:0.0.1-SNAPSHOT:compile]: C:\some_path\target\classes (Access is denied) -> [Help 1]


What should I do?

Answer Source

It seem to relate with security because the log said "(Access is denied)". Maybe output jar of project B exist and there are some processes still ready from it, so that you cannot overwrite output file. Or maven don't have privilege to write output file to class folder.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download